Scripting Error Messages
Error Messages for:
Main Errors PageEmail Error Messages
FTP Error Messages
Database Error Messages
Scripting Error Messages
WebSite Error Messages
This page is sponsored by:
PHP Error Messages
UPLOAD Codes
-
UPLOAD_ERR_OK - the file uploaded with success
UPLOAD_ERR_INI_SIZE - uploaded file exceeds the UPLOAD_MAX_FILESIZE listed in the php.ini
UPLOAD_ERR_FORM_SIZE - uploaded file exceeds the MAX_FILE_SIZE directive specified in the HTML form
UPLOAD_ERR_PARTIAL - uploaded file was only partially uploaded
UPLOAD_ERR_NO_FILE - no file was uploaded
UPLOAD_ERR_NO_TMP_DIR - a temporary folder is missing
UPLOAD_ERR_CANT_WRITE - failed to write file to disk
UPLOAD_ERR_EXTENSION - file upload stopped because of the extension
Look for these Key Clues
-
failed to open stream: No such file or directory - Whatever file is being called, it either does not exist or the pathway to the file was incorrectly entered.
file.php on line xxx - The error being encountered is in file.php specifically on line xxx
Fatal error: Call to undefined function - The function being called is not supported. It may be turned off, commented out, or you may need to upload the library/script for it.
Parse error: parse error, unexpected - Syntax error, usually resulting from a missing semi-colon ; , or close parenthesis ) at the end of the line of code, or from the end of the preceeding line of code. This may also occur if there are whitespaces.
Warning: fsockopen(): unable to connect to - fopen is not enabled. Many hosting companies have closed fopen due to a recent security risk. It is also possible that the DNS for that website can not be found by the internet at this time or it is refusing the connection.
Breaking Down an Error Message:
PHP Warning: fgets(): supplied argument is not a valid stream resource in /root/host3/account/public_html/internet/mrwhois/mrwhois.php on line 440fgets():
This is the function that the code was suppose to perform, but failed to.
supplied argument is not a valid stream resource
This tells us that something is not a valid resource. A resource refers to data being requested. It could be a database or an image or a file. Not a valid resource means that the resource the scriptwas told to access is not being found. Perhaps it was misspelled, no longer exists, or the wrong path was put in.
/root/host3/account/public_html/internet/mrwhois/mrwhois.php
This is the path to the specific file from the root. This error message is on a shared web hosting platform so we start at the account name and work our way through the path.
The file is in the public_html directory.
Inside the public_html directory is a directory called internet.
Inside the internet directory is a directory called mrwhois.
Inside the mrwhois directory is a file called mrwhois.php.
This is where the problem is being encountered.
on line 440
This tells us that the code on line 440 of the specified file is where the problem is. Don't want to count 440 lines of code? Use a text editor such as notepad++ which provides a line counter.
Reading this error message told us that the file being specified on the 440th line of code in a file called mrwhois.php could not be found.
Real Life examples Explained
- Error Message:
PHP Warning: Cannot modify header information - headers already sent by (output started at /htdocs/internet/netquery/nquser.php:10)
What it means:
Headers are being sent more than once. Line 10 in the file nquser.php is sending out another set of headers. This can also be caused by white spaces after or before the opening and closing php tags.
- Error Message:
PHP Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /htdocs/internet/netquery/nquser.php:10)
What it means:
Line 10 in the file nquser.php is trying to send out a second set of headers.
- Error Message:
PHP Fatal error: Allowed memory size of 159863725 bytes exhausted
What it means:
Memory limit was reached. This can be changed in the php.ini file with memory_limit
- Error Message:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /htdocs/internet/netquery/nquser.php on line 29
What it means:
There is a syntax error on line 29 of the file nquser.php. The start and end of echo had a " (double quote), where PHP syntax uses a ' (single quote), instead. A " is only used within the command, ' is to start and end. example: echo ' <a href="howtointernet.net/netquery">Web Tech Page</a>';
- Error Message:
PHP Fatal error: [Zend Optimizer] Zend Optimizer 3.2.0 is incompatible with XCache 1.2.0 in Unknown on line 0
What it means:
The two applications- Zend Optimizer and XCache are either not compatible or incorrectly configured together
- Error Message:
Premature end of script headers: /htdocs/internet/netquery/index.php
What it means:
It is not able to finish reading the headers supplied on the file index.php
- Error Message:
Fatal error: Maximum execution time of 0 seconds exceeded in /htdocs/internet/netquery/index.php on line 51
What it means:
Look to change the max_execution_time = and/or max_input_time = value. 0 can be set for unlimited.
- Error Message:
Warning: main(): Failed opening 'nquser.php' for inclusion (include_path='') in /htdocs/internet/netquery/index.php on line 61
What it means:
The include being called could not be found because it does not exist or could not be opened due to permissions.
- Error Message:
Warning: main(start.php): failed to open stream: No such file or directory in /htdocs/internet/netquery/index.php on line 73
What it means:
Either the file does not exist, or the code has the wrong path to that file. The file it is unable to find is start.php and the line of code defining the path to that file is on line 73 in the file index.php.
- Error Message:
Warning: main(/home/htdocs/internet/netquery/file.php) [function.main]: failed to open stream: No such file or directory in /home/htdocs/internet/netquery/index.php on line 110
What it means:
Again the directory or file being called either does not exist or the pathway to the intended file is not properly set. The requested file to open is file.php the path listed for that file is /home/htdocs/internet/netquery/file.php and the line of code calling that file is on index.php line 110.
- Error Message:
Fatal error: Call to unsupported or undefined function page_open()
What it means:
This usually occurs when using an older version of PHP script. If the PHP support on your server is a newer version, it is not fully backwards compatible much of the syntax has changed. It will also occur when a php function is not supported. It may be set to Off or commented out. You can check by using a phpinfo scipt. <?php phpinfo(); ?> You may also just need to install the library for that function.
- Error Message:
Fatal error: Call to undefined function mysql_connect()
What it means:
The function is not currently installed. The mysql.so extension library does not come with the PHP or MySQL distributions. It must be installed separately.
- Error Message:
Warning: fsockopen(): unable to connect to howtointernet.net in /home/htdocs/internet/netquery/file.php on line 63
What it means:
fopen is not enabled. Many hosting companies have closed fopen due to a recent security risk. It is also possible that the DNS for that website can not be found by the internet at this time or the server being called is refusing the connection. If you have access to your php.ini file check for allow_url_fopen =
- Error Message:
Warning: require() [function.require]: URL file-access is disabled in the server configuration in /home/htdocs/open.php on line 12
What it means:
You do not have permission to the specific URL that is being asked for on line 12 of the file open.php
- Error Message:
Fatal error: require() [function.require]: Failed opening required 'http://howtointernet.com/includes/play.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/htdocs/open.php on line 12
What it means:
fopen is not enabled. Many hosting companies have closed fopen due to a recent security risk. If you have access to your php.ini file check for allow_url_fopen = and allow_url_include =
- Error Message:
Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:25 (Connection timed out) in /home/htdocs/sendmail.php on line 173
What it means:
Port 25 may be closed, many places use a different port for mail servers. The email may not be on localhost (127.0.0.1), it may be on another server. This is especially true of hosting providers that use a server farm type of set up. The mail server may be down/turned off.