473,405 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Change timeout for mssql queries ?

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
3 20890
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: badz | last post by:
Hi frenz Lately I try to use MSSQL and PHP , the problem arise when PHP try to read MSSQL field with 'image' data type, header("Content-type: image/jpeg"); // act as a jpg file to browser I...
1
by: Robert Oschler | last post by:
I want to change the time it takes the browser to timeout before producing a 404 error on one of my web pages. I want to do it before I set the SRC attribute of an IFRAME on the page, and change...
1
by: tonci.tomic | last post by:
I have windows service running on win2000 and client applications on local network connected to service via remoting. Service acts as interface to MSSQL 2000 database and it uses Microsoft Data...
0
by: dan | last post by:
Hi, I connect to a microsoft SQL server from php. Php is running on linux (debian sarge) with the freetds package. The connection is secured through stunnel (version 3.26), with stunnel running...
1
by: Roger | last post by:
I've got a filter form to select customers, products, etc and these are used in parameter queries, ie WHERE t_cuno Like !! the parameter queries, roll up to a crosstab query, that is used to...
4
by: Mikael Janers | last post by:
Hello! I have a question that is not realy only C# but I didn't find any better group... What is the most common/best way to handle sql queries in C# 1) Should I use stored procedures ? I...
4
by: ThePhenix | last post by:
Hi everybody, I have recently been doing a conversion for my boss for a access 2000 database (both front and backend) to a MSSQL backend. I finished the conversion today (as quite a lot of the...
1
by: stubailey | last post by:
Hi, I am having real problems with timeout on queries when I specify a server and database name. i.e. INSERT .. SQLSERVER1.DATABASE1.DBO.TABLE1 SELECT .... FROM SQLSERVER1.DATABASE1.DBO.TABLEX ...
3
by: buntyindia | last post by:
Hi DB2 Gurus, I have a application that using MSSQL database . Now we have to migrate to DB2. I have all the queries. Guide me how to make the MSSQL queries compatible to DB2 is there any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.