I'm wokrking on upgrading my VM to PHP7 and I've run into a few issues such as: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo.so' - /usr/lib64/php/modules/pdo.so: undefined symbol: zend_get_executed_scope in Unknown on line 0

I want to re-download these files. How can I do this?

Working on centos 7.


The package manager for CentOS 7 is yum, it has a subcommand whatprovides which can be used to find out what package a file belongs to. For example, you want to know how to reinstall /usr/lib64/php/modules/pdo.so

yum whatprovides /usr/lib64/php/modules/pdo.so
php-pdo-5.4.16-42.el7.x86_64 : A database access abstraction module for PHP applications
Repo        : base
Matched from:
Filename    : /usr/lib64/php/modules/pdo.so

php-pdo-5.4.16-43.el7_4.x86_64 : A database access abstraction module for PHP applications
Repo        : updates
Matched from:
Filename    : /usr/lib64/php/modules/pdo.so

So, on my CentOS 7 system I would

yum install php-pdo

Rinse and repeat as required.


You have to reinstall the all the php packages that you installed (usually it's "php-*"). For any configuration file that is different in the RPM than what you have, RPM will create a ".rpmnew" file and will throw a warning when running the transaction of installing the package again. You can manually use those files to replace your broken ones (or even use a diff tool to figure out what you want or not).

As a side note: take care if you have custom ini files in /etc/php.d/. Yum will not throw any warning about those. You could remove/rename that folder before running reinstall.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy