LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 07-16-2001, 03:55 PM   #1
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Rep: Reputation: 30
PHP4 install help needed


Hi guys, me again lol

Ok so I want to install PHP 4.0.6 .

I allready have Apache 1.3.20 and its installed in /usr/src/apache

I also have Mysql 3.23.39 and thats installed to /usr/local/mysql.

The instructions that come with php explain how to compile apache and php together but I have already installed apache and i,m not sure what to do.

Can anybody help/provide instructions

cheers guys

RecoilUK

p.s. I want to install it as a module not as a CGI
 
Old 07-16-2001, 05:16 PM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
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.

cheers

Jamie...
 
Old 07-16-2001, 05:40 PM   #3
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Original Poster
Rep: Reputation: 30
Hmmmm ok bear with me a sec....

So the configure line will look like...

./configure --prefix=/usr/src/apache/php --with-apxs=/usr/src/apache/bin --with-mysql=/usr/local/mysql/bin

is this correct???
 
Old 07-16-2001, 05:44 PM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Quote:
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

cheers

Jamie...
 
Old 07-16-2001, 05:55 PM   #5
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Original Poster
Rep: Reputation: 30
OK i did this but i get the following output

[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?

Sorry to be a pain
 
Old 07-16-2001, 06:05 PM   #6
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Original Poster
Rep: Reputation: 30
Dont worry I got past that bit now I have this?

I,ve done something majorly wrong here havnt i

[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]#
 
Old 07-16-2001, 07:36 PM   #7
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
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.

HTH

Jamie...
 
Old 07-16-2001, 08:07 PM   #8
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Original Poster
Rep: Reputation: 30
Yeah I checked that m8

The source files are in /packages where I download everything to.

I installed apache to /usr/src/apache.

It says I dont have perl installed , do I need the perl_mod, i,ve checked the system and I have perl installed from the Mandrake CD.

Also when I installed apache I didnt use any options I just did this ./configure --prefix=/usr/src/apache was this correct?
 
Old 07-17-2001, 03:05 AM   #9
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
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.

just a few thoughts.

cheers

Jamie...
 
Old 07-17-2001, 06:49 AM   #10
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Original Poster
Rep: Reputation: 30
Arrrggghhhh

OK I,ve overcome the Apache problem, I just reconfigured apache with mod support, now I have a problem with mysql..... DONT YA JUST LUV IT LOL

Ok here it is lol

Before I tried

./configure --prefix=usr/src/apache/php --with-apxs =/usr/src/apache/bin/apxs --with-mysql=/usr/local/mysql/bin

but got the same error message as below, so I searched for the header files and they are in ( i,m guessing but I assume the header files end in .h)

/usr/local/mysql/include/mysql so I tried it but as you can see , no luck

[root@localhost php-4.0.6]# ./configure --prefix=usr/src/apache/php --with-apxs =/usr/src/apache/bin/apxs --with-mysql=/usr/local/mysql/include/mysql

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]#

any idea,s?

cheers m8
 
Old 07-17-2001, 11:59 AM   #11
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Original Poster
Rep: Reputation: 30
Dont worry m8, i got it sorted

I had to include the mysql dir in ld.so.config and run ldconfig.

It worked

HAHAHAHAHA

The thing with Linux is, its bloody hard to learn but when you figure it out, you get a real sense of achievement

L8rs and thx again m8
 
Old 07-17-2001, 12:02 PM   #12
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Original Poster
Rep: Reputation: 30
Oh one more thing, how do I test it?

If I use envtest.php file and it returns an output, that means everything is ok right?
 
Old 07-17-2001, 12:25 PM   #13
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Test PHP? I'd suggest creating a file with just
PHP Code:
<?PHP phpinfo() ?>
in it, that'll give you plenty of details.

HTH

Jamie...
 
Old 07-17-2001, 02:39 PM   #14
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Original Poster
Rep: Reputation: 30
Bugger it dam.dam.dam

It doesnt display anything?
 
Old 07-17-2001, 02:49 PM   #15
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Original Poster
Rep: Reputation: 30
Nevermind success woohoo lol
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help loading php4-gd with php4 already installed. (Debian) sdduuuude Linux - Software 3 10-24-2005 05:13 AM
Install GD Library for PHP4? Truti Linux - Software 0 04-12-2005 03:34 PM
php4 make/install error BobNz Linux - Software 0 05-03-2004 12:02 AM
PHP4.2.1 install on mdk8.0 with apache2 GabeF Linux - Software 3 11-04-2002 07:22 PM
PHP4 Install Problem Breezwell Programming 7 08-29-2001 09:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration