cp /etc/php.ini php.ini.20200708 yum remove php* yum install php73 php73-mysqlnd php73-common php73-gd php73-mbstring php73-mcrypt php73-devel php73-xml
Remember to check apache log to make sure there is no error or warning.
cp /etc/php.ini php.ini.20200708 yum remove php* yum install php73 php73-mysqlnd php73-common php73-gd php73-mbstring php73-mcrypt php73-devel php73-xml
Remember to check apache log to make sure there is no error or warning.
yum remove php* yum --enablerepo=remi-php73 install php yum --enablerepo=remi-php73 install php-gd php-mbstring php-mcrypt php-devel php-xml php-zip php-mysqlnd php-common phpmyadmin
Reference: https://www.digitalocean.com/community/questions/trying-to-install-latest-php-version-on-centos-7
$content = @file_get_contents(...) if ($content === false) { ... }
Step 1. Download http://curl.haxx.se/ca/cacert.pem and save it to /Applications/AMPPS/extra/etc/openssl/certs/cacert.pem
Step 2. Add the below lines into php.ini
[curl]
curl.cainfo=”/Applications/AMPPS/extra/etc/openssl/certs/cacert.pem”
openssl.cafile=”/Applications/AMPPS/extra/etc/openssl/certs/cacert.pem”
Install
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
Update
sudo composer self-update
Problem:
phpThumb doesn’t work on php5.4
Solution:
Open phpthumb.class.php, change this line:
@$ImageOutFunction($this->gdimg_output, null, $this->thumbnailQuality);
into:
@$ImageOutFunction($this->gdimg_output, ”, $this->thumbnailQuality);
Reference:
http://php.net/manual/en/function.imagejpeg.php
http://se-suganuma.blogspot.hk/2013/01/php-54upgradephpthumbthumbnail.html
$string = preg_replace_callback('/\\\\u([0-9a-fA-F]{4})/', function ($match) { return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); }, $string);
Edit php.ini
max_input_vars = 3000
$date = strtotime(‘first day of previous month’);
// Don’t use this:
$date = strtotime(‘-1 month’, strtotime(‘2011-03-30 01:01:01’));
function stripslashes_deep($value) {
$value = is_array($value) ? array_map(‘stripslashes_deep’, $value) : stripslashes($value);
return $value;
}
if (get_magic_quotes_gpc()) {
$_POST = array_map(‘stripslashes_deep’, $_POST);
}