Re: Browser tries to download php file

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



The httpd.conf file is in /usr/local/apache/conf

Im using Apache 1.3 because that's what I had loaded on this
originally with mod_perl.. I was most familiar with setting up Apache
1.3/mod_perl with the helpdesk application we use here. So I was
making it easier on myself.. Or so I thought.

The apache logs are showing on startup:

 Apache/1.3.41 (Unix) PHP/5.2.5 mod_perl/1.30 configured -- resuming
normal operations

The httpd -l (Im typing out full path to /usr/local/apache/bin/httpd)
is showing the two modules loaded:

/usr/local/apache/bin/httpd -l
Compiled-in modules:
  ...

  mod_perl.c
  mod_php5.c

And my httpd.conf file (/usr/local/apache/conf) has these entries
under mod_mime:

        AddType application/x-httpd-php .php
        AddType application/x-httpd-php-source .phps

        AddHandler application/x-httpd-php .php

But still. My browser still tries to download the php file when I try
to view it.  I just tried re-compiling PHP just in case... No change.
Im at a total loss!  Let me know if there's any other info I can give.


On Fri, Jun 26, 2009 at 3:17 PM, Keith Roberts<keith@xxxxxxxxxxxx> wrote:
> On Fri, 26 Jun 2009, Juan Mas wrote:
>
>> To: Keith Roberts <keith@xxxxxxxxxxxx>
>> From: Juan Mas <juan.mas@xxxxxxxxx>
>> Subject: Re:  Browser tries to download php file
>>
>> Thanks for your response.  Heres what I know!  When I make a change to
>> the httpd.conf file, such as commenting out AddType, and restart
>> apache, the changes will take affect in the browser.  Typically the
>> php page will display as text at that point.  When I uncomment AddType
>> and restart, it will then try to download.  If I do -t on httpd, I get
>> a Syntax OK message.  Also, when I make a change to the conf file, I
>> am completely stopping and then starting apache, not just using
>> 'restart'.  As you can see by the list of compiled modules, php is in
>> there.  If I try inserting a LoadModule command in the conf file, I
>> get a message that it's already been loaded in.  If I run ps -aux I
>> see /usr/local/apache/bin/httpd which is the correct location that I
>> installed to.  Very very weird......
>
> What is the full path to the httpd.conf file you are editing?
>
> Also, if you are compiling apache yourself, why are you using the 1.3.x
> version, when you could be using 2.x.x ?
>
> Kind Regards,
>
> Keith
>


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