Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old February 26th, 2008, 01:04 PM
redherring redherring is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 3 redherring User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 18 sec
Reputation Power: 0
SQL Server - Php mssql connection - Intermittently Connects???

We have created some very simple php pages to see if the code can retrieve data from our SQL Server, and they do successfully query the database and return data, BUT, only about 2 out of 10 times on a browser refresh. The rest of the times we get a "Unable to connect to server: localhost,1433" error.

This, of course, has us very confused. I'd almost rather not be able to connect at all as it would make more sense.

If you are able to provide any insight into what might be happening with our setup, it would be MUCH appreciated. We are running MSSQL 8.00.818, PHP Version 5.2.5, and IIS 6.

Thanks in advance.

Reply With Quote
  #2  
Old February 27th, 2008, 10:52 AM
redherring redherring is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 3 redherring User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 18 sec
Reputation Power: 0
Wow...

mssql_pconnect vs. mssql_connect

The "pconnect" works while just the "connect" doesn't.

While I'd love to know the "why" of it, I am ecstatic for now that things seem to be working.

Reply With Quote
  #3  
Old March 10th, 2008, 07:18 AM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,719 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 4 m 29 sec
Reputation Power: 6
iirc pconnect tries to reuse the connection handles internally while connect creates a new one every time. I would assume your connect is running out of available connections and that is why you can only connect so many times.
__________________
life is a game.... Have fun
-----------------------------
http://www.phpwomen.org
strength in unity

PHPCommunity IRC
#phpc on freenode

Reply With Quote
  #4  
Old March 10th, 2008, 01:12 PM
redherring redherring is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 3 redherring User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 18 sec
Reputation Power: 0
Even mssql_pconnect seems flaky

Hi there -

Thanks for the response.

Even though I have gotten mssql_pconnect to "work" for me, it still appears to provide a less than stable connection. There are significant numbers of times where, on a refresh, the attempt at a connection will fail. This is, naturally, frustrating, and it may cause me to port to a mySQL database in hopes of better reliability.

It just seems unthinkable that I could not reliably establish a connection to an MSSQL database. I know there's a lot of variables, and I've looked into and confirmed many of them, and yet I still have a flaky connection.

Reply With Quote
  #5  
Old April 22nd, 2008, 10:54 AM
m2pc m2pc is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 1 m2pc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 50 sec
Reputation Power: 0
I'm having the same problem, although it seems to have cropped up recently. My database calls are abstracted with my own library, so I even added a "3 tries" algorithm to the connect function, but I still can't connect.

Any ideas? I've heard that PHP still utilizes an ancient DLL to access the SQL server, is this true?

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > SQL Server - Php mssql connection - Intermittently Connects???


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway