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

compiled php 5.5.20 throws error [RewriteRule directive is forbidden: /usr/lib/cgi-bin/php55-cgi]



Dear list,

I am already messed-up compiling php 5.5.20 as cgi module and seeking your kind guidance to put the things back on track.

I have compiled php 5.5.20 on debian (wheezy) 7.7
The objective is to allow some websites run with php 5.5.x as cgi module

The source code is located at /usr/local/src/php5-build/php-5.5.20 and compiled at /usr/local/bin/php-5.5.20

[...]

./configure --prefix=/usr/local/bin/php-5.5.20 --with-config-file-path=/usr/local/bin/php-5.5.20  --enable-cgi ..........
........

[....]


A /usr/lib/cgi-bin/php55-cgi has been created with following

[.....]

#!/bin/sh
PHP_FCGI_CHILDREN=1
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/local/bin/php-5.5.20/bin/php-cgi -c /usr/local/bin/php-5.5.20/lib/php.ini

[....]


and it is able to parse php

[...]

/usr/lib/cgi-bin/php55-cgi < /var/www/testme/phpinfo.php  | grep "PHP/"

X-Powered-By: PHP/5.5.20

[...]


A /etc/apache2/php55.conf has also been created with following

[...]

ScriptAlias /php5-cgi  /usr/lib/cgi-bin/php55-cgi
Action application/x-httpd-php5  /php5-cgi
AddHandler application/x-httpd-php5 .php .php5 .php4 .php3 .phtml
[.....]

and included at apache2.conf

After successful restart of apache a .htaccess has been placed at the required web-root folder

<...>
Options +FollowSymLinks +SymLinksIfOwnerMatch

RewriteEngine On

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

<...>

BUT the apache error log throws error as

,,,,,

[Thu Jan 01 09:03:22 2015] [error] [client 192.168.1.116] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /usr/lib/cgi-bin/php55-cgi
[Thu Jan 01 09:03:22 2015] [debug] mod_deflate.c(700): [client 192.168.1.116] Zlib: Compressed 287 to 219 : URL /php5-cgi/testme/phpinfo.php

''''


Though the required modules are loaded already

,,,,
# a2enmod rewrite actions fcgid

Module rewrite already enabled
Module actions already enabled
Module fcgid already enabled
'''''

I'm clueless, anyone Please ?


Reply to: