Mssql_pconnect function undefined?

Posted on 2003-10-29
Medium Priority
Last Modified: 2013-12-13
I am running a copy of apache and php on a windows machine for testing purposes.  I am trying to connect to a sqlserver 2000 database.  I tried the mssql_pconnect function but I get the error that it is an undefined function.

Is there something I have to change to make this work?  I am used to using mysql but this is the first time I am using php with a sql server database.  Does anyone know why I am getting this error?

Question by:unreal400
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Expert Comment

ID: 9654901
The database you are trying to connect to may have pconnect or persistant connections disabled, so just use mssql_connect instead and it should work.

Author Comment

ID: 9654976
I've tried that but the only way I can seem to get it to work is if I use odbc_connect  instead of the mssql_connect.   I'm not sure why the mssql functions won't let me connect.   I still haven't been able to figure that out.


Expert Comment

ID: 9655014
Why dont you install MYSQL instead of using MSSQL, it is much better and i am sure it will work great, just go here for a good stable version http://www.mysql.com/downloads/mysql-4.0.html and get the windows version with the installer, it makes things alot eaier.

Author Comment

ID: 9655072
Oh trust me I would love to switch to mysql, I do tons of mysql PHP stuff at home and it works great.  The problem is I have to do this for my office and they have a massive mssql database and I'm talking 300 GB of data and they do not want to convert to mysql for several reasons so I have to do this with a mssql backend.

Accepted Solution

aolXFT earned 200 total points
ID: 9696054
You probably don't have the mssql extension installed.

Check a phpinfo() page to see if there is any reference to mssql there(in the extensions section)

If it is commented(has a ; in front of it) uncomment it(remove semicolon);

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question