Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,174
    Thanks
    19
    Thanked 66 Times in 65 Posts

    Complete obliteration of errors

    My boyfriend works for a company where its impossible to get any error messages in PHP on their servers. And we have no idea why. He's tried setting the error reporting in the script and in a .htaccess - no errors at all.
    This makes debugging exceptionally difficult as you might imagine.

    So, anyone know how they are doing this and what we can do about it?

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    vB hides them with output buffering. ob_start() at the beginning of the code, ob_end_clean() before outputting the template.

    Check the error settings in the phpinfo() as well.

  • #3
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,080
    Thanks
    2
    Thanked 321 Times in 313 Posts
    Post the lines from the .htaccess file (the php constants E_ALL... are not available in a .htaccess file and cannot be used there.) I assume you are setting both display_errors and error_reporting?

    A web host can specifically allow/prevent any setting in a .htaccess file, so a host could specifically disallow changes to display_errors and error_reporting.

    Edit: Post the lines of code being added to the script as well. Unless there is a fatal parse error, resulting in a blank page, you can modify the error reporting settings at runtime, unless the host has specifically disabled the php commands needed to do so (which is unlikely as it would require disabling both ini_set() and error_reporting().)
    Last edited by CFMaBiSmAd; 08-31-2007 at 02:56 PM.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • Users who have thanked CFMaBiSmAd for this post:

    NancyJ (08-31-2007)

  • #4
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,174
    Thanks
    19
    Thanked 66 Times in 65 Posts
    display_errors = on did the trick! Never had to do that one before.

    They also had AllowOverride None set on the web root.

    He's asked them to change it.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •