LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Php+Mysql+Apache (https://www.linuxquestions.org/questions/linux-newbie-8/php-mysql-apache-204494/)

SilentK 07-13-2004 10:11 AM

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
Now if I go into the command line and do stuff with php there are no errors at all everything's working fine. Any ideas what's going on here?

mnopq 07-13-2004 03:11 PM

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.

mnopq 07-13-2004 03:22 PM

Sorry, I forgot to mention that you need to copy the PhpInfo.php to your apache's document root.

SilentK 07-14-2004 09:10 PM

Quote:

'./configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2=/usr/sbin/apxs',
I believe it was installed via rpm. One of the things thats stumping me is there is no apxs file in /usr/sbin.
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.

mnopq 07-14-2004 09:51 PM

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.