Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The best thing you can do it follow the instrucations for PHP they're really clear.
Get Apache installed and running first, then install mysql and make sure that works. Then install php using the --with-apxs and --with-mysql options (as per the readme) to create a dynamic module for Apache. Also have a search of the forum as there was a thread on this a couple of weeks ago. The install for all of them is pretty much the same... Read the read me, then just
Code:
./configure
make
make install
and its job done. With mysql there are a few post installation steps to get the initial databases installed but again they're well documented in the readme.
Originally posted by RecoilUK ./configure --prefix=/usr/src/apache/php --with-apxs=/usr/src/apache/bin/apxs --with-mysql=/usr/local/mysql/bin
You need to specify the loation of the apxs binary hence the change to the above. So you've actually installed Apache to /usr/src yeah? Thats not the location of just the source code? And you want your PHP libs and stuff to end up in /usr/src/apache/php right?
If all that is correct then the config command seems OK for PHP
[root@localhost php-4.0.6]# ./configure --prefix=/usr/src/apache/php --with-apx s=/usr/src/apache/bin/apxs --with-mysql=/usr/local/mysql/bin
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... missing
Updated php_version.h
checking whether to enable maintainer-specific portions of Makefiles... no
checking host system type... i586-pc-linux-gnu
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 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 how to run the C preprocessor... gcc -E
checking for AIX... no
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
checking whether gcc and cc understand -c and -o together... yes
checking whether ln -s works... yes
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root... ./configure: lex: command not found
configure: error: cannot find output from lex; giving up
[root@localhost php-4.0.6]#
I guess I need to install flex now?
And is there a way of getting rid off the configure files I just made?
[root@localhost php-4.0.6]# ./configure --prefix=/usr/src/apache/php --with-apx s=/usr/src/apache/bin/apxs --with-mysql=/usr/local/mysql/bin
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... missing
Updated php_version.h
checking whether to enable maintainer-specific portions of Makefiles... no
checking host system type... i586-pc-linux-gnu
checking for gawk... gawk
checking for bison... bison -y
checking bison version... 1.28 (ok)
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 how to run the C preprocessor... gcc -E
checking for AIX... no
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
checking whether gcc and cc understand -c and -o together... yes
checking whether ln -s works... yes
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for working const... yes
checking for pthreads_cflags... -pthread
checking for pthreads_lib...
Configuring SAPI modules
checking for AOLserver support... no
checking for Apache module support via DSO through APXS...
Usage: apxs -g [-S <var>=<val>] -n <modname>
apxs -q [-S <var>=<val>] <query> ...
apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]]
[-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>]
[-Wl,<flags>] <files> ...
apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
Sorry, I was not able to successfully run APXS. Possible reasons:
1. Perl is not installed;
2. Apache was not compiled with DSO support (--enable-module=so);
3. 'apxs' is not in your path.
configure: error: ;
[root@localhost php-4.0.6]#
Double check your path to apxs... that /usr/src folder is the folder with the Apache programs (binarys) in not the source right? On my system it would be --with-apxs=/var/lib/apache/bin/apxs but that the only thing I can see that will give you that error.
Where is you're Perl installed to? The installer might only look for /usr/bin/perl and /usr/local/bin/perl if its anywhere else then it might not find it. Thats what I'd check next, and make sure its in your path.
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
yada,yada,yada and then...
checking for mcrypt support... no
checking for mhash support... no
checking whether to include ming support... no
checking for mnoGoSearch support... no
checking for mSQL support... no
checking for Muscat support... no
checking for MySQL support... yes
configure: error: Cannot find header files under /usr/local/mysql/include/mysql
[root@localhost php-4.0.6]#
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.