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 5 of 5
  1. #1
    New Coder thindrakhya's Avatar
    Join Date
    Jun 2007
    Posts
    90
    Thanks
    8
    Thanked 0 Times in 0 Posts

    php error showing

    hi friends ,


    Initialy i was using php 5.1
    When ever i had any error whether syntax or other
    I got that error in browser and i go to that line and correct that

    Now i have istalled PHP 5.2.2
    i have turned all error on
    But now i am not getting all errors displayed

    whenever there is some error it shows page not found

    Today i checked about 500 lines of code and at last found that there was

    "/"

    put by mistake in some line
    This is very annoying

    Can anyone help me out how to display each and every error


    One thing more
    sometime i use echo("hi")
    without ";"

    and the ouput still don't show any error and displays
    "hi" i dont know how this happens

  • #2
    Regular Coder
    Join Date
    Mar 2005
    Location
    D0u$h!t3 k4?
    Posts
    512
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Maybe try reinstalling?
    PHP Code:
    $hello file_get_contents('hello.txt'); echo $hello
    hello

  • #3
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,007
    Thanks
    2
    Thanked 311 Times in 303 Posts
    Make sure that display_errors = On in php.ini (stop and start your web server to get any changes made to php.ini to take effect.)

    Also, make sure that the php.ini that php is using is the one you are making changes to.

    The current version of php is 5.2.5. Php 5.2.4 had a bug in the error reporting that gave a 500 response page on a fatal parse or runtime error when output buffering was on in php.ini. Are you sure you are using php 5.2.2? This bug was not present before php 5.2.4 and is fixed in php 5.2.5. If using php 5.2.4, either turn off output buffering in php.ini or upgrade to php 5.2.5.

    You can always check your web server log file for php errors.
    Last edited by CFMaBiSmAd; 11-14-2007 at 06:34 PM. Reason: more info
    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.

  • #4
    New Coder
    Join Date
    Nov 2007
    Posts
    61
    Thanks
    0
    Thanked 6 Times in 6 Posts
    in the php code add:

    PHP Code:
    error_reporting(E_ALL);

    ini_set('display_errors'true); 
    this will tell you of any errors that occurr

  • #5
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,007
    Thanks
    2
    Thanked 311 Times in 303 Posts
    Fatal parse errors are only displayed if error reporting is turned on before the script is parsed, in php.ini or a .htaccess file.
    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.


  •  

    Posting Permissions

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