Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

How to configure php on apache

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Apache installation question  
Author Message
john_liu

External


Since: Oct 10, 2004
Posts: 2



(Msg. 1) Posted: Sun Oct 10, 2004 6:18 pm
Post subject: How to configure php on apache
Archived from groups: alt>apache>configuration (more info?)

I have redhat 7.2 with appache 1.3.20 and php 4.0.6 built in. Now I try to
configure php on apache. It seemed that I followed all the procedures on how
to configure php on apache but when I tested the php with the following
script, it did not show up what it was supposed to be shown up:

<HTML>
<HEAD></HEAD>
<BODY>
<? phpinfo(); ?>
</BODY>
</HTML>

I don't know what went wrong. could someone point me to a right direction.
Thanks.

 >> Stay informed about: How to configure php on apache 
Back to top
Login to vote
user2998

External


Since: Oct 10, 2004
Posts: 4



(Msg. 2) Posted: Mon Oct 11, 2004 2:06 am
Post subject: Re: How to configure php on apache [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Did you name the file something that ends in .php, say "index.php"?

If yes, and it's still not working, check to make sure that your php4
module is loading in your httpd.conf file.. you should see a line like this:

LoadModule php4_module modules/libphp4.so

Make sure that it is not commented out with a "#".

Also make sure you have an AddType somewhere in your httpd.conf file.

AddType application/x-httpd-php php





john_liu wrote:
 > I have redhat 7.2 with appache 1.3.20 and php 4.0.6 built in. Now I try to
 > configure php on apache. It seemed that I followed all the procedures on how
 > to configure php on apache but when I tested the php with the following
 > script, it did not show up what it was supposed to be shown up:
 >
 > <HTML>
 > <HEAD></HEAD>
 > <BODY>
 > <? phpinfo(); ?>
 > </BODY>
 > </HTML>
 >
 > I don't know what went wrong. could someone point me to a right direction.
 > Thanks.
 >
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: How to configure php on apache 
Back to top
Login to vote
john_liu

External


Since: Oct 10, 2004
Posts: 2



(Msg. 3) Posted: Mon Oct 11, 2004 2:06 am
Post subject: Re: How to configure php on apache [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

My file is named as index.html. I changed it to index.php and did not work
either.

I checked the information you pointed out. The following is what I got in
httpd.conf:

<IFDEFINE HAVE_PHP4>
LoadModule php4_module modules/libphp4.so
</IFDEFINE>

<IfModule mod_php4.c>
AddType application/x-httpd-php .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
</IfModule>

Thanks for your help.

"x" <x.RemoveThis@y.com> ???? news:7Nmad.30135$cN6.29174@lakeread02...
 > Did you name the file something that ends in .php, say "index.php"?
 >
 > If yes, and it's still not working, check to make sure that your php4
 > module is loading in your httpd.conf file.. you should see a line like
this:
 >
 > LoadModule php4_module modules/libphp4.so
 >
 > Make sure that it is not commented out with a "#".
 >
 > Also make sure you have an AddType somewhere in your httpd.conf file.
 >
 > AddType application/x-httpd-php php
 >
 >
 >
 >
 >
 > john_liu wrote:
  > > I have redhat 7.2 with appache 1.3.20 and php 4.0.6 built in. Now I try
to
  > > configure php on apache. It seemed that I followed all the procedures on
how
  > > to configure php on apache but when I tested the php with the following
  > > script, it did not show up what it was supposed to be shown up:
  > >
  > > <HTML>
  > > <HEAD></HEAD>
  > > <BODY>
  > > <? phpinfo(); ?>
  > > </BODY>
  > > </HTML>
  > >
  > > I don't know what went wrong. could someone point me to a right
direction.
  > > Thanks.
  > >
  > ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How to configure php on apache 
Back to top
Login to vote
hans1

External


Since: Mar 29, 2004
Posts: 672



(Msg. 4) Posted: Tue Oct 12, 2004 12:24 am
Post subject: Re: How to configure php on apache [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"john_liu" <john_liu RemoveThis @charter.net> schreef in bericht
news:10mk0evjpnfdu56@corp.supernews.com...
 > "x" <x RemoveThis @y.com> ???? news:7Nmad.30135$cN6.29174@lakeread02...
  > > LoadModule php4_module modules/libphp4.so
  > > Make sure that it is not commented out with a "#".
  > > Also make sure you have an AddType somewhere in your httpd.conf file.
  > > AddType application/x-httpd-php php
 > My file is named as index.html. I changed it to index.php and did not work
 > either.
 > I checked the information you pointed out. The following is what I got in
 > httpd.conf:
 > <IFDEFINE HAVE_PHP4>
 > LoadModule php4_module modules/libphp4.so
 > </IFDEFINE>
 > <IfModule mod_php4.c>
 > AddType application/x-httpd-php .php .php4 .php3 .phtml
 > AddType application/x-httpd-php-source .phps
 > </IfModule>
<IFDEFINE HAVE_PHP4>...
.... to get the php4_module loaded apache requires a commond line parameter
'-DHAVE_PHP4'

Removing the lines <IFDEFINE HAVE_PHP4> and </IFDEFINE> will do too.

<a style='text-decoration: underline;' href="http://httpd.apache.org/docs-2.0/mod/core.html#ifdefine" target="_blank">http://httpd.apache.org/docs-2.0/mod/core.html#ifdefine</a>
<a style='text-decoration: underline;' href="http://httpd.apache.org/docs-2.0/programs/httpd.html" target="_blank">http://httpd.apache.org/docs-2.0/programs/httpd.html</a>

HansH<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How to configure php on apache 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Apache Configure - Hello. I'm having problems with the httpd created from configure/make/make install. I'm trying to compile apache 2.0.49 on Red Hat linux 7.2. I run configure with the following flags: ../configure --enable-mods-shared=all --enable-so --enable-ssl..

How to configure mod_mono (1.x) with Apache (2.x) ? - Hi! Please, anyone point me to the proper documentation on how to setup mod_mono (version 1.x) with Apache (version 2.x) on RedHat Linux 9? I went to: http://apacheworld.org/modmono/ but there's no up to date documentation on that site. Much improper....

Configure Apache 2 for ObjRexx cgi - New Apache user. Can anyone give me some help with configuring Apache 2 on WinXP to allow Object Rexx cgi scripts to run.

Setting GID during Apache 2.0.49 configure - In Apache 1.3.X, you could specify –server-gid=nobody in the configure statement. I tried this on Apache 2.0.49 and it does not work. Is there an equivalent option in 2.0.49? Thanks, Richard

how to configure Apache to run PHP from public_html? - Hello, as far as I know, I have to add a special <directory/> - Entry to my httpd.conf if I want to allow my users to run PHP-scripts from their home-directories. So I have created a folder named "public_html" in each /home/<userna...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]