Answer the question
In order to leave comments, you need to log in
PHP like fastcgi gives 403 error. What should I do?
There is a server with up-to-date, regularly updated software. There was a task to install php5.3 on it. It was decided to leave version 5.5 as an Apache module, and install the old one as fastcgi. As a result, 5.5 still works, and 5.3 writes to the browser that
You don't have permission to access /php53-cgi/index.php on this server.
and spits out the following in the logs:[authz_core:error] [pid 17066] [client 127.0.0.1:57830] AH01630: client denied by server configuration: /usr/lib/cgi-bin/php53-cgi
#!/bin/sh
PHPRC="/opt/php5.3/"
export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /opt/php5.3/bin/php-cgi
Answer the question
In order to leave comments, you need to log in
And what about the rights to the problematic file and the directory where it is located:
ls -l /usr/lib/cgi-bin/php53-cgi
ls -ld /usr/lib/cgi-bin/php53-cgi
Action php-script /usr/local/php5.3.27/bin/php
AddHandler php-script .php
build the fcgi genus binary correctly. In general, this is a rather hemorrhoid thing, two or more versions of puff on one piece of iron. copy-paste from mancala on the Internet will not fail. better hire an intelligent administrator, he will collect you correctly. I mean ./configure
that's where you need to print everything correctly.
You can solve a similar problem through chroot - everything will turn out much easier.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question