Link to home
Start Free TrialLog in
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

php script stops

I have a php script in which I am trying to update the value of one field for over 100K records.

It ran for approx 20 - 30 minutes & updated about 3600 correctly, then it just stopped.

No error message, just stopped.

I looked at what probably was the SQL Update statement next to be executed; looked OK.

In php.ini, the max_execution_time is 50000. Is that seconds or ??

How can I determine what causes it to stop?

PS - I don't know where the error logs are on the server, I'll try to find out, it's shared hosting at 1 & 1.
Avatar of ahann87
ahann87
Flag of Malaysia image

Hi rkorts,

Here is some information that I think can help u. Try it
http://www.apachelounge.com/viewtopic.php?t=881
http://php.net/manual/en/function.set-time-limit.php

Good luck & hopefully can help u ^^
Avatar of Richard Korts

ASKER

The max execution time in php.ini is currently set to 50000. That's 2/3 of a day or about 17 hours. The script ran for MAYBE 30 minutes.

I'm running it again now. It's been going for about 22 minutes, still going
More info,

I inserted error_reporting(E_ALL); into the php script. I ran it again, it ran for about 22 minutes, processed about 4700 records. then just stopped (again).

No errors from php.

Is there an .htaccess parameter that might be set to around 1200 seconds? Seems like that's what is ending it (the time amount of time).

I suppose I could jury rig the process to do it in pieces like this; what a PAIN.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To DaveBaldwin,

I've never done this before, but I presume there is a way to install both php & MySQL on my local machine (PC running Windows 7)?

Then I could set up the database here, do what I need & copy it back to the web server.

Thanks
You could use WAMP http://www.wampserver.com/en/ or XAMPP http://www.apachefriends.org/en/xampp.html on your machine.  They both include PHP, MySQL, and Apache with some other programs.
To DaveBaldwin,

I was skeptical about this path; look like with good reason.

I went to  http://www.wampserver.com/en/ & download WAMP. I tried to install it, it got ALMOST all the way through, then said the installation failed because MSVCR100.dll was missing; try installing again.

It created the tray icon. I tried to open phpMyAdmin (to start creating my database); it failed, said "Firefox can't establish a connection to the server at localhost".

I deinstalled WAMP, rebooted windows & tried it again. Same result. I used the 64 bit because I'm running Windows 7 64 bit.

Any suggestions?

Thanks
Try the 32-bit version or try XAMPP.  I don't have a 64-bit machine.  I have WAMP and XAMPP running on two different XP machines.
To DaveBaldwin,

32 bit version does the same thing.

If you search that error via Google, there are a lot of references on how to fix it. I'm not sure which to trust, I'll pick one.

I hate skating on unknown ice.