reindex failure - Class 'Magento_Db_Adapter_Pdo_Mysql' not found
-
10-10-2020 - |
Question
I recently upgraded our shop to Magento 1.9.3.2 but we've had indexing issues since.
when I run the reindex command:-
php -f /var/www/shell/indexer.php reindexall
I get this error:-
PHP Fatal error: Class 'Magento_Db_Adapter_Pdo_Mysql' not found in /var/www/app/code/core/Mage/Core/Model/Resource.php on line 175
I get the exact same error for these commands:-
php -f compiler.php clear
php -f compiler.php disable
we tried changing the permissions to 775 on this file (where the class id defined)
/var/www/lib/Magento/Db/Adapter/Pdo/Mysql.php
but it didn't help.
Can anyone suggest how we can resolve this?
Solution 2
It was a permissions issue. I ran the following:
sudo sh ResetFilePermissions.sh
which was at the same level as our magento root then restarted Apache
I don't know if this script was written by Magento or if it was written in house. Now I no longer get the error '..Class 'Magento_Db_Adapter_Pdo_Mysql' not found..'. :)
Now I can disable the compiler.
Then I get a new error :/ which I hope has a solution: PHP Fatal error: Uncaught exception 'Mage_Core_Exception' with message 'Indexer model is not defined.' in /var/www/app/Mage.php:595
OTHER TIPS
Disable compiler by command prompt
php -f shell/compiler.php -- disable
php -f shell/compiler.php -- clear
Also give permission to your user group
The chown command has the following syntax:
chown username:groupname directory
Example
sudo chown -R root:alex your_root_directory
Hope it will work.