Solved

Call to undefined function: mssql_connect()

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 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