NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
SRV Local Web Server stops running PHP script after 3 minute


Joined: 27 Nov 2007
Posts: 12
Reply with quote
Been using PhpEd for years now. Love it. Use the remote debugger on our FreeBsd servers running Apache and Apache2, all works great. Recently, because of multiple programmer collaboration, we've been using the local SRV web server to run our scripts - needed to because we're all working in common scripts, so if one uploads a change, another may lose code, etc. It's all been good. All our code runs in PHP, little to no HTML. PHP script is called via a GET url, runs to completion, returns a small XML document back to the browser (or calling application). MySQL DB is our backend, with also works just great with PHP and our PhpEd environment.

So, my problem: if a script happens to take longer than 3 minutes ( 180 seconds ), it seems that the SRV Local Web Server just stops the script in it's tracks. Our MySQL connections are cleanly dropped. Nothing is logged in the SRV logs. This happens regardless of whether we run the script in the debugger or just flat out without debugging.

If/when we go back to running the scripts on the remote server (HTTP Mode (3rd Part Web Server) ...which happens to be an Apache web server running on FreeBSD, the script is allowed to run to completion, which may be 5-10 minutes.

No comments on the long running time, please... it is reasonable and acceptable for what we're doing. I can assure you.

Is there a configuration file, with a configurable option that I can set or change to increase the amount of time that our scripts can run while under the control of the SRV Local Web Server (the one provided by NuShphere with PhpEd)?

Thanx, in advance, for any and all help anyone can provide.

With or without a solution to this issue, we at WHI Solutions, Inc. absolutely love PhpEd and eagerly look forward to more years of it.
View user's profileFind all posts by blairwagSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Just to get the obvious out of the way first: I presume that the PHP time limit has been correctly modified, either with set_time_limit() or directly using max_execution_time in the .ini?
Given the fact that the default is 30 seconds and your script already runs 3 minutes I assume it is but this will probably be the first question anyone else will ask.
View user's profileFind all posts by BlizzSend private messageVisit poster's website


Joined: 27 Nov 2007
Posts: 12
Reply with quote
First of all, THANK YOU, for reading my post, considering my problem, and for taking the time to respond.

You pose a good question. I can confirm your assumption. Yes, we use the PHP function to set the maximum execution time to unlimited (0) and we use the PHP function to prevent a client disconnect from causing the script to abort.

set_time_limit(0);
ignore_user_abort(TRUE);

These are among the first statements executed in our scripts.

Also note, that when the Apache server runs our scripts on the remote application server (a FreeBSD box) our scripts run well beyond the 3 minute mark, and run to completion - even if we're debugging using the PhpEd remote debugger! It's only when we run the scripts locally using the SRV Local Web Server provided with PhpEd that we find our scripts stop running at exactly the 180 second mark. Now, that's not to say that our php.ini file could be different between the FreeBSD machine and our local windows PC. But, we've looked high and low for a setting to extend this 3 minutes. ...to no avail. Sad
View user's profileFind all posts by blairwagSend private message


Joined: 27 Nov 2007
Posts: 12
Reply with quote
I wonder if I should also provide some information pertaining to the version of Phped we're using.

NuSphere PhpEd 4.6.3. (Build 4633)
PHP Debug Listener, version 3.1.7.
Srv Local WEB server File Version 4.6.3.4633

...and, our scripts are running under PHP5, supplied with PhpEd:
php-cgi.exe File Version 5.1.6.6.
View user's profileFind all posts by blairwagSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
The only thing I can think of besides the php timeout is that its a built in limit of the SRV itself.
Perhaps you should try to contact support and query them about that?
Anyway if this were the case it would make the SRV rather pointless as you'd need to finish your debugging session in 3 minutes. On the other hand, it was never really developed as a full blown webserver.
If you find no solution you could just download a wamp server and use that. Most of them require little to no setup. I like Z:WAMP for example for my laptop, as I can't use my CentOS servers when I'm not connected to my home network.
View user's profileFind all posts by BlizzSend private messageVisit poster's website


Joined: 27 Nov 2007
Posts: 12
Reply with quote
Yeah. We basically accepted the fact that it was probably a built in limitation. We left it at that exactly with the understanding that the SRV was not supposed to be a full blown web server, just like you said. But, I'll check with support and see if they have any magic. And, I'll look into WAMP as well. That's a great tip. Thanx!
View user's profileFind all posts by blairwagSend private message
SRV Local Web Server stops running PHP script after 3 minute
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic