Php+Mysql+Apache
I have php mysql and apache installed on linux redhat 9. My problem is that there seems to be another version of php running with apache. I have searched the computer and have not found any other versions. I have deleted the libphp4.so file and reinstalled php a bunch of times and nothing seems to be working. What file could be causing this? I wan't to avoid reinstalling apache if possible. My apache version is 2 the php version is 4.2.2 and mysql version is 4. The reason I include mysql in this is becuase if I go into my servers error logs I notice the following PHP
Code:
PHP Warning: Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/libmysqlclient.so.10: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference in Unknown on line 0 |
It appears that your PHP is built with the mysql included, but you don't have the MySql installed.
Create this file (lets name it to PhpInfo.php) with the following: <?php phpinfo(); ?> Then on your webbrowser, type in (provided your apache and what not are are installed): http://localhost/PhpInfo.php This shoud give you your current php configuration, post it here. |
Sorry, I forgot to mention that you need to copy the PhpInfo.php to your apache's document root.
|
Quote:
mysql is definitly installed. The problem I am having is that apache seems to be using a different version of php that I can't find anywhere on the harddrive. Or I suppose something got fouled up. The reason I think apache is using a different version is whenever I make changes with anything relating to php the changes don't seem to get updated in the phpinfo file. I have changed the php version itself and nothing happened. I have moved the libphp4.so file and everything still worked. |
It looked like the php was built with everything under the sun, except the mysql :).
I don't know the version of the apache, but you could check either of these two link for the php installation: version 1: http://www.php.net/manual/en/install.apache.php or version 2: http://www.php.net/manual/en/install.apache2.php I don't know what version of the apache that you are running, but from the --with-apxs2=/usr/sbin/apxs line, the php expects the apache2. So there is one way out, but you take you some times (but hey, this is fun :)) is to rebuild apache 2, mysql and then php (the last), according to the 2nd link's instructions above. From http://dev.mysql.com/downloads/mysql/4.0.html, download the stable version (the stand 4.0.20 is good). Follow the installation, when you do the configure, make sure you do this: ./configure --prefix=/usr/local/mysql This will put your mysql user /usr/local. You could use other place if you prefer. Then when you are ready to ./configure the php, copy everything you have from your previous config (make sure to remove all the single quote ', and add these two: --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql (which assume you build the apache at /usr/local). Note: when you build the apache, make sure you do this: ./configure --enable-so This is telling apache to use the php and mysql's so. In all, study the instructiosn in the php's link above before proceeding. Good luck. |
All times are GMT -5. The time now is 07:02 PM. |