?
Solved

Call to undefined function: mssql_connect()

Posted on 2004-09-07
5
Medium Priority
?
9,166 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 2000 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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

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…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

719 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