httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Squirrel <squir...@mail.isot.com>
Subject Re: [users@httpd] Apache22 + PHP5 not execute
Date Tue, 31 Jul 2007 17:54:55 GMT
That didn't work either, I've already tried that from other instructions on google.  My current
setting is the last instruction I've tried from google, I now got it back to way it should
be.  I've looked at all extra settings as well.

But I got it fixed now.  It seems another admin had ".htaccess" file in the document directory
causing the problem:

 AddHandler php-fastcgi .php
 Redirect 301 /redirect.html http://............./
 <Files 403.shtml>
 order allow,deny
 allow from all
 </Files>
 Options All -Indexes

I removed that file, and all seems to work.

Thanks.


-----Original message-----
From: "Vincent Bray" noodlet@gmail.com
Date: Tue, 31 Jul 2007 12:15:03 -0500
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache22 + PHP5 not execute

> On 31/07/07, Squirrel <squirrel@mail.isot.com> wrote:
> > Upgraded FreeBSD v6.1-RELEASE to v6.2-STABLE, with Apache-2.2.4_2 and PHP5-5.2.3_1
ports.  But cannot get the php to execute.  I've searched google and followed every instructions,
but after days, I'm asking for your help.
> >
> > I've installed apache first from /usr/ports/www/apache22; make install clean.  Made
sure it works.  Then installed from /usr/ports/lang/php5; make clean; make config; make install.
 I've checked for creation of  /usr/local/libexec/apache22/libphp5.so and added below to httpd.conf
:
> >
> >  LoadModule php5_module        libexec/apache22/libphp5.so
> >  DirectoryIndex index.php index.cgi index.html index.htm
> >  AddHandler cgi-script .cgi
> >  AddType text/html .php
> >  AddType application/x-httpd-php .php .html
> >  AddType application/x-httpd-php-source .phps
> >
> > Apache restarts with no error.  But will not execute the PHP, just message to download
"You have chosen to open which is a: application/x-httpd-php from ...".
> 
> Hi,
> 
> Looks like you've fallen foul of the php manual's misinformation.
> AddType in this case isn't the correct directive to use (should be
> AddHandler).
> 
> LoadModule php5_module libexec/apache22/libphp5.so
> DirectoryIndex index.php index.cgi index.html index.htm
> # This isn't needed for php
> #AddHandler cgi-script .cgi
> # And you had html in this list, which isn't usually desirable
> AddHandler application/x-httpd-php php
> # phps needn't be configured if you're not going to use it (few ever do)
> #AddHandler application/x-httpd-php-source phps
> 
> However, you should have a hunt around for any separate config files
> that the installation might have created, possibly in conf/extras or
> conf.d etc.
> 
> Once that's fixed, try a request with a client that doesn't cache,
> such as wget. And then flush your browser's cache and restart it.
> 
> Some reading:
> http://wiki.apache.org/httpd/PHPDownload
> http://wiki.apache.org/httpd/DistrosDefaultLayout
> http://wiki.apache.org/httpd/WatchingHttpHeaders
> 
> hth,
> -- 
> noodl
> 
> ---------------------------------------------------------------------
> 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
> 
> 

---------------------------------------------------------------------
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


Mime
View raw message