?
Solved

Need help turning on PHP logging on windows 2003 server

Posted on 2011-09-14
3
Medium Priority
?
352 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 111

Expert Comment

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

Accepted Solution

by:
Darude1234 earned 2000 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

765 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