User Tools

Site Tools


php7_2_rpi3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

php7_2_rpi3 [2019/01/21 17:21]
pi created
php7_2_rpi3 [2019/01/21 18:05] (current)
pi
Line 40: Line 40:
 Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
     with Zend OPcache v7.2.9-1, Copyright (c) 1999-2018, by Zend Technologies</​code>​     with Zend OPcache v7.2.9-1, Copyright (c) 1999-2018, by Zend Technologies</​code>​
 +
 +=== 2.1 --- Nginx 1.13 install ===
 +
 +We want to use a faster, more up to date, and secure version of nginx here, and luckily there'​s a nginx 1.13 version available in the buster release:
 +<​code>​sudo apt-get install -t buster nginx nginx-common nginx-full nginx-doc</​code>​
 +
 +=== 2.2 --- Tweak PHP7.2 ===
 +
 +Once fully installed (accept any defaults when prompted), we should now tweak our PHP 7.2 FPM pool to be better optimized:
 +<​code>​sudo nano /​etc/​php/​7.2/​fpm/​conf.d/​90-pi-custom.ini</​code>​
 +And add:
 +<​code>​cgi.fix_pathinfo=0
 +upload_max_filesize=64m
 +post_max_size=64m
 +max_execution_time=600</​code>​
 +Now, we want to modify our PHP 7.2 FPM pool to use our pi user and group, so edit the config file:
 +<​code>​sudo nano /​etc/​php/​7.2/​fpm/​pool.d/​www.conf</​code>​
 +And and change the user and group references:
 +<​code>​user = pi
 +group = pi</​code>​
 +Then simply restart nginx and php-fpm to ensure the new changes are picked up:
 +<​code>​sudo service nginx restart
 +sudo service php7.2-fpm restart</​code>​
php7_2_rpi3.txt ยท Last modified: 2019/01/21 18:05 by pi