How to use PHP CGI instead of PHP-FPM with APache2

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

My Drupal 7 site works fine on a Debian6 with PHP 5.3.7 as native package. The configuration file of Apache2 is oriented to use CGI.

I exported the same site on a Debian9 with Php7.x as native package. I https://forum.tuteehub.com/tag/note">noted several bug on the site with this version of PHP. I also used the phpbrew tools for install PHP5.3.7. I created a new service to launch PHP as FastCGI Process Manager. So I wrote the configuration of my site.conf with this line to use FPM :

ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/var/www/site/$1

The site looks like working fine. PHPinfo shows I'm using PHP 5.3.7. Barring I can not go to the back end of Drupal after put my admin login and password. I https://forum.tuteehub.com/tag/note">note these error message in the apache log :

[Tue Jan 31 18:13:45.910223 2019] [proxy:debug] [pid 1789] proxy_util.c(2884): AH02824: FCGI: connection established with 127.0.0.1:8998 (*)
[Tue Jan 31 18:13:56.835196 2019] [proxy_fcgi:error] [pid 1789] [client 10.0.2.2:33649] AH01067: Failed to read FastCGI header, referer: http://127.0.0.1/user/login
[Tue Jan 31 18:13:56.835716 2019] [proxy_fcgi:error] [pid 1789] (104)Connection reset by peer: [client 10.0.2.2:33649] AH01075: Error dispatching request to : , referer: http://127.0.0.1/user/login
[Tue Jan 31 18:13:56.835887 2019] [proxy:debug] [pid 1789] proxy_util.c(2171): AH00943: FCGI: has released connection for (*)

My browser got Error HTML 503 (Failed to load resource: the server responded with a status of 503 (Service Unavailable)) I don't know why apache is looking to lost the connection. What's meaning "Error dispatching request" ? How to have more information about this error message.

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.