#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    27
    Rep Power
    0

    Question PHP error reporting is not working...


    Greetings every one..

    how are you? hope fine ..

    however. i m not sure if this is right forum or area to post this topic..

    but as i am facing problem..

    at least you could help me to guide me where to get help...

    i have installed ubuntu 12 on virtual box and setup LAMP server..

    it's working good..

    but i am facing a problem.. it's does not showing any php error

    i have changed php.ini to show error but still not showing any error

    so, can any one guide me what is the problem?

    and also how to install cPanel on my ubuntu?

    thanks in advance to all who will participate in my topic..

    best regards
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,349
    Rep Power
    594
    You are probably better off asking this in an Ubuntu forum. However, in general, PHP on Linux systems will put errors in the HTTPD logs (/var/logs/httpd).
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    27
    Rep Power
    0
    Originally Posted by gw1500se
    You are probably better off asking this in an Ubuntu forum. However, in general, PHP on Linux systems will put errors in the HTTPD logs (/var/logs/httpd).
    thanks a lot for your reply sir..

    but i also want to php to show the error on browser window..

    because it's very time consuming to check that folder every time.. to find out the error..

    hope i clear..

    and yes i have asked this question on Ubuntu forums too, but i thought there forum is only about for Ubuntu relates question and as it goes for php issue, that's why i asked here..

    thanks again for your reply
    best regards
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,349
    Rep Power
    594
    Not all errors can be shown on the browser window. Fatal errors (such as compiler errors) obviously cannot because PHP ends immediately.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    27
    Rep Power
    0
    Originally Posted by gw1500se
    Not all errors can be shown on the browser window. Fatal errors (such as compiler errors) obviously cannot because PHP ends immediately.
    thanks again for your reply..

    yes i know that.

    but it does not show any error at all when same php scrpt shows error on browser window when run from my windows server (WAMP)

    hope i m clear..

    best regards
  10. #6
  11. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,957
    Rep Power
    1046
    Hi,

    what exactly in your php.ini have you changed? Please post the exact values. And post the script you use for testing the error messages.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    27
    Rep Power
    0

    Question


    Originally Posted by Jacques1
    Hi,

    what exactly in your php.ini have you changed? Please post the exact values. And post the script you use for testing the error messages.
    thanks for your reply sir:

    here is the php code for testing:
    Code:
    <?php
    	
    	phpinfo()
    	echo "error!'
    
    ?>
    my WAMP server return this error:
    Code:
    Parse error: syntax error, unexpected 'echo' (T_ECHO) in G:\My Documents\Incomedia\WebSite X5 v9 - Evolution\Siam Computer\Preview\dont\t1.php on line 4
    but my LAMP (ubuntu) does not shows any error

    however i am editing this ini file ? hope this is the write one?
    Code:
    sudo gedit /etc/php5/apache2/php.ini
    and i have changed following values:
    Code:
    display_errors = On
    
    error_reporting = E_ALL
    
    display_startup_errors = On
    
    log_errors = On
    i hope i have provided you with enough information..

    best regards
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,349
    Rep Power
    594
    That is a compiler error. You're using mixed quotes and missing the ;.
    PHP Code:
    phpinfo();
    echo 
    "error!"
    Note the use of [ PHP ] tags. See the sticky at the top of this forum.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    27
    Rep Power
    0
    Originally Posted by gw1500se
    That is a compiler error. You're using mixed quotes and missing the ;.
    PHP Code:
    phpinfo();
    echo 
    "error!"
    Note the use of [ PHP ] tags. See the sticky at the top of this forum.
    thanks for your reply

    i m sorry.. but you make me lough.. (please don't mind)

    i know where is the error.. i wrote that code to test whether it is showing.. error or not..

    and as i told my WAMP server shows that error but not my LAMP

    i hope i m clear

    once again.. thanks for your help

    best regards
  18. #10
  19. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,957
    Rep Power
    1046
    The configuration values look good. However, make sure they're actually used, that is, they're neither commented out nor overwritten later. Also make sure this is the right php.ini (the phpinfo() page tells you the configuration file that's used by PHP).

    And don't forget to restart your Apache.

    Just to make sure: Your PHP does work, right? It does display a "Hello world"?
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    27
    Rep Power
    0
    Originally Posted by Jacques1
    The configuration values look good. However, make sure they're actually used, that is, they're neither commented out nor overwritten later. Also make sure this is the right php.ini (the phpinfo() page tells you the configuration file that's used by PHP).

    And don't forget to restart your Apache.

    Just to make sure: Your PHP does work, right? It does display a "Hello world"?
    thanks for your help..

    1. sir, even i have restarted my ubuntu system too.. but don't works

    2. yes php works..

    any help/idea sir?

    best regards

IMN logo majestic logo threadwatch logo seochat tools logo