Verify if mcypt is really installed 1php -m|grep -i mcrypt Counter-check from phpmyadmin. If it say installed there, issue is that php-cli can't see mcrypt as a module. Find the mcrypt definition and symlink similar to below: 1ln -s /etc/php5/mods-available/mcrypt.ini /etc/php5/cli/conf.d/20-mcrypt.ini See details in …
Read Morehttps://pehapkari.cz/blog/2017/03/27/multiple-php-versions-the-easy-way/ https://github.com/oerdnj/deb.sury.org/wiki/Managing-Multiple-Versions
Read MoreSample error 1[Wed Jan 10 14:56:38.031846 2018] [:error] [pid 9378] [client 115.85.11.98:23443] PHP Fatal error: Class 'DOMDocument' not found in /var/www/sites/site.example.com/docroot/core/lib/Drupal/Component/Utility/Html.php on line 286 Solution: 1apt-get install php5.6-dom See details in …
Read MoreA quick way to test mail sending via php: 1<?php 2ini_set( 'display_errors', 1 ); 3error_reporting( E_ALL ); 4$from = "webmaster@example.com"; 5$to = "me@example.com"; 6$subject = "PHP Mail Test script"; 7$message = "This is a test to check the PHP Mail functionality"; …
Read MoreCheck first where php.ini is (create a page that dumps "phpinfo()") Edit upload_max_filesize=10M (assuming 10M is the requested limit) 2.1 Given that 'upload_max_filesize > 8M' edit as well "post_max_size" Restart apache (reload doesn't change the setting)
Read More1Check the current extension directory with: 23php-config --extension-dir 4and you can change it by setting extension_dir in php.ini: 56extension_dir="/usr/lib64/php/modules" 7Don't forget to restart Apache. See https://serverfault.com/questions/316156/change-php-modules-directory
Read MoreRemi modules are installed in non-standard location. Geerlingguy's ansible role harmonizes it and install it in standard locations. So, if you're not familiar with standard locations, just do the following trick NOTE: In this case, I installed the memcache module for php7.1 from Remi's repo. 1yum install -y …
Read More1yum install -y memcached libmemcached php71-php-pecl-memcache.x86_64 Harden memcached by at least making it listed only on loopback. Config is in /etc/sysonfig/memcached 1PORT="11211" 2USER="memcached" 3MAXCONN="1024" 4CACHESIZE="64" 5OPTIONS="-l 127.0.0.1 -U 0" Details in …
Read More