0

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?

  • those 2 compiler commands were – Yeyeo Jul 20 '17 at 13:35
  • php -f compiler.php clear – Yeyeo Jul 20 '17 at 13:35
  • and: php -f compiler.php disable – Yeyeo Jul 20 '17 at 13:36
  • they were an attempt to disable the compiler, but they got the same error as the indexer – Yeyeo Jul 20 '17 at 13:37
0

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.

  • we tried that but got the same error as for the indexer. Thanks tho. – Yeyeo Jul 20 '17 at 13:38
  • you used a different syntax so I tried it: php -f /var/www/shell/compiler.php -- clear – Yeyeo Jul 20 '17 at 13:42
  • I got the same error. This:- – Yeyeo Jul 20 '17 at 13:44
  • 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 – Yeyeo Jul 20 '17 at 13:45
  • same for the 2nd statement – Yeyeo Jul 20 '17 at 13:45
0

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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.