[SOLVED] - Client and Server Interaction Timeout Rules

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

[SOLVED] - Client and Server Interaction Timeout Rules

Post by anjanesh »

Is it necessary that some output has to be given after a certain period of time ?
My script was running thats taking some 2 hrs which worked for all the values I entered till now. But the one after that - it was running but all of a sudden it just stopped - FF shows Done in the status bar. No Error, Warning, Notices etc ? Im not able to find a problem in the code because for the prev 50+ values it ran ok. A flush() takes place to show the progress. But for one particular value it just stopped in the middle.

I have set
error_reporting(E_ALL);
set_time_limit (0);

How is interaction b/w client and server ? When does Apache stops execution of the script ?

Thanks
Last edited by anjanesh on Fri Jun 03, 2005 1:30 am, edited 1 time in total.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Yeah this is alos a PITA with phpMyAdmin ad it's facility to insert data from a large dump.

The PHP will go forever but IE (? maybe it's apache i dunno) doesn't like the long silence.

Why do you need to run a task that takes 2 hours from a browser? :?

Use the command line instead :idea:
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Using FF to run this task.
Why do you need to run a task that takes 2 hours from a browser?
Crawling a site and exracting data.

How would I use the command line on the server ? Telnet ? If so how ?

Thanks
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

More info on cmd-line usage.

I'd also recommend reading up on applying 'cron job'.Do a search on this forum and google for more help if needed. Also had this link in storage.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

anjanesh wrote:Using FF to run this task.
Why do you need to run a task that takes 2 hours from a browser?
Crawling a site and exracting data.

How would I use the command line on the server ? Telnet ? If so how ?

Thanks
Does your host not provide shell access? If they don't they probably at least provide CRON via CPanel or something.

CRON will simply run the task in the CLI.

Seriously, dont use a browser for a 2 hour task 8O

Hope that helps.
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Im pretty sure host provides shell access - my client's server is a dedicated one.
I entered SSH (as shown in Plesk) where I typed php -v in bash and it showed Bad Command. Though php -v is working on my PC.
How do login using telnet ? I think thats a lot easier instead of this Java-based SSH console.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

they probably wont' allow telnet

use putty
Post Reply