Solved

Call to undefined function: mssql_connect()

Posted on 2004-09-07
5
9,155 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
[X]
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
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

Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

Question has a verified solution.

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

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

624 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