/    Sign up×
Community /Pin to ProfileBookmark

PHP timesout while updating database

Hello

I have a PHP script which reads a SQL file which contains many INSERT statements.
The script iterates through all the statements are executes them.
For some reason, PHP times-out after a while during the execution, before reaching the end of the script.

Is there a timeout configuration that I need to set in order to allow it to run indefinitely (at least until the script finishes executing)?

thanks in advance

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@AdamGundryApr 14.2004 — Yes, PHP will time out if you're script runs on too long. You either need to change [url=http://www.php.net/manual/en/ref.info.php#ini.max-execution-time]max_execution_time[/url] in your php.ini file or call [url=http://www.php.net/function.set-time-limit]set_time_limit()[/url].

Adam
×

Success!

Help @davidklonski spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...