Last active
December 19, 2015 18:49
-
-
Save wgm89/6001874 to your computer and use it in GitHub Desktop.
upgrade php5.3 to php 5.4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo add-apt-repository ppa:ondrej/php5 | |
| sudo apt-get update | |
| sudo apt-get install php5 | |
| upgrading PHP to 5.4 gives 502 Bad Gateway errors. | |
| fix: | |
| # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | |
| location ~ ^/(app|app_dev)\.php(/|$) { | |
| fastcgi_pass 127.0.0.1:9000; | |
| fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
| include fastcgi_params; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| fastcgi_param HTTPS off; | |
| } | |
| becomes this: | |
| # pass the PHP scripts to FastCGI server at /var/run/php5-fpm.sock | |
| location ~ ^/(app|app_dev)\.php(/|$) { | |
| fastcgi_pass unix:/var/run/php5-fpm.sock; | |
| fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
| include fastcgi_params; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| fastcgi_param HTTPS off; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment