[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

php script stops

Posted on 2012-08-23
10
Medium Priority
?
531 Views
Last Modified: 2012-08-23
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.
0
Comment
Question by:Richard Korts
  • 5
  • 4
10 Comments
 
LVL 4

Expert Comment

by:ahann87
ID: 38325791
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 ^^
0
 

Author Comment

by:Richard Korts
ID: 38325891
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
0
 

Author Comment

by:Richard Korts
ID: 38325918
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.
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 38326083
Web servers normally have a process time-out also, especially on shared hosting.  They don't want you running continuously so they will shut you down after a while.
0
 

Author Comment

by:Richard Korts
ID: 38326178
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
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38326274
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.
0
 

Author Comment

by:Richard Korts
ID: 38326973
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
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38327002
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.
0
 

Author Comment

by:Richard Korts
ID: 38327155
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.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38327266
This page has links to the Microsoft downloads for the Runtime packages for several version of Visual C++: http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/the-program-cant-start-becuase-msvcr100dll-is/5c9d301a-2191-4edb-916e-5e4958558090
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month19 days, 2 hours left to enroll

834 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