Solved

Call to undefined function: mssql_connect()

Posted on 2004-09-07
5
9,133 Views
Last Modified: 2011-08-18
This is my problem: Fatal error: Call to undefined function: mssql_connect()

I realise that I have to configure PHP/Apache to work with Mssql, but my attempts to do this have all failed.

My webserver is running on a recent Mandrake distribution. It is Apache 2.0.48 and PHP 4.3.4. If you want to see my phpinfo, look at http://www.quadplex.com/test.php. I am very new to Linux, so doing simple things take a long time. To enable mysql, i installed an rpm. To enable mssql, I have tried the following:

*Installed the following rpm: http://rpm.pbone.net/index.php3/stat/4/idpl/1406112/com/php5-mssql-5.0.1-1mdk.i586.rpm.html. I realised though that this was intended for php5 which may be why it doesnt work.
*Installed http://rpm.pbone.net/index.php3/stat/4/idpl/1398797/com/php432-devel-4.3.8-3mdk.i586.rpm.html. This is intended for php 4.3.2, I have 4.3.4, but I could not find an RPM for this.
*Configured php.ini to include the extension file mssql.so. I know this is the right place to do so, cause when I remove the mysql extension here, mysql stops functioning.

Do I have to recompile Apache or PHP? If so, I have never really done that. Apache and PHP came ready with the Mandrake distribution. I should add that there are many users of my website, so if I have to stop it and recompile it, it has to go fast, in other words I have to know what Im doing.

The reason I want to add mssql is that I want to host another website as well, which connects to an MsSQL database.

Thank you for all your help.
0
Comment
Question by:olbion
  • 2
5 Comments
 
LVL 38

Accepted Solution

by:
yuzh earned 500 total points
ID: 12003612
Please check your php installation.


you need to install "freetds" before complie php.

complie php:

./configure [--with-apxs --with-mysql...] --with-sybase=/usr/local/freetds
make
make install

Just print the following doc, and try again:

http://www.devarticles.com/index2.php?option=content&task=view&id=667&pop=1&page=0&hide_js=1
0
 

Author Comment

by:olbion
ID: 12003682
Thats great, thank you very much.

Just one question, before I compile PHP, do I have to stop the Apache server that is running? Do I have to somehow delete the existing PHP installation?

Could I possibly install a newer version of PHP seperately, and then just tell Apache to use the newer version once it is all setup and working?

Im trying to do this with as little abruption as possible to the existing websites.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 12004415
Backup your apache and php file (tar ball, or tape etc) before  doing the upgrade.

You can keep your webserver running untill you are ready to run :
       make install
for the new version of php

If  you still have the older version of php source code, keep it in case you need it.
also backup httpd.conf file (eg: cp -p httpd.conf httpd.conf.org, in case you need it).

install freetds

You can put the newer version of php in a different dir from your old version,
then run :
         configure
         make

When you are ready to install the newer version of php, stop apache and then
run "make install" then check the httpd.conf to make sure that configuration for
php is correct, if there is any error, fix it, then restart apache.

Good luck!
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

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 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