473,749 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

timeout with php-mssql connection with stunnel

dan
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 locally on the web server and locally on the SQL server
machine.
This means php connects locally to the stunnel port, which then
establishes a secure connection to stunnel on the sql server. There
the data is then transmitted locally to the SQL server.

When the SQL server machine is not responding the connection attempt
times out with the following msg:
Warning: mssql_connect() : Sybase: Client message: Read from SQL server
failed. (severity 78) in /var/www/abc/utils.php on line 283
Warning: mssql_connect() : Sybase: Client message: Login incorrect.
(severity 78) in /var/www/abc/utils.php on line 283
Warning: mssql_connect() : Sybase: Unable to connect in
/var/www/abc/utils.php on line 283

My problem is that the timeout is very high, about three minutes. I
could not reduce this timeout with any parameter like
mssql.connect_t imeout, mssql.timeout, not even max_execution_t ime
would reduce this timeout.
I also tried to reduce the freetds and stunnel timeout, no success.

I assume that this has something to do with stunnel being used beccause
the mssql drive recives the connection response from the local stunnel.

Do you have any idea how I can set the timeout to a value of 10 sec. ?

many thanks!

Dan

Jul 26 '05 #1
0 2213

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
15332
by: Dario | last post by:
I've modify the php.ini the session.gc_maxlifetime to reduce the time of timeout of the session variabiles. But it not seems to go. In fact the session variabile remain also when after the timeout that i've set. Can help me?
1
21267
by: Ralph Freshour | last post by:
Can I adjust the PHP session timeout on my web site? Users are reporting timeout errors when they leave their computer for a period of time and then come back to resume using the site - is there some kind of global session timeout in PHP that I can set? Thanks...
3
2807
by: Craig Storey | last post by:
I have a form where users logged in using sessions can edit articles in a WYSIWYG editor. Some of them take their time and don't like to save their work very often and occassionally the sessions expire and their work goes poof. (I've suggested editing off-line and simply copy+paste but they prefer the editor.) After a lot of searching I've found the main culprit is session.gc_maxlifetime and I can set it longet like... ...
6
16443
by: somaboy mx | last post by:
Hello I need people to be able to complete long text blocks in my cms before their session times out. From the php documentation I gather that ini directive session.gc_maxlifetime would be the one to adjust here. I am on shared hosting, so I can't change the php_ini settings directly. If I use ini_set, should I do that on every page in my cms, or would it suffice to do it on the login page? Or could I do it in a .htaccess file (which...
2
8727
by: Lisa Pearlson | last post by:
Hi, I am wanting to write an internet 'server' program. For ease, I want to use PHP-CLI with XINET super server. XINET communicates with the 'server' program via STDIN/STDOUT. I'm not sure how to communicate with the client this way though.. I can open stdin/out as a file, and use read and write operations, as if it were a regular file.. however, how can I set read timeouts on file read operations?
3
8448
by: hakim | last post by:
Hi NG, I have my own apache server 2.0.54 running with php 4.3.10. I got a little logical problem here about http requests. I have written a small php script which waits for x seconds. Every second it appends the seconds to a file. I expected a timeout after 300 seconds, becouse apache is configured
2
9598
by: hakim | last post by:
Hi NG, I have my own apache server 2.0.54 running with php 4.3.10. I got a little logical problem here about http requests. I have written a small php script which waits for x seconds. Every second it appends the seconds to a file. I expected a timeout after 300 seconds, becouse apache is configured
5
19405
by: Dave | last post by:
Hi All, Can anyone suggest a reliable solution to php redirect?: header("Location: $redir_url"); if the above times out in $timeout seconds header("Location: $alt_redir_url"); Many thanks,
1
3582
by: a.r.austin | last post by:
Hello, I am trying to download a few files one after another from a remote server. Problem is that I don't know how to, or if I am able at all, set a time out for download. I don't want to time out whole script, just a part if file won't download in 2mins then skip to the next one. Previously, I had a Javascript implementation with AJAX, this time I thought of doing it in PHP since PHP has far better array functions, I don't have to do...
0
1532
by: adamalton | last post by:
I'm trying to investigate the way PHP behaves in relation to timeouts and included scripts. PHP seems to do very strange things when scripts that include other scripts timeout, or when the included scripts themselves timeout. Just wondering if anyone else has ever investigated this world of mystery, or if they would like to join me in my quest into the unknown!!....?? It appears that in some cases php will return a completely balnk page...
0
8996
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9254
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8256
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.