Solved

Mssql_pconnect function undefined?

Posted on 2003-10-29
6
636 Views
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?

Kelly
0
Comment
Question by:unreal400
  • 2
  • 2
6 Comments
 
LVL 2

Expert Comment

by:TaintedGod
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.
0
 
LVL 2

Author Comment

by:unreal400
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.

0
 
LVL 2

Expert Comment

by:TaintedGod
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.
0
 
LVL 2

Author Comment

by:unreal400
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.
0
 
LVL 6

Accepted Solution

by:
aolXFT earned 50 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);
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

770 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