Linux - SoftwareThis 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.
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.
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.
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.
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"?
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.