Interpreter error messages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
homerwells
Forum Newbie
Posts: 4
Joined: Fri Mar 21, 2003 9:26 am

Interpreter error messages

Post 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.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
Post Reply