Solved

Call to undefined function: mssql_connect()

Posted on 2004-09-07
5
9,116 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now