Page 1 of 1

installing PHP 4

Posted: Mon Nov 10, 2003 8:57 pm
by mohdali2
I am building PHP 4 as an Apache module on Red Hat Linux version 9
with mysql 3.2 and apache 1.3. I received the following errors.

./configure --with-mysql=/u01/mysql-3.23.55-pc-linux-i686 --with-apxs=/u01/apache/bin
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for re2c... exit 0;
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for gawk... gawk
checking for bison... no
checking for byacc... no
configure: warning: You will need bison if you want to regenerate the PHP parsers.
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root... ./configure: line 2425: lex: command not found
configure: error: cannot find output from lex; giving up

Please help me to solve the problem.

Regards
Muhammad Ali

Posted: Tue Nov 11, 2003 8:40 am
by Johnm
Sounds like you are missing some libs... use the find command to search for them,. If you find them, add them to your configure command or copy them to one of the library dirs. "lex" is in /usr/bin usually and so are bison and byacc. If they are not there at all, then you will need to either find them on the install disk or download them and put them in /usr/bin.

John M

Posted: Tue Nov 11, 2003 10:01 am
by Nay
mMm, I don't know about you but RedHat 9 comes with PHP 4.2.2 and MySQL 3 with Apache. You can install it under the "Web Server" package. I got scared of compiling things :P.

Though I need to get into it again, really this time.

-Nay