Operating System - Linux
1748204 Members
4213 Online
108759 Solutions
New Discussion юеВ

Re: apache and php 5 question

 
Tammy Liang
Regular Advisor

apache and php 5 question

I installed apache (2.0.53) and php 5.0.3.
I can not access php page, it displays a file download window to save the php file.
I have follow lines in httpd.conf file:

LoadModule php5_module modules/libphp5.so
AddType application/x-htpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps

Thanks for any help
take easy, enjoy life
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: apache and php 5 question

What Linux Distribution?

How did you do the install?

Were there any errors?

I can't help without more information.

Red hat's httpd apache port still uses 4.x php because the kinks have not all been worked out of integrating the 5 version.

Sometimes you don't want to be bleeding edge.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
NiCK_76
Respected Contributor

Re: apache and php 5 question

Hi Liang,

It seems PHP was not supported. How did you install it? Compile apache and php from source? I think Redhat never provide offical rpm for php 5. The following URL wish to help you to install it.
http://www.php.net/manual/en/install.unix.apache2.php


NiCK
just for fun
Tammy Liang
Regular Advisor

Re: apache and php 5 question

It is Redhat ES3.
# tar zxvf httpd-2.0.53.tar
# cd httpd-2.0.53.tar
# ./configure --prefix=/usr/local/apache \
--enable-module=so
# make
# make install
# /usr/local/apache/bin/apachectl start

# tar zxvf php-5.0.3.tar.gz
# cd php-4.3.9
# ./configure --with-oci8=$ORACLE_HOME \
--with-apxs=/usr/local/apache/bin/apxs \
--enable-sigchild
# make
# make install
# cp php.ini-dist /usr/local/lib/php.ini

take easy, enjoy life
NiCK_76
Respected Contributor

Re: apache and php 5 question

Hi,Liang

You should compile php with --with-apxs2, because apache is 2.0 version.
Don't forget edit file httpd.conf,then restart apache service.

NiCK
just for fun
Tammy Liang
Regular Advisor

Re: apache and php 5 question

It is fixed.
There is typo on
AddType application/x-httpd-php .php .phtml

Thanks..
take easy, enjoy life
Florian Heigl (new acc)
Honored Contributor

Re: apache and php 5 question

ah - I also read over that htpd - You have sharp eyes!
yesterday I stood at the edge. Today I'm one step ahead.