PDA

View Full Version : Ok I moved one of my...


bluesin
04-11-2005, 05:39 PM
Live data sites with no real problem except for the fact that my damn netgear router died about the time I did it keeping me off of the net pretty much since saturday.

On the existing site I have the following in a .htaccess file,

<Files dbn>
AcceptPathInfo on
SetOutputFilter PHP
SetInputFilter PHP
</Files>

On the new site it does not recognize "dbn" as a php file and just spits it out as text.

Do I need to do it differently in the new setup, perhaps in the site http vitrual host config?

Justec
04-11-2005, 10:30 PM
In the virtual host you probably need to change the AllowOveride to incdlue the .htaccess file.

bluesin
04-12-2005, 09:03 AM
its reading the .htaccess file, I've got a directoryindex with "dbn" as the first file, which it processes. It just does not recognize it as php which it should as far as I
can tell.

In addition I tried adding it to the virtualhosts http file and that did not work either.

bluesin
04-12-2005, 02:49 PM
It looks like the error is caused because PHP is being invoked as a cgi program under the interworx configuration and thus needs

<Files dbn>
SetHandler application/x-httpd-php
</Files>

Instead of the above.

Is there any reason for invoking php in this manner and are there any performance/server implications as a result?

Thanks...

IWorx-Paul
04-12-2005, 04:20 PM
Hi Bluesin,

PHP isn't being invoked as a cgi program under the interworx configuration. You can confirm this by creating a php page and using the php_sapi_name (http://us3.php.net/php_sapi_name) php function (see the example on the doc page).

I believe the SetHandler application/x-httpd-php syntax is a requirment of the newer Apache version, that's all.

Paul

bluesin
04-12-2005, 04:39 PM
Hmmmm, that is the way it was done when PHP was accessed as a CGI program, perhaps the

<Files dbn>
AcceptPathInfo on
SetOutputFilter PHP
SetInputFilter PHP
</Files>

Is no longer applicable?

I was thinking along those lines also, especially since I know I'm not invoking it as a cgi program and I do not see a redirect or any sort that would do it either and could not figure out what was going on.

The directive

<Files dbn>
SetHandler application/x-httpd-php
</Files>

Is documented in the Express Engine Manual as the setting required for PHP as CGI, I just tried it on a whim, and it worked.

So your thinking that they basically just did away with the output and input filter method?

bluesin
04-12-2005, 05:05 PM
I checked the change logs and don't find it anywhere.

I'm thinking that perhaps sometime recently PHP was changed from being invoked through a filter to a handler?