Joomla | Database Error: The PHP `ext/mysql` extension is removed in PHP 7, cannot use the `mysql` driver

This error shows up when you change/upgrade the PHP version of your Joomla website to PHP 7.XX.

This is because the mysql extension is removed in PHP 7. You may need to change all those functions in PHP code to mysqli_* instead of mysql_* if you want to use PHP 7 for your Joomla website.

In cPanel EasyApache 4, the mysqli extension is provided by the mysqlnd package.

For example:

root@server [~]# rpm -qa | grep ea-php7 | grep mysqlnd

cloudlinux: PHP selector NOT working or BROKEN

It was truly devastating and I was dismayed when I noticed the PHP selector in server got broken or stopped working since the last easy-apache. Tones of tickets were popped in when clients lost their custom php versions and its custom settings

I tried to select the php version 5.4 for the domain and set post_max_size and upload_max_filesize to 32MB each







And I checked by putting a phpinfo page in the domain, sadly the changes I made in php selector settings had no effect








Following is the solution that I could finally find out to fix it … tadaa 🙂

PHP configured as suphp in server
# /usr/local/cpanel/bin/rebuild_phpconf –current
Available handlers: suphp dso fcgi cgi none
PHP4 SAPI: none
PHP5 SAPI: suphp
SUEXEC: enabled
RUID2: not installed

We must check if is present in /opt/suphp/sbin/suphp since it is suphp compiled with lve. In this case Cagefs and PHPSelector can’t work properly. You can check this by searching file /opt/suphp/sbin/suphp . Use strings command to read it since it is a binary file.

# strings /opt/suphp/sbin/suphp | grep lve

Output should be as…

# strings /opt/suphp/sbin/suphp |grep lve
Could not resolve path “

If it is not present, then you need to run:

# /usr/sbin/

Then force update cagefsctl to update alt_php.ini of all individual users in server.

# cagefsctl –force-update

Now see my changes 🙂









This should solve your issue

PHP 5.4 : Strict standards : Non-static methods called statically

I got the following error while loading up a domain running on php 5.4

Strict Standards: Non-static method JLoader::import() should not be called statically in /home/user/public_html/libraries/joomla/import.php on line 29
Strict Standards: Non-static method JLoader::register() should not be called statically in /home/user/public_html/libraries/joomla/loader.php on line 71
Strict Standards: Non-static method JLoader::import() should not be called statically in /home/user/public_html/libraries/joomla/import.php on line 32

and I did the below steps to clear them

In php.ini,
changed error_reporting = E_ALL | E_STRICT to error_reporting = E_ALL & ~E_NOTICE

changed display_errors = On to display_errors = Off

If the above still doesn’t help you, do the following too.

In the domains index.php file set it like inside the php division.


This should fix it 🙂

Bug in PHP release version.

I came across the following error while “make” process during custom compilation of PHP. This is bug in its release which can rectified by applying a patch.

/usr/local/src/php_sources/php-5.4.5/ext/dom/node.c: In function dom_canonicalization:
/usr/local/src/php_sources/php-5.4.5/ext/dom/node.c:1898: error: dereferencing pointer to incomplete

Download the patch “php1.patch” from the below URL.

and execute the following command in the php source directory.

@Host [/usr/src/php-5.2.17]# chmod 755 php1.patch
@Host [/usr/src/php-5.2.17]# patch -p0 < php1.patch
patching file ext/dom/node.c
Hunk #1 succeeded at 1950 (offset 55 lines).
patching file ext/dom/documenttype.c
Hunk #1 succeeded at 215 (offset 10 lines).
patching file ext/simplexml/simplexml.c
Hunk #1 succeeded at 1343 (offset -74 lines).

Now do compilation again, error is corrected 🙂