1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

NOOB PHP Errors Not Working

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by DaGeek, May 9, 2012.

  1. DaGeek

    DaGeek New Pleskian

    11
     
    Joined:
    May 9, 2012
    Messages:
    15
    Likes Received:
    0
    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
     
  2. VisiantC

    VisiantC Guest

    0
     
    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...
     
  3. DaGeek

    DaGeek New Pleskian

    11
     
    Joined:
    May 9, 2012
    Messages:
    15
    Likes Received:
    0
    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?
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,576
    Likes Received:
    1,244
    Location:
    Novosibirsk, Russia
    What about enabling php error_reporting on "PHP Settings" tab of domain settings in Plesk interface?
     
  5. VisiantC

    VisiantC Guest

    0
     
    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
     
  6. DaGeek

    DaGeek New Pleskian

    11
     
    Joined:
    May 9, 2012
    Messages:
    15
    Likes Received:
    0
    Thanks for the reply Igor... Yes, that was done - too.
     
  7. DaGeek

    DaGeek New Pleskian

    11
     
    Joined:
    May 9, 2012
    Messages:
    15
    Likes Received:
    0
    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!
     
  8. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,576
    Likes Received:
    1,244
    Location:
    Novosibirsk, Russia
    Where can I see you detailed report according to http://forum.parallels.com/showthread.php?t=106113 ?
     
  9. TammyG

    TammyG Guest

    0
     
    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
     
  10. TammyG

    TammyG Guest

    0
     
    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!
     
  11. Wikibear

    Wikibear Regular Pleskian

    18
    85%
    Joined:
    Dec 11, 2011
    Messages:
    100
    Likes Received:
    0
    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?
     
  12. Wikibear

    Wikibear Regular Pleskian

    18
    85%
    Joined:
    Dec 11, 2011
    Messages:
    100
    Likes Received:
    0
    After hours of searching i have found a working solution:

    http://kb.parallels.com/en/124

    Allowoverride All must be active that htaccess php errors work.

    After this few lines in this special conf it will work now!
     
Loading...