In This Tutorial, We will update ICU system package from 50.2 to 64.1 but the latest package is not available in repo. So we will build it manually then we will compile PHP-FPM 7.2.X again.
How to Install Latest ICU system package for Presta 1.7.6.3 on CWP7?
Select everything except pgsql, pdo-pgsql, mongodb, recode, & sqlsrv and save custom configuration. Don't use IMAP & Recode at a time Because imap (libc-client) and recode (librecode) use the same function hash_lookup(). Here memcached server also will be installed. It was recommended by Presta . Now click on "Start Compile(build & install)".
Check the log and when finished , Please reboot again
Now Restart Webserver and reload again , PrestaShop found all the requirements .
Proceed to next step, What you see ? Yes , it is 504 Gateway Time-out. In Next tutorial, We will fix that issue(s).
If you use PHP Selector 2
For PHP Version Switcher
# cd /home/datahead/public_html/
# php bin/symfony_requirements
# icuinfo | grep version
# yum list available | grep libicu
How to Install Latest ICU system package for Presta 1.7.6.3 on CWP7?
# cd /usr/local/src
# wget http://download.icu-project.org/files/icu4c/64.1/icu4c-64_1-src.tgz
# tar -xvf icu4c-*.tgz
# cd icu/source/
# sed -i '/#define __UCONFIG_H__/a #define UCONFIG_ENABLE_PLUGINS 1' common/unicode/uconfig.h
# ./configure --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib64 --datadir=/usr/share --enable-plugins
# make -j4 && make install
# reboot
# icuinfo | grep version
Compile PHP-FPM 7.2.X
Now We need to compile PHP-FPM 7.2.X again as describe in below snapshot.Select everything except pgsql, pdo-pgsql, mongodb, recode, & sqlsrv and save custom configuration. Don't use IMAP & Recode at a time Because imap (libc-client) and recode (librecode) use the same function hash_lookup(). Here memcached server also will be installed. It was recommended by Presta . Now click on "Start Compile(build & install)".
Check the log and when finished , Please reboot again
# tail -f /var/log/php-selector-rebuild.log
# reboot
PHP Settings on Server Side
Now Open the php.ini file, Change to your size, in this case we are using 4096MB, please note that post_max_size and memory_limit need to be greater than upload_max_filesize. If you have a root access, do the followings# vi /opt/alt/php-fpm72/usr/php/php.ini
upload_max_filesize = 4096M
post_max_size = 4146M
memory_limit = 5120M
max_input_time = 300
max_execution_time = 300
max_input_vars = 5000
max_file_uploads = 50
register_globals = Off
magic_quotes_gpc = Off
safe_mode = Off
safe_mode_gid = Off
short_open_tag = Off
allow_url_fopen = On
allow_url_include = Off
date.timezone = Asia/Singapore
# systemctl reload php-fpm72.service
PHP Settings on Client Side
You can also change user.ini & php.ini file from customer panel:# vi /home/datahead/public_html/.user.ini
upload_max_filesize = 4096M
post_max_size = 4146M
memory_limit = 5120M
max_input_time = 300
max_execution_time = 300
register_globals=Off
magic_quotes_gpc=Off
safe_mode = Off
safe_mode_gid = Off
short_open_tag = Off
allow_url_fopen = On
allow_url_include = Off
date.timezone = Asia/Singapore
magic_quotes_runtime=Off
magic_quotes_sybase=Off
display_errors=Off
expose_php=Off
session.save_path=/tmp
error_reporting=E_ALL & ~E_NOTICE & ~E_DEPRECATED
Also Change the Settings# vi /home/datahead/public_html/php.ini
upload_max_filesize = 4096M
post_max_size = 4146M
memory_limit = 5120M
max_input_time = 300
max_execution_time = 300
register_globals=Off
magic_quotes_gpc=Off
safe_mode = Off
safe_mode_gid = Off
short_open_tag = Off
allow_url_fopen = On
allow_url_include = Off
date.timezone = Asia/Singapore
magic_quotes_runtime=Off
magic_quotes_sybase=Off
display_errors=Off
expose_php=Off
session.save_path="/tmp"
error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT
N.B: Here Some PHP Directive has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 7.2.X. Now Restart Webserver and reload again , PrestaShop found all the requirements .
Proceed to next step, What you see ? Yes , it is 504 Gateway Time-out. In Next tutorial, We will fix that issue(s).
If you use PHP Selector 2
# sed -i 's,^upload_max_filesize =.*$,upload_max_filesize = 4096M,' /opt/alt/php72/usr/php/php.ini
# sed -i 's,^post_max_size =.*$,post_max_size = 4146M,' /opt/alt/php72/usr/php/php.ini
# sed -i 's,^memory_limit =.*$,memory_limit = 5120M,' /opt/alt/php72/usr/php/php.ini
# sed -i 's,^max_input_time =.*$,max_input_time = 300,' /opt/alt/php72/usr/php/php.ini
# sed -i 's,^max_execution_time =.*$,max_execution_time = 300,' /opt/alt/php72/usr/php/php.ini
# sed -i 's,^; max_input_vars =.*$,max_input_vars = 5000,' /opt/alt/php72/usr/php/php.ini
# sed -i 's,^max_file_uploads =.*$,max_file_uploads = 50,' /opt/alt/php72/usr/php/php.ini
# sed -i 's,^allow_url_fopen =.*$,allow_url_fopen = On,' /opt/alt/php72/usr/php/php.ini
# sed -i 's,^allow_url_include =.*$,allow_url_include = Off,' /opt/alt/php72/usr/php/php.ini
# sed -i 's,^short_open_tag =.*$,short_open_tag = Off,' /opt/alt/php72/usr/php/php.ini
# sed -i 's,^;date.timezone =.*$,date.timezone = Asia/Singapore,' /opt/alt/php72/usr/php/php.ini
# sed -i 's,^display_errors =.*$,display_errors = Off,' /opt/alt/php72/usr/php/php.ini
# sed -i 's,^expose_php =.*$,expose_php = Off,' /opt/alt/php72/usr/php/php.ini
For PHP_FPM , just change php.ini file : /opt/alt/php-fpm72/usr/php/php.iniFor PHP Version Switcher
# sed -i 's,^upload_max_filesize =.*$,upload_max_filesize = 4096M,' /usr/local/php/php.ini
# sed -i 's,^post_max_size =.*$,post_max_size = 4146M,' /usr/local/php/php.ini
# sed -i 's,^memory_limit =.*$,memory_limit = 5120M,' /usr/local/php/php.ini
# sed -i 's,^max_input_time =.*$,max_input_time = 300,' /usr/local/php/php.ini
# sed -i 's,^max_execution_time =.*$,max_execution_time = 300,' /usr/local/php/php.ini
# sed -i 's,^; max_input_vars =.*$,max_input_vars = 5000,' /usr/local/php/php.ini
# sed -i 's,^max_file_uploads =.*$,max_file_uploads = 50,' /usr/local/php/php.ini
# sed -i 's,^allow_url_fopen =.*$,allow_url_fopen = On,' /usr/local/php/php.ini
# sed -i 's,^allow_url_include =.*$,allow_url_include = Off,' /usr/local/php/php.ini
# sed -i 's,^;date.timezone =.*$,date.timezone = Asia/Dhaka,' /usr/local/php/php.ini
# sed -i 's,^expose_php =.*$,expose_php = Off,' /usr/local/php/php.ini
By Default , it is on, Don't chnage it untill necessary
# sed -i 's,^short_open_tag =.*$,short_open_tag = Off,' /usr/local/php/php.ini
# sed -i 's,^display_errors =.*$,display_errors = Off,' /usr/local/php/php.ini
Comments
Post a Comment
You are always welcome to comment here, but your remarks should be relevant to the conversation. To keep the exchanges focused and engaging, we reserve the right to remove off-topic comments, or self-promoting URLs and vacuous messages.
We will try to reply to your queries as soon as time allows.
Regards,
Admin