Solved

Need help turning on PHP logging on windows 2003 server

Posted on 2011-09-14
3
338 Views
Last Modified: 2013-12-13
I have PHP 5 installed on a Windows 2003 Server.  For some reason, I'm having difficulty getting the error logging turned on.  Can someone lead me through the steps to:
1. Turn on PHP error logging on Windows
2. Verify that the logging is working
3. Also, in particular, I am having issues with PHP send mail not consistently sending, and I'm trying to find out why.  Where/how can I see any errors related to email sending?
0
Comment
Question by:sah18
3 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 36538772
Can you please post your php.ini file?  Thanks.
0
 
LVL 8

Accepted Solution

by:
Darude1234 earned 500 total points
ID: 36539287
You can set error logging using the following parameter in the php.ini:
log_errors = On

Open in new window


Furthermore you can set how to log the errors (ex. in a log-file or the Windows System Log).
This can be set using the following parameter in the php.ini:
error_log = php_errors.log

Open in new window

or
error_log = syslog

Open in new window


Also the type of logging can be set, for example: All errors, or only the errors that are critical for the script to function properly.
The can be set using the following parameters in the php.ini:
error_reporting = E_ALL & ~E_STRICT
display_errors = On

Open in new window

See also this and this page for more information about error reporting in php.

If the e-mail functions are php-functions you'll see e-mail errors in your screen, but it depends on how the script is configured:
1) If the script itself it configured to turn off error_reporting then it still won't display errors
2) If the script itself has it's own mailfunctions without error handling it won't display errors
and there are probably numerous of other senarios that I have not mentioned.
0
 
LVL 9

Author Closing Comment

by:sah18
ID: 36546729
This is very helpful.  Thank you!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now