LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-09-2001, 07:17 PM   #1
Breezwell
Member
 
Registered: Apr 2001
Location: Chicago
Distribution: Gentoo 1.4
Posts: 214

Rep: Reputation: 30
PHP4 Install Problem


Currently, I am trying to install PHP4 on my Mandrake 8.0 box.
I run ./configure with following options:

./configure --enable-track-vars \
--with-gd \
--with-mysql \
--with-apxs=/www/bin/apxs

./configure is fine until it looks for something called 'lex'. It tells me it is missing. I downloaded my .tar file from www.php.net, so I am figuring it is ok.

Thanks for any help you all may be able to provide.
 
Old 08-09-2001, 09:53 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
You will need to download an install flex. You can get the source from the gnu site. ftp.gnu.org/non-gnu/flex. Download, build and install it. The configure script should look for either lex or flex. If the php configure says that you need yacc or bison then you will have to download, build and install bison also.

I think for gd to be of much use, you need to include either png, jpg or freetype. What did you specify when you built gd? You should have had to manually edit the makefile.

When I built my php, I had built png, zlib, jpg and freetype before building gd. I then configure php with these options:

Code:
'./configure' \
'--with-apache=/usr/src/apache_1.3.19' \
'--with-png-dir=/usr/local' \
'--with-zlib-dir=/usr/local' \
'--with-jpeg-dir=/usr/local' \
'--with-gd=/usr/local' \
'--with-mysql=/usr/local/mysql' \
'--with-freetype-dir=/usr/local' \
'--enable-trans-sid' \
'--enable-gd-native-ttf' \
'--enable-track-vars' \
'--enable-shared'
Gary
 
Old 08-10-2001, 07:36 AM   #3
Breezwell
Member
 
Registered: Apr 2001
Location: Chicago
Distribution: Gentoo 1.4
Posts: 214

Original Poster
Rep: Reputation: 30
I did not build gd.
I simply downloaded the tar file for php-4.0.6 and tried to run a basic ./configure.

I think part of the problem may be Mandrake 8.0.
The copy I am using is giving me all sorts of problems not even related to PHP (won't compile .c programs even though gcc is installed). I will try getting PHP going on a different distro.

Thank you for the help crabboy.

All all PHP errata and FAQ'a I read did not mention what you covered.

I knew I came to the right place for help!
 
Old 08-24-2001, 03:11 PM   #4
Breezwell
Member
 
Registered: Apr 2001
Location: Chicago
Distribution: Gentoo 1.4
Posts: 214

Original Poster
Rep: Reputation: 30
I am having trouble getting yacc to compile.

I will keep trying and post as soon as I get past this stage.
 
Old 08-24-2001, 10:44 PM   #5
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
Try bison instead of yacc. You can download it from the gnu site.
 
Old 08-25-2001, 09:35 AM   #6
Breezwell
Member
 
Registered: Apr 2001
Location: Chicago
Distribution: Gentoo 1.4
Posts: 214

Original Poster
Rep: Reputation: 30
I also tried bison with no luck.
Decided to try installing on my Red Hat 7.2 box, and sure enough it did install just fine from the php tarball I downloaded. I did not need to install flex or bison independently.

Now I just need to configure Apache to read the .php files correctly. I edited the httpd.conf and php.ini file, but still no luck.

It is just a matter of getting more familiar with the configuration files at this point. All I see when I open the php pages I create is the code. I assume this means php is not installed correctly or my config files are not set right.

Thanks for the help crabboy.
 
Old 08-28-2001, 11:05 PM   #7
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
Do you have the following lines in your httpd.conf file?
Code:
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
 
Old 08-29-2001, 09:19 AM   #8
Breezwell
Member
 
Registered: Apr 2001
Location: Chicago
Distribution: Gentoo 1.4
Posts: 214

Original Poster
Rep: Reputation: 30
Yep

I have went over the php.ini file and the httpd.conf file with a magnifying glass. For some reason I am missing something trivial I think.

I have even tried recompiling php according to other text I have found around the net with no luck.

Persistence will prevail though..........
 
  


Reply



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 Off
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 help needed RecoilUK Linux - General 14 07-17-2001 02:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11: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
Open Source Consulting | Domain Registration