HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   Problem Installing Apache 2.2.8, MySQL 5.0 Client and PHP 5.2.5 On Fedora 8 (64-Bit) (http://www.howtoforge.com/forums/showthread.php?t=22111)

asyadiqin 8th April 2008 18:49

Problem Installing Apache 2.2.8, MySQL 5.0 Client and PHP 5.2.5 On Fedora 8 (64-Bit)
 
I am trying to install the following :-

Apache 2.2.8 (64-Bit)
MySQL Client 5.0 (64-Bit)
PHP 5.2.5 (64-Bit)

I managed to install Apache and MySQL Client using yum, but had to compile PHP 5.2.5 as the current yum package only list PHP 5.2.4. (Note: My manager insisted that I install these versions, ie. PHP 5.2.5, etc... so no point telling me to stick to the current older versions :( )

Anyway, everything goes smoothly with Apache and MySQL Client, but when I try to compile PHP, it gave me errors. This is how I compile PHP

Quote:

./configure \
--prefix=/usr/bin \
--disable-xmlreader \
--disable-xmlwriter \
--enable-posix \
--with-pear \
--with-zlib \
--with-xml \
--with-zlib-dir=/usr \
--with-openssl \
--with-gd \
--with-jpeg-dir=/usr/lib64 \
--with-png-dir=/usr/lib64 \
--with-freetype-dir=/usr/lib64 \
--with-ttf \
--with-iconv \
--with-curl \
--enable-track_vars \
--enable-gd \
--enable-gd-native-ttf \
--enable-libxml \
--enable-dom \
--enable-simplexml \
--enable-exif \
--enable-ftp \
--enable-mbstring \
--enable-mbregex \
--enable-sockets \
--enable-embedded-mysqli \
--enable-memcache=/usr/bin \
--with-mysql=/usr/lib64/mysql \
--with-mysqli=/usr/bin/mysql_config \

--with-apxs2=/usr/sbin/apxs \
This is the error that I get ....

Quote:

......
checking for MING support... no
checking for mSQL support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
I googled and found a site that suggested that I make the symlinks below and to change the compile options to --with-mysql=/opt

Quote:

ln -s /usr/lib64/ /opt/lib
ln -s /usr/include/ /opt/include
This is the error that I get when I compile it after that.
Quote:

checking for MING support... no
checking for mSQL support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
checking for mysql_close in -lmysqlclient... yes
checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... yes
checking for mysql_set_server_option in -lmysqlclient... no
configure: error: wrong mysql library version or lib not found. Check config.log for more information.
This is what is in config.log
Quote:

.....
configure:60521: checking for MySQLi support
configure:60568: checking whether to enable embedded MySQLi support
configure:60719: checking for mysql_set_server_option in -lmysqlclient
configure:60738: gcc -o conftest -I/usr/local/include -g -O2 -Wl,-rpath,/usr/lib64 -L/usr/lib64 -Wl,-rpath,/usr/lib64/mysql -L/usr/lib64/mysql -L/usr/local/lib -Wl,-rpath,/usr/kerberos/lib64 -L/usr/kerberos/lib64 -Wl,-rpath,/opt/lib/mysql -L/opt/lib/mysql -lmysqld -lz -lcrypt -lnsl -lm -lrt -lssl -lcrypto conftest.c -lmysqlclient -lmysqlclient -lfreetype -lpng -lz -ljpeg -lcurl -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -ldl -lz -lcurl -lxml2 -lz -lm -lssl -lcrypto -ldl -lz 1>&5
/usr/bin/ld: cannot find -lmysqld
collect2: ld returned 1 exit status
configure: failed program was:
#line 60727 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_set_server_option();

int main() {
mysql_set_server_option()
; return 0; }
FYI, I installed the following MySQL packages using yum
Quote:

mysql - 5.0.45-6.fc8.x86_64
mysql-devel - 5.0.45-6.fc8.x86_64
mysql-libs - 5.0.45-6.fc8.x86_64
mysql-bench - 5.0.45-6.fc8.x86_64
Anyone have any idea what I did wrong or is there any missing package that I should install first?

It would be good if someone were to write a "Howto Guide" to install LAMP from source rather than using yum. I'm sure there are many who would like that as yum have its limitations, ie. older packages, etc...

Thanks and hope someone can help me with this problem.

o.meyer 8th April 2008 19:08

Hi asyadiqin,

you should wait a few days - PHP 5.2.5 (5.2.5-2.fc8) is already in the Fedora testing-repository and will be pushed into the stable-repository in short.

Best regards,

Olli

asyadiqin 8th April 2008 19:27

Quote:

Originally Posted by o.meyer
Hi asyadiqin,

you should wait a few days - PHP 5.2.5 (5.2.5-2.fc8) is already in the Fedora testing-repository and will be pushed into the stable-repository in short.

Best regards,

Olli

Thanks olli. I have a deadline to meet as this is not the only project I have now. I might be able to delay for a week, but if anyone do have any solutions, it would be really great as I and anyone who read this post, would be learning something too.

falko 9th April 2008 22:05

You could try to get the PHP 5.2.4 src.rpm and replace PHP 5.2.4 with PHP 5.2.5, then adjust the SPEC file and build a new RPM.
Chapter 5 on http://www.howtoforge.com/virtual-us...-mysql-fedora8 has an example for building a Postfix rpm from a src.rpm.

asyadiqin 9th April 2008 22:45

Quote:

Originally Posted by falko
You could try to get the PHP 5.2.4 src.rpm and replace PHP 5.2.4 with PHP 5.2.5, then adjust the SPEC file and build a new RPM.
Chapter 5 on http://www.howtoforge.com/virtual-us...-mysql-fedora8 has an example for building a Postfix rpm from a src.rpm.

Would building a new RPM from source avoid the error message that I get when I compile PHP 5.2.5? I have never build a RPM from source and wouldn't know where to start or how to modify the PHP 5.2.5 source SPEC file to be as what I wanted it to be as when I compile it. I am sorry if this sound newbie-ish, but maybe a more detailed explanation on what you suggested. Thanks falko.

PS: Where can I download PHP 5.2.5 src.rpm? Again ... sorry for this newbie question ... :p

falko 10th April 2008 18:40

Quote:

Originally Posted by asyadiqin
PS: Where can I download PHP 5.2.5 src.rpm? Again ... sorry for this newbie question ... :p

Download the PHP 5.2.4 src.rpm and replace the PHP 5.2.4 sources in it with the PHP 5.2.5 sources. Afterwards, replace all references to 5.2.4 with 5.2.5 in the spec file.


All times are GMT +2. The time now is 11:43.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.