Solved

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

Posted on 2011-09-24
3
162 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
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…
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…

685 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