Re: Browser tries to download php file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, 25 Jun 2009, Juan Mas wrote:

To: php-install@xxxxxxxxxxxxx
From: Juan Mas <juan.mas@xxxxxxxxx>
Subject:  Browser tries to download php file

Hi list,

I have a Gentoo server that has been running for over a year with
Apache 1.3 & mod_perl 1.3.  I recently decided to add PHP 5 to it.  I
re-compiled Apache using this howto
http://perl.apache.org/docs/1.0/guide/install.html#mod_perl_and_mod_php

When I look at the Apache logs, I am seeing the PHP is being loaded

[Thu Jun 25 10:09:14 2009] [notice] Apache/1.3.41 (Unix) PHP/5.2.5
mod_perl/1.30 configured -- resuming normal operations


I have added AddType application/x-httpd-php .php, and the AddHandler
to the httpd.conf file, and index.php to DirectoryIndex.  When I try
to display php info in a browser, the browser tries download the php
instead of displaying the page.  I've tried a bunch of different
commands in the conf file, none have seemed to work.  Ive added
Action, or AddType script-php5, or adding as text/html at which point
the page displays but it doesn't parse the php.

Are you sure that you are editing the correct httpd.conf file?

Is there more than one of these files on your system?

Did you stop and then start Apache to force it to re-read httpd.conf?

If you have compiled apache yourself, has the Apache that comes with your distribution been removed?

Try adding some deliberate errors into your httpd.conf then running apachectl -t to check it for syntax errors you have added. You should then get some syntax errors. This will confirm that you are editing the working httpd.conf if there are more than one there on the system.

If you are compiling Apache yourself, where is it getting installed to, as it will use the httpd.conf under the --prefix, which will default to something like /usr/local.

HTH

Keith Roberts

[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux