configure/make error installing PHP5

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
allelopath
Forum Commoner
Posts: 34
Joined: Tue Mar 16, 2004 5:21 am

configure/make error installing PHP5

Post 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
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post 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.
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post 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.
allelopath
Forum Commoner
Posts: 34
Joined: Tue Mar 16, 2004 5:21 am

Post 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?
allelopath
Forum Commoner
Posts: 34
Joined: Tue Mar 16, 2004 5:21 am

Post by allelopath »

hmmm...can't seem to find mysql-dev rpm.
I don't see it at mysql.com, or at RPMFind
allelopath
Forum Commoner
Posts: 34
Joined: Tue Mar 16, 2004 5:21 am

Post by allelopath »

User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

Did you compile php4 from source? What about MySQL. It makes a difference the way you go about installing these things ..
allelopath
Forum Commoner
Posts: 34
Joined: Tue Mar 16, 2004 5:21 am

Post 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/
aleigh
Forum Commoner
Posts: 26
Joined: Thu Mar 25, 2004 11:06 am
Location: Midwestern United States
Contact:

Post 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.
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post 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.
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

Faster? Not a chance,. Better? Yes.
Post Reply