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. |
Re: MySQL and MSSQL together?
Quote:
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. |
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"? |
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 07:24 AM. |