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 89,448 views bookmark tags: php unable (updated 2121 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 1470 days ago)
Knowledgebase Article 144,288 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 2121 days ago)
Knowledgebase Article 58,695 views tags: fantastico php wiki

Script executed with a cron job requires a specific php.ini file to be used. (updated 906 days ago)
Knowledgebase Article 78,178 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 1875 days ago)
Knowledgebase Article 55,365 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 2086 days ago)
Knowledgebase Article 42,904 views tags: create unable wordpress

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

PHP vs PHP single php.ini vs PHP with FastCGI (updated 1165 days ago)
Knowledgebase Article 145,780 views tags: configuration php server

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

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 2133 days ago)
Knowledgebase Article 71,814 views tags: list mail php phplist

Why will Entropy not search any php file? (updated 2102 days ago)
Knowledgebase Article 61,162 views tags: php search

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