Quantcast
Channel: Linkses Network | Category Archives: Programming
Viewing all articles
Browse latest Browse all 2

.htaccess, Debugging PHP errors

$
0
0

.htaccess will help you to solve PHP Server problems

A lot of times we find that when you publish your projects in a servers, the webpage dont load or load only a part. If this happen probably you have any PHP error in the code.

To know more details about these problems, we can show the errors by .htaccess

What is .htaccess?

.htaccess is a file that you can create in any folder, normally you must include it in the default website route, in this file you can modify the server configuration parameters. Normally this file is used in Apache servers, if you use other server you would have to investigate about it.

What do I have to include in the .htaccess file?

php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on

You can include aditional parameters to modify the current params, for example, if you dont want show errors in webpages, but you want know what errors are and save them in a file, you can include the next lines:

php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
# Enable log erros function
php_flag log_errors on
php_value error_log /home/path/public_html/domain/errors.log


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images