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
Apache Web ServerPHPLinux

Avatar of undefined
Last Comment
maredzki

8/22/2022 - Mon
Beverley Portlock

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
maredzki

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
maredzki

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

Thanks,
Marek
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy