Jump to content

PHP configuration problems


Recommended Posts

Hi

Im trying to configure PHP5.2.0 to work with apache2.2.3 on RHEL4 but I'm having some problems getting it to work.

reading through the tutorials I'm meant to install apache before php, which I did. It said to use prefix=/usr/local/apache but I dont have permission to write to /usr/local so I used /home/jamest/apache instead. This is the configuration I used...

./configure --prefix=/home/jamest/apache \
--enable-so \
--enable-cgi \
--enable-info \
--enable-rewrite \
--enable-speling \
--enable-usertrack \
--enable-deflate \
--enable-ssl \
--enable-mime-magic

I then ran make, make install without error.

I then configured php with...

./configure \
--with-apxs2=/home/jamest/apache/bin/apxs \
--with-psql=/usr/bin/psql \
--prefix=/home/jamest/apache/php \
--with-config-file-path=/home/jamest/apache/php \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-gettext \
--with-gdbm

(Im using postgreSQL which is why I added the with-psql)

make, make install without error...

The libphp5.so has been loaded and php.ini-recommended moved across as my php.ini script. The script includes these lines...

LoadModule php5_module modules/libphp5.so
AddHandler php5-script php

DirectoryIndex index.php

AddType text/html php

AddType application/x-httpd-php php


I changed the DocumentRoot value and the Directory in httpd.conf to /var/www/html as that is my document root
I also changed doc_root in php.ini to the same value.

I then ran apache/bin/apachectl start


I ran a number of checks to ensure apache was running and ps -ef showed a number of apache processes. Ive got one of those phpinfo(); scripts in /var/www/html and im trying to open that using firefox. At the moment a blank page comes up. Ive tried other scripts and it seems to be ignoring the php tags. If I open the document root without specifying a script, the apache

It works!

is displayed


Dunno if this is too much information and just confusing but any help would be extremely appreciated

Cheers

Jamest
Link to comment
Share on other sites

  • 4 weeks later...
Not sure about the php configure:
[code]
./configure \
  --with-apxs2=/home/jamest/apache/bin/apxs \
  --with-psql=/usr/bin/psql \
  --prefix=/home/jamest/apache/php \
  --with-config-file-path=/home/jamest/apache/php \
  --enable-force-cgi-redirect \
  --disable-cgi \
  --with-zlib \
  --with-gettext \
  --with-gdbm
[/code]
It might be wise to configure php to install somewhere other than the apache dir (/home/jamest/apache/php) try something like /home/jamest/php

I'm not sure of the implications of not installing to a prefix like /usr I've always just done that and had no problem with it. Sorry I can't be of more help.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.