March 25

Fatal Error: Unable to read XXXX bytes in /path/to/software/file.php on line 0

Sometimes when you’re installing a paid script (like, but not limited to Kayako) that uses Zend or Ioncube encoding, you may find yourself faced with this nasty error message. Let’s back up a little to understand what Zend & Ioncube encoding are. They are encryption methods that garbles the script’s coding for humans. For computers, with Zend Loader or Ioncube loader installed, the computer system can read the garbled code. Why do this? To protect the developer’s intellectual rights.

PHP and even CGI code to a large extent are very open. Just look at WordPress. Any file you open is in plain text and any developer even one who’s learning can more or less figure out what the code is doing. It’s a lot like distributing a book in a DOC format for everyone to read – and edit. To prevent that, some developers use Zend or Ioncube. So why did you get this error?

Because typically, PHP files are meant to be uploaded – using your FTP program in ASCII mode. You probably don’t even notice this anymore because most FTP software by default will automatically upload PHP files in ASCII mode. The problem is, encoded files are not ASCII they are Binary. Which means you have to upload them in Binary mode, not the typical ASCII mode.

How do you fix this? Change your FTP software upload mode to Binary then re-upload all the PHP files again, overwriting the ones there.

In FileZilla, you change your upload mode by going to Transfer >> Transfer Type >> Binary. Remember to change it back to Auto after you’re done to avoid problems later.


You may also like

Force cPanel Password Reset

Force cPanel Password Reset
{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Get in touch

0 of 350