Solved

PHP on Windows - how to log when a script is timing out

Posted on 2011-09-24
3
148 Views
Last Modified: 2012-05-12
I have a php application that I did not write that is running on my server (IIS on Windows 2003 Server).  I suspect that I am having a php timeout issue, but am not sure.  Is there a way to know for certain that a timeout is occurring?  Can this be written to the log file?  If so, how?

I just need some clear confirmation that what I am seeing is a php timeout.
0
Comment
Question by:sah18
3 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36594128
I suggest you click on "Request Attention" and get the IIS web server zones added.  The timeout message may or may not tell you what timed out.  The IIS log should.
0
 
LVL 13

Expert Comment

by:themrrobert
ID: 36594196
If you find the php installation directory, look in the directory for error.log  update this log file.

This log file is very detailed on showing php errors and should help get you on track
0
 
LVL 7

Accepted Solution

by:
kshna earned 500 total points
ID: 36595256
check for register_shutdown_function

http://php.net/manual/en/function.register-shutdown-function.php

write a shutdown function to log all the errors and warnings....  like this. .. .
register_shutdown_function('logErr');
function logErr(){
$path_to_logfile = "/tmp";
error_log("<br>".print_r(error_get_last(),true),3,$path_to_logfile);
}

Open in new window


hope it helps
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

929 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