[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2011-09-24
3
Medium Priority
?
179 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
[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 84

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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
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.
Suggested Courses

650 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