PHP Errors Glossary
Joel Philip on 2002 June 10
Joel Philip on 2002 June 10
Errors: what do they all mean? Starting out in any type of language can be frustrating. Some are easier then others but no one escapes the dreaded errors. I will try to unravel the mystery of some of the common errors regarding PHP and what can be the probable cause
.PHP Related Errors
Text of the file is displayed in the browser window ...
Probable Cause:
1. The .php extension might not be present on the name of your file. Therefore, it's being parsed like regular HTML.
2. Problem with php.ini file or its contents.
3. Page is being displayed from your local file system instead of from the server.
Server or host not found ...
Probable Cause:
1. Your server has DNS conflicts.
2. Your database server is not running.
Page cannot be found ...
Probable Cause:
1. You may have specified the wrong directory in the page's full name.
2. Page has wrong extension.
Page is blank ...
Probable Cause:
1. PHP engine has problem parsing code that has HTML associated with script.
2. HTML closing tag might be missing.
3. PHP module might not be working or PHP is not installed.
Page loads as if you are downloading a file from the server ...
Probable Cause:
1. Server is not configured to handle file type or extension, .php.
Include or required file error ...
Probable Cause:
1. Location of the include or required file has not been designated or specified.
PHP code shows up in browser ...
Probable Cause:
1. Code not placed between the PHP tags.
Variable values do not show up ...
Probable Cause:
1. Variable dollar sign "$" is not present.
2. Variable names are case-sensitive
Parse Errors ...
Probable Cause:
1. Missing semicolon ";"
2. Missing dollar signs "$"
3. Missing curly brackets "{"
4. Missing parentheses "("
5. Quotes are not escaped ""
6. Missing include or required files
Server Errors ...
Probable Cause:
1. Page does not have read permissions.
Function Errors ...
Probable Cause:
1. Syntax of function is invalid.
2. Function is undefined.
3. Function does not exist.
4. Wrong usage of builtin functions.
5. User-defined functions do not produce warnings by default.
Missing include files ...
Probable Cause:
1. Path of include files not correct.
Page takes forever to load or browser times out ...
Probable Cause:
1. Internet congestion.
2. Heavy load on your server.
3. Coding has an infinite loop.
I hope this guide enables you to diagnose some of your coding problems. It will help you to become a better programmer and take the frustration out of learning PHP.
Joel
