By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,840 Members | 2,338 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,840 IT Pros & Developers. It's quick & easy.

Change timeout for mssql queries ?

P: n/a
I'm trying to execute a long query with mssql_query(), but it fails after 30 seconds.

I've tried to use ini_set in my script :
ini_set("mssql.timeout", "120");
Both just before the query and before the connection is initiated.

I've tried to add this to php.ini :
mssql.timeout = 120

But nothing seems to work, mssql_query() in the script still fails after precisely 30 seconds.

Please advise.

--
Best regards
Lars V. Nielsen
Denmark


Jul 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
KAH
"Lars Nielsen" <la**********@get2net.dk> wrote in
news:3f***********************@dread16.news.tele.d k:
I'm trying to execute a long query with mssql_query(), but it fails
after 30 seconds.

I've tried to use ini_set in my script :
ini_set("mssql.timeout", "120");
Both just before the query and before the connection is initiated.

I've tried to add this to php.ini :
mssql.timeout = 120

But nothing seems to work, mssql_query() in the script still fails
after precisely 30 seconds.


Sounds like you're actually encountering the script runtime timeout. Try
set_time_limit (120);

KAH
Jul 16 '05 #2

P: n/a
Does this mean that there aren't any specific timeout setting for mssql ?

Is the "mssql.timeout" actually setting not used at all ?

Best regards
Lars V. Nielsen

"KAH" <ka*@kahnews.cjb.net> wrote in message news:Xn**********************************@193.213. 112.19...
"Lars Nielsen" <la**********@get2net.dk> wrote in
news:3f***********************@dread16.news.tele.d k:
I'm trying to execute a long query with mssql_query(), but it fails
after 30 seconds.

I've tried to use ini_set in my script :
ini_set("mssql.timeout", "120");
Both just before the query and before the connection is initiated.

I've tried to add this to php.ini :
mssql.timeout = 120

But nothing seems to work, mssql_query() in the script still fails
after precisely 30 seconds.


Sounds like you're actually encountering the script runtime timeout. Try
set_time_limit (120);

KAH

Jul 16 '05 #3

P: n/a
KAH
"Lars Nielsen" <la**********@get2net.dk> wrote in
news:3f***********************@dread16.news.tele.d k:
Does this mean that there aren't any specific timeout setting for
mssql ?

Is the "mssql.timeout" actually setting not used at all ?


Probably used for either the connection, or something like that. Check the
manual. The runtime timeout will override other settings anyway.

KAH
Jul 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.