Enable display_errors In PHP

Enable display_errors For PHP

The web server by default do not have the display_errors turned on for PHP. This is due to the PHP engine by its default behaviour to display out the full physical path of the script that is having error in the error message output. This will cause the script is being exposed to the internet which may cause security threads.

Therefor, the display_errors is disabled.

For Windows

You may turn on the display error in your application by using the init_set() function which you may refer to the tutorials at php.net:

http://my2.php.net/manual/en/function.ini-set.php

For Linux

You may turn it on using either :

  1. Using init_set() in the application OR
  2. Alter the .htaccess file by include the following line:

php_value display_errors 1

  • 0 Kasutajad peavad seda kasulikuks
Kas see vastus oli kasulik?

Related Articles

Safe Mode and open_basedir

Safe ModeThe PHP safe mode is an attempt to solve the shared environment server security problem....

PHP Send Mail (HTML) Script

  Line No Coding 1 2 $to = 'user1@OtherDomain.com' . ','; //Specify...

Enable PHP with Register Globals Turned On

This setting applied to both PHP version 4.x and 5.x. After this tutorials, you will be able to...

PHP increase the session timeout

If you wish to increase the session timeout, you may include the following command line in to the...

Do You Support $_Server['DOCUMENT_ROOT'] ?

$_Server['DOCUMENT_ROOT'] is referring to doc_root value in php.ini which is currently set to...