The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
PHP5 - PHP error reporting is not working...
Discuss PHP error reporting is not working... in the PHP Development forum on Dev Shed. PHP error reporting is not working... PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

February 9th, 2013, 10:54 PM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 12
Time spent in forums: 1 h 44 m 39 sec
Reputation Power: 0
|
|
PHP5 - 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
|

February 10th, 2013, 07:53 AM
|
|
|
|
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.
|

February 10th, 2013, 08:10 AM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 12
Time spent in forums: 1 h 44 m 39 sec
Reputation Power: 0
|
|
Quote: | 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
|

February 10th, 2013, 08:15 AM
|
|
|
|
Not all errors can be shown on the browser window. Fatal errors (such as compiler errors) obviously cannot because PHP ends immediately.
|

February 10th, 2013, 08:18 AM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 12
Time spent in forums: 1 h 44 m 39 sec
Reputation Power: 0
|
|
Quote: | 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
|

February 10th, 2013, 08:18 AM
|
 |
pollyanna
|
|
Join Date: Jul 2012
Location: Germany
|
|
|
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.
|

February 10th, 2013, 08:35 AM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 12
Time spent in forums: 1 h 44 m 39 sec
Reputation Power: 0
|
|
Quote: | 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
|

February 10th, 2013, 08:43 AM
|
|
|
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.
|

February 10th, 2013, 08:46 AM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 12
Time spent in forums: 1 h 44 m 39 sec
Reputation Power: 0
|
|
Quote: | 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
|

February 10th, 2013, 08:46 AM
|
 |
pollyanna
|
|
Join Date: Jul 2012
Location: Germany
|
|
|
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"?
|

February 10th, 2013, 08:49 AM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 12
Time spent in forums: 1 h 44 m 39 sec
Reputation Power: 0
|
|
Quote: | 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
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|