Organizational Research By

Surprising Reserch Topic

enabling error display in php via htaccess only


enabling error display in php via htaccess only  using -'php,.htaccess,error-handling'

I am testing a website online.

Right now, the errors are not being displayed (But I know they exist).

I have access to only the .htaccess file.

How do i make all errors to display using my .htaccess file

EDIT

I added these lines to my .htaccess:

php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on


and the pages NOW display


  Internal server error

    

asked Sep 16, 2015 by virendra.bajaj
0 votes
9 views



Related Hot Questions

3 Answers

0 votes

.htaccess:

php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_flag  log_errors on
php_value error_log  /home/path/public_html/domain/PHP_errors.log
answered Sep 16, 2015 by sandeep bhadauria
0 votes
php_flag display_errors on

To turn the actual display of errors on.

To set the types of errors you are displaying, you will need to use:

php_value error_reporting 

Combined with the integer values from this page: http://php.net/manual/en/errorfunc.constants.php

Note if you use -1 for your integer, it will show all errors, and be future proof when they add in new types of errors.

answered Sep 16, 2015 by badhwar.rohit
0 votes

If you're talking about PHP errors, simply add this at the top of your script:

error_reporting(E_ALL);

EDIT: If you mean that you cannot edit your script, then you will need to use php_flag inside your htaccess file. See http://perishablepress.com/press/2007/12/17/how-to-enable-php-error-logging-via-htaccess/

answered Sep 16, 2015 by vijaygupta1980

...