• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

NOOB PHP Errors Not Working

DaGeek

New Pleskian
OK,

I've been developing PHP apps since PHP3. Not saying I'm an expert, but I AM seasoned! I have been running my own servers for over 10 years and on every system, I've been able to display and debug using PHP errors.

This is my first PLESK server and I've spent the last couple of days kicking the tires and looking for a solution and am amazed that it has been an issue for a LONG time for others yet I haven't been able to find an answer.

On my new system, according to phpinfo...

Local - Master
error_reporting E_ALL | E_STRICT - 22519
display_errors On - On
display_startup_errors On - On

syntax error on page yields blank page...

Created .htaccess file with these directives:

php_value display_startup_errors On
php_value display_errors On

Still, no display

Here is the actual php script:


syntaxerror here
ini_set('error_reporting', E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR);
ini_set('display_errors', 'On');
ini_set('display_startup_errors', 'On');

error_reporting(E_ALL|E_STRICT);

echo "Error Reporting: " . error_reporting();



Still Nothing....

I REMOVE the syntax error and I get: Error Reporting: 0

I can only conclude that Plesk is somehow disabling the ability to turn ON error reporting.

Now, I understand that displaying errors on a production server is frowned upon... but... I am a developer and I think I should have the right to display errors on my own server if I want to!

PLEASE, someone tell me I'm wrong and how to turn on error reporting! I have no hair left!

OS: Linux 2.6.32-220.13.1.el6.x86_64
Panel: 10.4.4 Update #29

Thanks in advance.
Brian
 
First of all sorry for my english.

I have the same problem:

display_errors set on, error_reporting set to E_ALL, log_error set on into:
- Plesk subscription
- /etc/php.ini
- .htacces file

phpinfo() shows that all these values are correct.

Still have a blank page on a php error like
<?
eco "a";
?>
and, most of all, no errors are logged into /path_to_domain/statistics/error_log

Problem persists after restarting all services (httpd, psa etc.) and running php either as an Apache module, FastCGI or CGI.

I'm really stuck...
 
Disappointed.....

I have to say I am concerned and frustrated about the lack of support for this product. Should I jump ship before I am committed?

Can anyone recommend a different control panel?
 
What about enabling php error_reporting on "PHP Settings" tab of domain settings in Plesk interface?
 
It looks like it's an override of some sort when you create a site in power user mode. I tried to create another service plan and moved my main site to that plan and errors started to pop up (i reverted all the settings to their default state and used only Plesk to configure the site)

I think the issue is somewhere in the dynamic apache2 configuration files loaded by plesk. For instance, if I create a file in /etc/httpd/conf.d/ called zzz-something.conf (so, loaded after the zz010 plesk file) i'm able to override some settings (like open_basedir) by using a

<DirectoryMatch /path_to_my_site> [php directives here] </DirectoryMatch>

It's a workaround, not a solution however
 
VisiantC - THANK YOU! You are the first person to offer anything that had a chance of working. THANK YOU!

I have kicked the tires some more and discovered that running PHP as an Apache Module fails regardless of power user mode.... I CAN get what I want when run as FastCGI and, I assume, CGI.

I suspect your solution will work with "Module", but for those looking for a quick solution - it appears running as CGI will do the trick!

What I don't understand is why Plesk has remained silent on this issue - I've seen literally hundreds of posts on this subject - I know it has cost me a week of my time...

Thanks again VisiantC!
 
Having the same problem

I just got a new RHEL 6.2 server with Parallels Panel 10.4. I haven't done much to it -- I created a "Webspace" as a power user and then under that Webspace I added another domain and FTP'd my PHP files to it. When I load the PHP pages in a web-browser... I get nothing but blank pages and I cannot get PHP errors to display in the browser.

I turned display_errors on and error_reporting to E_ALL & ~E_NOTICE in /etc/php.ini and restarted apache.

Under Hosting Settings for <domain.com> on the PHP Settings tab, I have set error_reporting to E_ALL & ~E_NOTICE, display_errors to on and log_errors to on.

In /var/www/vhosts/<domain>/etc/php.ini, it has display_errors = on and error_reporting = E_ALL & ~E_NOTICE

I put a <?phpinfo();?> PHP page on the domain and it says display_errors is On and error_reporting is E_ALL & ~E_NOTICE

But PHP pages with syntax errors are still completely blank. Errors were being logged to /var/www/vhosts/<domain>/statistics/logs/error_log but at some point during my attempts to fix the PHP error reporting, I broke that functionality and now I can't find the PHP errors being logged anywhere.

I tried setting PHP to run as FastCGI although I would rather not do this, but it didn't work either.

-Extremely Frustrated
 
Fixed!

It took me awhile to figure out what VisiantC meant but today I got it. I completed deleted the default Webspace. Then I created the exact same Webspace and then added this extra domain to it. I've played around with it, changing the error display settings on the PHP Settings tab to default, to on, to off, and they're all working like a charm. Thank you VisiantC!
 
BS openSUSE 11.4
Panel-Version 11.0.9 Update #5

I get new OS. Import all via backup manager from another system.

I don't get .htaccess php error settings to work.

If i change php.ini it would word system wide.

If i try to enable it via Domain Settings with PleskPanel, i can't activate php errors, too.

Before openSuse i use Centos and i need only this:

php_flag display_errors on

in .htacces to displays errors.

Some solution about it?
 
Back
Top