Page 1 of 1

Interpreter error messages

Posted: Fri Mar 21, 2003 9:26 am
by homerwells
I've recently installed PHP on Windows 2000, under an Apache Server, and using MySql. Even though I think the language is terrific, I find it impossible to program in it, since it doesn´t show me any kind of message regarding errors the interpreter finds in my code when I execute it. Does anyone know how to enable this functionality?
Thanks,
Jorge Leonardo.

Posted: Fri Mar 21, 2003 9:28 am
by twigletmac
You probably just need to edit your php.ini (in C:\WINNT\) and change this line:

Code: Select all

display_errors = Off
to

Code: Select all

display_errors = On
Mac

Posted: Fri Mar 21, 2003 9:30 am
by volka
take a look at your php.ini. You will find
; error_reporting is a bit-field. Or each number up to get desired error
; reporting level
...
error_reporting = E_ALL

...
; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = Off

; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed. It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = Off

; Log errors into a log file (server-specific log, stderr, or error_log (below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = On

; Set maximum length of log_errors. In error_log information about the source is
; added. The default is 1024 and 0 allows to not apply any maximum length at all.
log_errors_max_len = 1024

; Do not log repeated messages. Repeated errors must occur in same file on same
; line until ignore_repeated_source is set true.
ignore_repeated_errors = Off
change those values to your convenience.

Posted: Fri Mar 21, 2003 9:41 am
by twigletmac
homerwells wrote:Thanks a lot for the help. I've changed the line in php.ini, but the messages are still not being displayed. Any other ideas?
Thnaks.
Jorge Leonardo.
Hi, I think you hit the new topic rather than the reply button so I've deleted the new topic and quoted what you posted because otherwise this is going to get confusing.

Mac

Posted: Fri Mar 21, 2003 10:26 am
by volka
if php is installed as module you have to restart the server-software.
Also make sure you have changed the right php.ini

Code: Select all

<?php phpinfo(); ?>
will tell you which php.ini is used and what values the parameters have.