Make Gadgets Work

Posts tagged "PHP"

Install the Apache module for specific php version sudo apt install libapache2-mod-php7.3 Copy the php.ini from previous version to newer version after making a backup of the original php.ini for new version. sudo cp /etc/php/7.3/apache2/php.ini php.ini.original sudo cp /etc/php/7.2/apache2/php.ini /etc/php/7.3/apache2/php.ini Install specific php modules for Apache and enable the php modules on new version of php. sudo apt install php7.3-curl php7.3-gd php7.3-gmp php7.3-intl php7.3-mbstring php7.3-simplexml php7.3-soap php7.3-wddx php7.3-xmlreader php7.3-xmlrpc php7.3-xmlwriter php7.3-xsl php7.3-zip php7.3-xml php7.3-mysql sudo phpenmod -v 7.3 pdo_mysql soap wddx xmlreader xmlrpc xsl zip intl gd dom curl mysqlnd gmp simplexml mysqli mbstring Disable old php version, enable new version and restart Apache server. sudo a2dismod php7.2 sudo a2enmod php7.3 sudo systemctl restart apache2

Upgrading PHP version on Linux for Apache

Install the Apache module for specific php version sudo apt install libapache2-mod-php7.3 Copy the php.ini from previous version to newer version after making a backup of the original php.ini for new version. sudo cp /etc/php/7.3/apache2/php.ini php.ini.original sudo cp /etc/
After updating from Ubuntu 14.04, the php and Apache stopped being friends and one of the WordPress site I maintain went all white and admin page was just showing php code. This is apparently because of a known issue in 16.04 with upgrade to php7 as shown on the ubuntu forum here Using the guidance from this link and with some more of duckduckgo search later, I managed to resolve the problem thus: #1. Install aptitude if it is not already installed using sudo apt-get install aptitude #2. Removed php7 and unwanted php using sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "` #3. Added old repo using sudo add-apt-repository ppa:ondrej/php #4. Updated repo sudo apt-get update #5. Installed php5.6 sudo apt-get install php5.6 sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml php5.6-curl php5.6-gd php5.6-zip #6. Checked php version sudo php -v #7. Enabled mod_php sudo a2enmod php5 Ignored error message #8. Opened php5.6 conf sudo nano /etc/apache2/mods-enabled/php5.6.conf #9. Commented following lines <IfModule mod_userdir.c> <Directory /home/*/public_html> php_admin_flag engine Off </Directory> </IfModule> #10. Restarted the server sudo service apache2 restart

Fix for PHP Issues after upgrade to Ubuntu 16.04.1 (Xenial)

After updating from Ubuntu 14.04, the php and Apache stopped being friends and one of the WordPress site I maintain went all white and admin page was just showing php code. This is apparently because of a known issue in 16.04 with upgrade to php7 as shown on