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

php 5.2 as cgi automatically changes protocol !!!



Dear list,

I ma facing a strange problem in my debian squeeze box having apache and both php 5.3 as module
 + php 5.2 as cgi.

Whenever I set any site to work with 5.2 cgi, the http:// protocol automatically changes to https://
and the link becomes as

````````````
https://192.168.1.1/php5-cgi/<site-name>/index.php
```````````````

Just notice:

1] protocol automatically changes to https://
2] an inclusion of /php5-cgi/ after the IP

IF I remove the /php5-cgi/ and keep the protocol as it is (https://) site appers, but as soon as I click on any link
the problem reappears !!!


The apache related config is


/etc/apache2/php52.conf

 ``````````````````
ScriptAlias /php5-cgi  /usr/lib/cgi-bin/php52/php52.fcgi
Action application/x-httpd-php5  /php5-cgi
AddHandler application/x-httpd-php5 .php .php5 .php4 .php3 .phtml
 ````````````````````

The wrapper script is

/usr/lib/cgi-bin/php52/php52.fcgi

`````````
#!/bin/sh
export PHPFCGICHILDREN=4
export PHPFCGIMAX_REQUESTS=200
export PHPRC="/usr/local/bin/php5.2/etc/php.ini"
exec /usr/local/bin/php5.2/bin/php-cgi
```````````

and the site which needs php 5.2 have the following at .htaccess

``````````
<FilesMatch "\.php">
SetHandler application/x-httpd-php5
</FilesMatch>
`````````

The info.php reports it has php 5.2, but the strange protocol issue and inclusion of /php5-cgi/
create problems.

any clue is very much appreciated.

Thanks


Reply to: