assert_quiet_eval is an internal PHP function used in phpMyAdmin and some other PHP-based applications. It is a wrapper around PHP's eval() function but suppresses error messages to prevent them from being displayed directly to users.
It is commonly used in:
Note: assert_quiet_eval is not a standard PHP function, but is part of phpMyAdmin's internal implementation.
If you see an error related to assert_quiet_eval, it is usually due to:
eval() function in php.ini for security reasonsSince assert_quiet_eval is an internal function, it may be deprecated or missing in certain PHP versions.
php -v
If your PHP version is 8.0 or later, some phpMyAdmin functions may break due to deprecated code.
If using PHP 8+, downgrade to PHP 7.4 (if phpMyAdmin requires it):
sudo apt install php7.4 php7.4-mysql php7.4-mbstring php7.4-xml php7.4-gd
sudo a2dismod php8.0
sudo a2enmod php7.4
sudo systemctl restart apache2
Some security-conscious configurations disable eval() to prevent remote code execution.
Run:
php --ini | grep "Loaded Configuration File"
Then edit the file:
sudo nano /etc/php/8.0/apache2/php.ini
(or adjust the PHP version accordingly)
Find this line:
disable_functions = eval, exec, shell_exec, system
If eval is listed, remove it, then restart Apache:
sudo systemctl restart apache2
or for Nginx:
sudo systemctl restart nginx php8.0-fpm
If assert_quiet_eval errors persist, phpMyAdmin files may be corrupted.
sudo mv /usr/share/phpmyadmin /usr/share/phpmyadmin_backup
sudo apt remove phpmyadmin -y
For Debian/Ubuntu:
sudo apt update
sudo apt install phpmyadmin -y
For manual installation:
cd /var/www/
wget https://files.phpmyadmin.net/phpMyAdmin/latest/phpMyAdmin-latest-all-languages.zip
unzip phpMyAdmin-latest-all-languages.zip -d phpmyadmin
rm phpMyAdmin-latest-all-languages.zip
sudo chown -R www-data:www-data /var/www/phpmyadmin
sudo chmod -R 755 /var/www/phpmyadmin
Restart Apache:
sudo systemctl restart apache2
If the issue persists, check for server-related errors.
sudo tail -f /var/log/apache2/error.log
sudo tail -f /var/log/nginx/error.log
By following these steps, you should be able to resolve assert_quiet_eval errors in phpMyAdmin and other PHP applications.