Link to home
Start Free TrialLog in
Avatar of maredzki
maredzki

asked on

htaccess and display_errors not working

Hi Experts!
I am running a VPS on Plesk and have php.ini to globally disable warning/errors in php. However, that server is also used for dev purposes and I cannot seem to get .htaccess to display errors on a dev virtual site. Here are the settings I have:

php - 5.3.14

.htaccess values:
php_flag display_warnings On
php_flag diplay_errors On
php_flag html_errors On
AddType x-mapp-php5 .php

This code generates a blank screen, no errors:
<?php
echo "test"
echo "test2"
?>

Open in new window


The file permissions are 0644 and I have tried putting dummy info in .htaccess which resulted in Internal Error being generated which somewhat proves that it is being read by apache.

If there is any other information needed, please let me know.

Any help greatly appreciated!

Marek
Avatar of Beverley Portlock
Beverley Portlock
Flag of United Kingdom of Great Britain and Northern Ireland image

You also need to enable error reporting. Try this
<?php

error_reporting( E_ALL );
echo "test"
echo "test2"
?>

Open in new window

Also, is .htaccess enabled on that VPS? In your virtualhost or Apache config with

AccessFileName .htaccess

This should work even if .htaccess is disabled

<?php
ini_set( 'display_errors', 1 );
error_reporting( E_ALL );
echo "test"
echo "test2"
?>

Open in new window

http://www.php.net/error_reporting
ASKER CERTIFIED SOLUTION
Avatar of maredzki
maredzki

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maredzki
maredzki

ASKER

Did the research and solution needed to be .htaccess based. One possible solution was provided but was php code based.

Thanks,
Marek