php error reporting problem
php error reporting problem
am 28.03.2006 19:25:21 von ngwarai zed
------=_Part_16528_7746709.1143566721631
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
hi, I omitted a semicolon ; at the end of a php statement on purpose to see
what the error looks like. I ran the script and a blank page jus came
out.Noerror message. I then edited
php.ini and set Display_errors =3D On and errror_reporting =3D E_ALL then
restarted httpd. Ran the script again and the same thing happens. My
question is:- how do I make php to show me a simple error like omitting a
semicolon
------=_Part_16528_7746709.1143566721631
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
hi, I omitted a semicolon ; at the end of a php statement on purpose to
see what the error looks like. I ran the script and a blank page jus
came out.No error message. I then edited php.ini and set Display_errors
=3D On and errror_reporting =3D E_ALL then restarted httpd. Ran the script
again and the same thing happens. My question is:- how do I make php to
show me a simple error like omitting a semicolon
------=_Part_16528_7746709.1143566721631--
Re: php error reporting problem
am 28.03.2006 21:30:02 von Jason Minion
Check the apache error log.
=20
Jason
=20
________________________________
From: pgsql-php-owner@postgresql.org
[mailto:pgsql-php-owner@postgresql.org] On Behalf Of ngwarai zed
Sent: Tuesday, March 28, 2006 11:25 AM
To: pgsql-php@postgresql.org
Subject: [PHP] php error reporting problem
hi, I omitted a semicolon ; at the end of a php statement on purpose to
see what the error looks like. I ran the script and a blank page jus
came out.No error message. I then edited php.ini and set Display_errors
=3D On and errror_reporting =3D E_ALL then restarted httpd. Ran the script
again and the same thing happens. My question is:- how do I make php to
show me a simple error like omitting a semicolon=20
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Re: php error reporting problem
am 28.03.2006 22:47:40 von Christopher Murtagh
> hi, I omitted a semicolon ; at the end of a php statement on purpose to
> see what the error looks like. I ran the script and a blank page jus
> came out.No error message. I then edited php.ini and set Display_errors
> = On and errror_reporting = E_ALL then restarted httpd. Ran the script
> again and the same thing happens. My question is:- how do I make php to
> show me a simple error like omitting a semicolon
That should do it. Maybe php didn't like the uppercase 'D' or the
misspelling of 'errror_reporting'(although I assume that's just a typo
in the email and not your config)? Try setting 'display_errors = On;'
instead of 'Display_errors' and see if that works for you. Jason's
suggestion to look at the apache logs should work as well.
Cheers,
Chris
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
Re: php error reporting problem
am 28.03.2006 23:50:36 von operationsengineer1
--- ngwarai zed wrote:
> hi, I omitted a semicolon ; at the end of a php
> statement on purpose to see
> what the error looks like. I ran the script and a
> blank page jus came
> out.Noerror message. I then edited
> php.ini and set Display_errors =3D On and
> errror_reporting =3D E_ALL then
> restarted httpd. Ran the script again and the same
> thing happens. My
> question is:- how do I make php to show me a simple
> error like omitting a
> semicolon
>=20
i use apache and php as cgi on winxp. i've never been
able to get the errors to print to the screen.
however, i still get to see my errors by using an ide.
eclips with the php plugin will display errors when
configured correctly.
i use php designer 2005 (2006 beta is available) and
the ide will display my errors when i run the script
from within the ide.
good luck.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Re: php error reporting problem
am 29.03.2006 15:38:46 von ngwarai zed
------=_Part_806_1949902.1143639526799
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
I checked the apache error log and the error is written there just as I
expected like below.
[client 127.0.0.1] PHP Parse error: parse error, unexpected T_STRING,
expecting ',' or ';' on line 90, referer: http://localhost/form.html
The problem is I know what the error is. What I want is for the error to be
shown when I run the script not to be just written to the error log. I trie=
d
changing display_errors =3D On and error_reporting =3D On in php.ini , rest=
arted
httpd but when I check with phpinfo() I still see display_errors set to Off
and error_reporting set to 2047. My php script still does not show any
errors. Why are my changes to php.ini not refrlected when I run phpinfo() ?
Where am I getting it all wrong?
Display_error and errror_reporting were a typo. I wrote these correctly
while editing php.ini. I mean I wrote display_errors and error_reporting.
Thanks in advance
------=_Part_806_1949902.1143639526799--
Re: php error reporting problem
am 29.03.2006 16:52:02 von Christopher Murtagh
On Wed, 2006-03-29 at 16:38 +0300, ngwarai zed wrote:
> I tried changing display_errors = On and error_reporting = On in
> php.ini , restarted httpd but when I check with phpinfo() I still see
> display_errors set to Off and error_reporting set to 2047. My php
> script still does not show any errors. Why are my changes to php.ini
> not refrlected when I run phpinfo() ? Where am I getting it all wrong?
Here are the things I would try (I'm assuming Linux/Apache setup):
1) verify that there aren't any typo's that are causing fatal problems
in your php.ini
2) look at the output of phpinfo() and verify the location of the
php.ini script. Default locations on *nix systems can
be /usr/local/lib/php.ini or /etc/php.ini depending on how PHP was
built. You might be modifying the wrong file (I've done that more than
once).
3) check your apache config, see if there's anything that might be
overriding your setup.
4) check your script for any ini_set() function calls that might be
changing display_errors.
Cheers,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: php error reporting problem
am 29.03.2006 17:25:37 von ngwarai zed
------=_Part_2954_301945.1143645937687
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Thanks Christopher for your help. I followed you numbered advicestep by
step.
1) I verified that there weren't any typo's that were causing fatal problem=
s
in my php.ini
2) looked at the output of phpinfo() and verified the location of the
php.ini script. /etc/php.ini .This is the file I am modifying
3) checked my apache config, could not see anything that might be
overriding my setup.
4) checked my script for any ini_set() function calls that might be
changing display_errors. I did not use any ini_set() functions
But still the problem is not solved. Just to recap on the problem: I just
want the deliberate php errors Imake to shown as errors on the php page whe=
n
the script runs.
Thanks in advance
On 3/29/06, Christopher Murtagh wrote:
>
> On Wed, 2006-03-29 at 16:38 +0300, ngwarai zed wrote:
> > I tried changing display_errors =3D On and error_reporting =3D On in
> > php.ini , restarted httpd but when I check with phpinfo() I still see
> > display_errors set to Off and error_reporting set to 2047. My php
> > script still does not show any errors. Why are my changes to php.ini
> > not refrlected when I run phpinfo() ? Where am I getting it all wrong?
>
> Here are the things I would try (I'm assuming Linux/Apache setup):
>
> 1) verify that there aren't any typo's that are causing fatal problems
> in your php.ini
>
> 2) look at the output of phpinfo() and verify the location of the
> php.ini script. Default locations on *nix systems can
> be /usr/local/lib/php.ini or /etc/php.ini depending on how PHP was
> built. You might be modifying the wrong file (I've done that more than
> once).
>
> 3) check your apache config, see if there's anything that might be
> overriding your setup.
>
> 4) check your script for any ini_set() function calls that might be
> changing display_errors.
>
> Cheers,
>
> Chris
>
>
>
>
------=_Part_2954_301945.1143645937687--
Re: php error reporting problem
am 29.03.2006 20:06:51 von Christopher Murtagh
On Wed, 2006-03-29 at 18:25 +0300, ngwarai zed wrote:
> But still the problem is not solved. Just to recap on the problem: I
> just want the deliberate php errors Imake to shown as errors on the
> php page when the script runs.
Yes, that should be the normal behaviour. Check your error_reporting
setting. It should be one of the following (see below).
The most common would be:
error_reporting = E_ALL
If this still doesn't work, try the default php.ini.dist and copy it
over your php.ini.
Cheers,
Chris
------------- error_reporting values -------------
; reporting level
; E_ALL - All errors and warnings (doesn't include E_STRICT)
; E_ERROR - fatal run-time errors
; E_WARNING - run-time warnings (non-fatal errors)
; E_PARSE - compile-time parse errors
; E_NOTICE - run-time notices (these are warnings which often result
; from a bug in your code, but it's possible that it was
; intentional (e.g., using an uninitialized variable and
; relying on the fact it's automatically initialized to an
; empty string)
; E_STRICT - run-time notices, enable to have PHP suggest changes
; to your code which will ensure the best interoperability
; and forward compatibility of your code
; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
; initial startup
; E_COMPILE_ERROR - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR - user-generated error message
; E_USER_WARNING - user-generated warning message
; E_USER_NOTICE - user-generated notice message
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php