Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-09-2004, 06:58 AM
|
#1
|
Member
Registered: Apr 2003
Location: Singapore
Distribution: Slackware32/64, Ubuntu, Fedora, RHEL
Posts: 138
Rep:
|
MySQL and MSSQL together?
Can linux (Slack 10, php 4.3.9, apache 1.3.33, MySQL 4.0.20, MSSQL 2000 on w2k machine) support php with mysql and mssql?
My Objective: php file on the Linux web server to be able to access to 2 different databases (MySQL and MSSQL).
I have recompiled my php with this config.
./configure --with-apxs=/usr/sbin/apxs --enable-versioning --with-mssql=/usr/local/freetds --disable-libxml --with-my
sql=shared,/usr
However, when I view the phpinfo(), I did not see mysql support, only mssql.
I managed to connect to MS SQL 2000 server and view the data.
But when I tried to connect to MySQL, I get error saying no such function "mysql_connect ".
I am able to view the MySQL DB using phpMyAdmin.
Any help or suggestion will be greatly appreciated.
|
|
|
12-09-2004, 07:43 AM
|
#2
|
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994
Rep:
|
Re: MySQL and MSSQL together?
Quote:
Originally posted by Manuel-H
./configure --with-apxs=/usr/sbin/apxs --enable-versioning --with-mssql=/usr/local/freetds --disable-libxml --with-my
sql=shared,/usr
|
If you copied and pasted this, then there's your problem; you want --with-mysql (no whitespace between my and sql). Usually, the best thing to do is to run the ./configure script and then look at the output; it will tell you at the end what it's compiling in and what it isn't. The preceeding output tells you how it arrived at those features, with configure.log telling you more detail.
This could be something simple like not having the development packages for mysql installed, or it could be that you need to provide configure with more information, or ensure that versions match.
|
|
|
12-09-2004, 07:46 PM
|
#3
|
Member
Registered: Apr 2003
Location: Singapore
Distribution: Slackware32/64, Ubuntu, Fedora, RHEL
Posts: 138
Original Poster
Rep:
|
MYSQL and MSSQL
The configure statement on my previous messages was actually trucncated when I did a cut and paste.
There was no spaces between "my" and "sql", it was "--with-mysql".
I have checked the config.log and found these two lines.
configure:53086: checking for MSSQL support via FreeTDS
configure:53700: checking for MySQL support
One other questions,
I can only see the mysql.so extension in /usr/lib/php/extensions/
Should I also be getting mssql.so, after compiling it with "--with-mssql"?
|
|
|
12-10-2004, 10:42 AM
|
#4
|
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994
Rep:
|
According to the instructions at http://www.php.net/manual/en/ref.mysql.php you need to give the path to mysql to configure using --with-mysql= path
If you have version 5 of PHP (or later) then you also need to install the mysql client library seperately; you may already have it on your system. Look for a file called libmyqlclient (.so or .a I guess) which should be in a directory called lib. The parent directory of that is path in the above. e.g. if you have /usr/lib/libmyqlclient.so then you want to use --with-mysql=/usr
|
|
|
All times are GMT -5. The time now is 08:43 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|