I am little sureprice with this condition, why FC4 not support php-mysql on default configuration ? I search on google, and found The PHP FAQ says: “This won’t actually affect that many people.”
But now it’s solved with this procedure:
1. Get the PHP source files – you gotta compile it. wget http://us2.php.net/get/php-5.0.4.tar.gz
2. Extract them: tar -zxvf php-5.0.4.tar.gz
This will create a folder called php-5.1.2 – in your user’s home folder assuming you haven’t gone CD’ing around since you started following these instructions.
3. Install the Apache developer files – Fedora Core 4 is missing a file that will cause PHP’s configure command to fail, but the developer files have what you need. yum install httpd-devel-2.0.54
Note that the reason I’m installing 2.0.54 is because that’s the version of Apache that’s running. It shows up on that phpinfo.php page that you browse to. You should make sure that you install the same version that you are running if it’s changed since I posted this. This will ask you about installing 4 packages and updating 11 more – don’t worry, just let ‘er rip!
4. Now for the lovely configuration and compile runs. First, change to the php source directory:
cd php-5.1.2
5. Now run the configuration. Okay, this is a pretty big and hairy command, but basically it is the exact same configuration that shows in that phpinfo.php browse that you did earlier, with a few minor changes:
‘–with-mysql’ rather than ‘–without-mysql’ – the reason we’re all here
‘–without-unixODBC’ rather than ‘–with-unixODBC=shared,/usr’ – otherwise you get a lovely config error ’cause it isn’t installed by default on Core 4
‘–without-pspell’ rather than ‘–with-pspell’ – yet another thing that Core 4 is missing
And here’s the line to execute – just copy and paste it
./configure ‘–build=i386-redhat-linux’ ‘–host=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-libdir=lib’ ‘–with-config-file-path=/etc’ ‘–with-config-file-scan-dir=/etc/php.d’ ‘–disable-debug’ ‘–with-pic’ ‘–disable-rpath’ ‘–with-bz2′ ‘–with-curl’ ‘–with-exec-dir=/usr/bin’ ‘–with-freetype-dir=/usr’ ‘–with-png-dir=/usr’ ‘–enable-gd-native-ttf’ ‘–without-gdbm’ ‘–with-gettext’ ‘–with-gmp’ ‘–with-iconv’ ‘–with-jpeg-dir=/usr’ ‘–with-openssl’ ‘–with-png’ ‘–without-pspell’ ‘–with-expat-dir=/usr’ ‘–with-pcre-regex=/usr’ ‘–with-zlib’ ‘–with-layout=GNU’ ‘–enable-exif’ ‘–enable-ftp’ ‘–enable-magic-quotes’ ‘–enable-sockets’ ‘–enable-sysvsem’ ‘–enable-sysvshm’ ‘–enable-sysvmsg’ ‘–enable-track-vars’ ‘–enable-trans-sid’ ‘–enable-yp’ ‘–enable-wddx’ ‘–with-pear=/usr/share/pear’ ‘–with-kerberos’ ‘–enable-ucd-snmp-hack’ ‘–without-unixODBC’ ‘–enable-memory-limit’ ‘–enable-shmop’ ‘–enable-calendar’ ‘–enable-dbx’ ‘–enable-dio’ ‘–with-mime-magic=/etc/httpd/conf/magic’ ‘–without-sqlite’ ‘–with-libxml-dir=/usr’ ‘–with-xml’ ‘–with-apxs2=/usr/sbin/apxs’ ‘–with-mysql’ ‘–without-gd’ ‘–without-odbc’ ‘–disable-dom’ ‘–disable-dba’
6. Pray and then press Enter
If all goes well, you’ll get a License message and “Thank you for using PHP.”. You’re welcome.
7. Now you have to compile the configuration you just built. That’s easy:
make
Note that there are quite a few parameters differ in signedness warnings – don’t worry, the signedness-challenged nature of the php source doesn’t seem to hurt anything.
8. Now install it – first, stop Apache:
/sbin/service httpd stop
9. Now run the install: make install
10. Before restarting and testing everything, you need to avoid a Warning that Apache shows due to the install causing a duplicate line in the Apache configuration. So edit the Apache config file:
vi /etc/httpd/conf/httpd.conf
and locate LoadModule php5_module /usr/lib/httpd/modules/libphp5.so and add a # before it:
# LoadModule php5_module /usr/lib/httpd/modules/libphp5.so
(remember press i to insert, then Escape and :wq to write it and quit)
11. Now for the big moment, restart Apache!
/sbin/service httpd restart
Done ………..
Now you can work with LAMP (Linux Apache Mysql and PHP) on your machine.
Happy trying …
>>aris<<
First post at Thursday, August 17, 2006, 05:14 PM