Ah, the symbol lookup error
involving EVP_md2
and OPENSSL_3.0.0
provides a significant clue. It suggests a version mismatch or incompatibility issue between your PHP installation and the OpenSSL library that PHP is attempting to use. Given that you ran yum update
, it’s possible that OpenSSL was upgraded to version 3.4.0, while your PHP installation still expects an older version (3.0.0 in this case). To resolve this, follow these steps:
1. Identify PHP Modules Linked Against OpenSSL:
First, let’s determine which PHP modules might be causing the conflict. Execute the following commands:
# ldd $(which php) | grep libssl # ldd $(which php) | grep libcrypto #
These commands will show which OpenSSL libraries your php
executable is currently linked against. We’re looking for any indication that it’s still pointing to an older version.
2. Rebuild PHP Modules Against the New OpenSSL:
The most likely solution is to rebuild your PHP modules, especially the MySQL-related ones, against the newly installed OpenSSL 3.4.0 library. The exact steps depend on how PHP was installed:
If PHP was installed using yum
(from a repository like Remi’s or the standard CentOS/RHEL repos):
Reinstall the PHP MySQL module to link it against the current system libraries:
# sudo yum reinstall php-mysql # sudo yum reinstall php-mysqli # sudo systemctl restart httpd # If using Apache # sudo systemctl restart nginx # If using Nginx # sudo systemctl restart php-fpm # If using PHP-FPM #
If PHP was installed from source:
Reconfigure and recompile PHP and its extensions against the new OpenSSL. This process is more involved. Typically, you would go back to your PHP source directory and run:
# ./configure --with-mysql --with-mysqli --with-openssl # Add other options you used before make # sudo make install # sudo systemctl restart httpd # If using Apache # sudo systemctl restart nginx # If using Nginx # sudo systemctl restart php-fpm # If using PHP-FPM #
Important: Ensure your ./configure
options include the necessary database and OpenSSL support.
If using a package manager other than yum
: The process will vary depending on your package manager.
3. Check PHP Configuration:
Sometimes, specific PHP extensions might be explicitly linked against a particular OpenSSL version in their configuration. Check your PHP extension configuration files (often in /etc/php.ini
or in separate files under /etc/php.d/
) for any unusual OpenSSL-related settings.
Why this error prevents the php -m
command from working:
The php -m
command attempts to load all installed PHP modules. If a core library like OpenSSL has been upgraded to a version that a module was not compiled against, it can lead to “symbol lookup error” messages, preventing PHP from listing its modules.
Next Steps:
Please let me know how you installed PHP on your system (e.g., using yum
and which repository, from source, etc.). This will help me provide more precise instructions for rebuilding the PHP modules.
In the meantime, try the ldd
commands to see which OpenSSL libraries PHP is currently linked against. This might give us more information about the mismatch.