You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Grant <em...@yahoo.com> on 2004/08/15 01:40:13 UTC

[users@httpd] PHP not working with apache2

I'm running Gentoo Linux, and emerged (installed)
squirrelmail which automatically installed all of its
dependencies including PHP and (I think) mod_php.  PHP
doesn't seem to be working though, as I always end up
looking at the raw PHP code in a browser.  I do have
apache and apache2 installed on my system, and I
suspect some key PHP things may have been set up for
apache instead of apache2.  Does anyone have any
pointers?

- Grant


		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP not working with apache2

Posted by Henry Leung <he...@vtc.edu.hk>.
Dear all,
  I had similar problem in Apache2. It seems that the default
configuration of Apache2 assumes that we will not use php3 any more, and
all .php3 web pages will be displayed as plain text.

  To solve this problem, add the following lines to httpd.conf:
  <Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
    LimitRequestBody 524288
  </Files>

  In addition, if your web server have php4 installed, Change
register_globals in /etc/php.ini to on for backward compatibility with
php3 pages. (and need to restart httpd to solve the docsite submenu
problem):

php.ini:
...
register_globals	on
...


在 日, 2004-08-15 07:40, Grant 寫道:
> I'm running Gentoo Linux, and emerged (installed)
> squirrelmail which automatically installed all of its
> dependencies including PHP and (I think) mod_php.  PHP
> doesn't seem to be working though, as I always end up
> looking at the raw PHP code in a browser.  I do have
> apache and apache2 installed on my system, and I
> suspect some key PHP things may have been set up for
> apache instead of apache2.  Does anyone have any
> pointers?
> 
> - Grant
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
-- 
Henry Leung <he...@vtc.edu.hk>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP not working with apache2

Posted by Alan Chandler <al...@chandlerfamily.org.uk>.
On Sunday 15 August 2004 00:40, Grant wrote:
> I'm running Gentoo Linux, and emerged (installed)
> squirrelmail which automatically installed all of its
> dependencies including PHP and (I think) mod_php.  PHP
> doesn't seem to be working though, as I always end up
> looking at the raw PHP code in a browser.  I do have
> apache and apache2 installed on my system, and I
> suspect some key PHP things may have been set up for
> apache instead of apache2.  Does anyone have any
> pointers?

I don't know how you check the dependency chain in gentoo, but in debian there 
is a similar issue.  The package for php under apache2 is different to the 
one under apache1, and so just relying on default dependencies for some 
packages effectively loads up apache1 and php - but you are running apache2 
on the port your browser connects to and doesn't have php installed.

On debian the package that has to be used is called "libapache2-mod-php4"

-- 
Alan Chandler
alan@chandlerfamily.org.uk
First they ignore you, then they laugh at you,
 then they fight you, then you win. --Gandhi

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org