Page 1 of 1

configure/make error installing PHP5

Posted: Mon Mar 22, 2004 10:43 pm
by allelopath
I am attempting to install PHP5 on RH 9
I currently have Apache 2.0.48, PHP 4.3.4, and MySQL4.0.18

I needed to update some rpms, so i did:
# rpm --upgrade libxml2-python-2.5.10-1.i386.rpm libxml2-devel-2.5.10-1.i386.rpm libxml2-2.5.10-1.i386.rpm
warning: libxml2-python-2.5.10-1.i386.rpm: V3 DSA signature: NOKEY, key ID de95bc1f
(I'm not sure what the warning means)

After extracting php5 to /usr/local/php5.0.0RC1, i do this command:

# ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
...
lots of checking, some yes some no
...
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
configure: error: Cannot find MySQL header files under /usr/local/mysql.
Note that the MySQL client library is not bundled anymore.

I don't know where the mysql header files are.
If i look for mysql.h, i get this:
# locate mysql.h
/root/Desktop/Trash/oldmysql-standard-4.0.18-pc-linux-i686/include/mysql.h
/usr/local/src/PHP/php-4.3.4/ext/dbx/dbx_mysql.h
/usr/local/src/PHP/php-4.3.4/ext/mysql/libmysql/mysql.h
/usr/local/src/PHP/php-4.3.4/ext/mysql/php_mysql.h
/usr/local/php-4.3.4/php/ext/dbx/dbx_mysql.h
/usr/local/php-4.3.4/php/ext/mysql/libmysql/mysql.h
/usr/local/php-4.3.4/php/ext/mysql/php_mysql.h
/usr/local/php-5.0.0RC1/ext/dbx/dbx_mysql.h
/usr/local/php-5.0.0RC1/ext/mysql/php_mysql.h


The instructions then say to make, but there is no makefile:
# make
make: *** No targets specified and no makefile found. Stop.

Is this because of a problem with the ./configure?

Contents of the directory /usr/local/php-5.0.0RC1:
acconfig.h mkinstalldirs
acconfig.h.in netware
acinclude.m4 NEWS
aclocal.m4 pear
build php5.spec.in
buildconf php.gif
buildconf.bat php.ini-dist
CODING_STANDARDS php.ini-recommended
confdefs.h README.CVS-RULES
config.cache README.EXTENSIONS

config.guess README.EXT_SKEL
config.log README.input_filter
config.nice README.PARAMETER_PARSING_API
config.sub README.PHP4-TO-PHP5-THIN-CHANGES
configure README.QNX
configure.in README.SELF-CONTAINED-EXTENSIONS
CREDITS README.STREAMS
cvsclean README.SUBMITTING_PATCH
cvsclean.bat README.TESTING
ext README.TESTING2
EXTENSIONS README.UNIX-BUILD-SYSTEM
footer README.WIN32-BUILD-SYSTEM
generated_lists README.Zeus
genfiles regex
header run-tests2.php
include run-tests-config.php
INSTALL run-tests.php
install-sh sapi
libs scripts
LICENSE snapshot
ltmain.sh stamp-h.in
main stub.c
makedist tests
Makefile.frag TODO
Makefile.fragments TODO.BUILDv5
Makefile.global TODO-PHP5
Makefile.objects TSRM
makerpm win32
missing Zend

Posted: Mon Mar 22, 2004 10:54 pm
by markl999
You need to install the mysql development stuff, either from the source code at http://www.mysql.com or install the mysql-dev rpm package.

Posted: Tue Mar 23, 2004 2:01 am
by Pyrite
Yep, the problem is with configure, you can't make until configure is finished without error. Install the mysql-dev rpms (which have the header files) and then re-run configure. Might have to run ldconfig before running configure again.

Posted: Tue Mar 23, 2004 7:44 am
by allelopath
thanks for the tips, i'll give that a go.
I don't understand, however, why it is that i have to install the mysql-dev rpm for php5, but i didn't have to for php4.x.x.
Can anyone explain?

Posted: Tue Mar 23, 2004 8:07 am
by allelopath
hmmm...can't seem to find mysql-dev rpm.
I don't see it at mysql.com, or at RPMFind

Posted: Tue Mar 23, 2004 9:13 am
by allelopath

Posted: Wed Mar 24, 2004 1:31 am
by Pyrite
Did you compile php4 from source? What about MySQL. It makes a difference the way you go about installing these things ..

Posted: Fri Mar 26, 2004 10:33 am
by allelopath
this eliminates the cannot find header files error
(assumming mysql installed as RPMs)
# ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/

Posted: Fri Mar 26, 2004 10:37 am
by aleigh
allelopath wrote:thanks for the tips, i'll give that a go.
I don't understand, however, why it is that i have to install the mysql-dev rpm for php5, but i didn't have to for php4.x.x.
Can anyone explain?
I am not 100% sure on this because I haven't checked, but I think they used to include the mysql library in PHP4 and they have just stopped including it in PHP5, or you have to do something else to get the internal support to be used. I remember this because I had problems with threading since the PHP4 mysql library in the old days didn't build with threading support enabled.

Posted: Mon Mar 29, 2004 4:05 pm
by ol4pr0
I would say, if there are src files around compile it youreself instead of using rpm . They are lots faster to install however if you need something of those packs its a Bia**tch looking for it.

compiling youreself also allows you to configure the way you want it.

Posted: Mon Mar 29, 2004 11:31 pm
by Pyrite
Faster? Not a chance,. Better? Yes.