LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-13-2004, 10:11 AM   #1
SilentK
LQ Newbie
 
Registered: May 2004
Distribution: Gentoo
Posts: 24

Rep: Reputation: 15
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?
 
Old 07-13-2004, 03:11 PM   #2
mnopq
LQ Newbie
 
Registered: Jul 2004
Posts: 19

Rep: Reputation: 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.
 
Old 07-13-2004, 03:22 PM   #3
mnopq
LQ Newbie
 
Registered: Jul 2004
Posts: 19

Rep: Reputation: 0
Sorry, I forgot to mention that you need to copy the PhpInfo.php to your apache's document root.
 
Old 07-14-2004, 09:10 PM   #4
SilentK
LQ Newbie
 
Registered: May 2004
Distribution: Gentoo
Posts: 24

Original Poster
Rep: Reputation: 15
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.
 
Old 07-14-2004, 09:51 PM   #5
mnopq
LQ Newbie
 
Registered: Jul 2004
Posts: 19

Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache _ php +mysql rmocius@auste.e Slackware 0 03-02-2004 09:49 AM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM
Apache+Mysql+php c0c0deuz Linux - Software 0 08-14-2003 02:14 PM
php-nuke with apache php mysql c0c0deuz Linux - Software 0 03-30-2003 06:23 AM
PHP, MySQL and Apache miker Linux - Newbie 1 03-27-2002 01:29 PM


All times are GMT -5. The time now is 06:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration