Frequent PHP errors
Suppose there is an error in your script and your script is only half or even not at all. Say that your PC does not make a mistake in the script because a computer is never wrong. What should you look at a mistake and how you get the problem? In any event, not a topic on the forum where you display the error and your whole code with the question like "Dissolve this out for me please." so Go look for yourself what the problem might be and if you want you can obviously go to the forum.
What errors are there?
1.Fatal error
Error while running the script. The execution of the script should be stopped.
Quote:
Fatal error: Call to undefined function mysql_connect () in / path / vb.php on line 3
2.Warning
An error during the execution of the script. The fault is not so bad that the script must be stopped.
Quote:
Warning: session_start (): Can not send session cookie - headers already sent by (output started at / path / vb.php: 2) in / path / vb.php on line 3
3.Parse error
A compilation error. This occurs when you use a wrong syntax. The script can not be started.
Quote:
Parse error: parse error, unexpected T_STRING, expecting ',' or ',' in / path / vb.php on line 2
4.Notice
Whether this error is shown is the configuration of your server (details on next page). these are just observations, which could indicate an error, but it does not.
Quote:
Parse error: parse error, unexpected T_STRING, expecting ',' or ',' in / path / vb.php on line 2
As you can see PHP always says what kind of error it is, what is the error, in which file the error occurred and the line where the error occurred.
Note: PHP is not always the correct line number where the error occurred. It is in these cases helpful to the previous and next line of error checking.
Say you get an error
This means that you have a full white screen.
You can then top of your script put the following:
php:
Quote:
<?PHP
error_reporting ( E_ALL );
ini_set ( "display_errors" , "1" );
?>
This ensures that ALL errors and messages on the screen will be printed, so even there are error messages appear that you do not normally see. On a test server can be very useful if you want to clean scripting. It is not recommended it to a production server.
More information about the error_reporting function and how to configure php.ini can be found in the php manual