HostMonster Web Hosting Help

Fatal error: Unable to read X bytes in /home/user/public_html/myfile.php on line Y

Problem:

I get this with some of my php files: Fatal error: Unable to read X bytes in /home/user/public_html/myfile.php on line Y

Solution:

This means that the file was uploaded as ASCII text (plain text) instead of as a binary file (1's and 0's). Some PHP codes require that it is transfered as a binary file and not as plain text. Setting your FTP client to force Binary mode, instead of allowing it to auto-detect the mode, will fix this problem 90% of the time.

Refer to the FTP client's website for specific instructions.

Knowledgebase Article 86,738 views bookmark tags: php unable (updated 2027 days ago)


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

Available PHP Memory Exhausted. (updated 1376 days ago)
Knowledgebase Article 136,230 views tags: exceeded fatal memory php wordpress

I installed TikiWiki and I am getting the following error: Notice: Only variable references should be returned by reference in /home/~/lib/adodb/adodb.inc.php on line 2741 Notice: Only variable refere (updated 2028 days ago)
Knowledgebase Article 57,400 views tags: fantastico php wiki

Script executed with a cron job requires a specific php.ini file to be used. (updated 812 days ago)
Knowledgebase Article 75,847 views tags: command cron cronjob crontab custom line optimizer php zend

Related Help Content

When creating a symlink to a php page, I get a 500 error. I am able to use symlinks to other files and folders fine. (updated 1781 days ago)
Knowledgebase Article 53,786 views tags: link php

Wordpress Error: Unable to create directory /wp-content/uploads/2009/mydir/summer/ Is its parent directory writable by the server? (updated 1992 days ago)
Knowledgebase Article 40,812 views tags: create unable wordpress

How to customize your html or php error pages. (updated 902 days ago)
Knowledgebase Article 69,995 views tags: errors php

When setting up an account in Outlook or Outlook Express I get an error saying unable to connect to my SMTP server. (updated 1192 days ago)
Knowledgebase Article 157,176 views tags: blocked connection refused send smtp unable

PHP vs PHP single php.ini vs PHP with FastCGI (updated 1071 days ago)
Knowledgebase Article 138,538 views tags: configuration php server

I'm trying to configure an application (phpList) and it requires that I enter (in config.php) a username and password for a POP3 account to handle bounces. I keep getting a POP3 error and it can't log (updated 2039 days ago)
Knowledgebase Article 69,786 views tags: list mail php phplist

Why can't I log into my PHP-Nuke based website? (updated 2027 days ago)
Knowledgebase Article 68,475 views tags: nuke php

Why will Entropy not search any php file? (updated 2009 days ago)
Knowledgebase Article 60,115 views tags: php search