2

When i want to re Index in Magento2 in php version of 7.3, this display me this error

An exception was raised while creating "Request"; no instance returned

And when i change to version 7.2 Display this Error..... enter image description here

Also i use this command with my root Directory (same error)

So how can i simply use Indexer command in Magento2

I thing something too wrong with my Magento :( Also check this image :-- enter image description here

My all commands are not working. Also i change my Magento Folder Permissions

3
  • also when i run any command like bin/magento deploy:mode:set developer this Display Error Like:- An exception was raised while creating "Request"; no instance returned Commented Jun 28, 2019 at 12:38
  • 2
    The error that the indexer namespace is missing can be related to a previous error when installing dependencies or setting the configurations. Maybe recheck previous commands you executed. Otherwise, check if you can set up a local magento system and check if you can reproduce the problem.
    – sebastian
    Commented Jun 28, 2019 at 13:00
  • i add a new image when i write another commands display these errors... please check this Commented Jun 28, 2019 at 13:10

1 Answer 1

1

Please mention your Magento Version first.

An exception was raised while creating "Request"; no instance returned

Your First error is coming due to most likely not changing php version properly, you should only use PHP version 7.2 when you're working on Magento 2.3.x

Change PHP version according to your Magento version, refer below link if you're using Magento 2.3.x

https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html

Try below commands for changing PHP version

sudo a2dismod php7.0
sudo a2enmod php7.2
sudo service apache2 restart
sudo update-alternatives --set php /usr/bin/php7.2

Also refer this link for similar issue

Magento 2.2 with PHP 7.1.9 Issue

About your second error regarding 7.2 version,

Try to give permission first to your Magento Directory

sudo chmod -R 777 magentoDir

then use your upgrade-deploy commands.

if that doesn't help try to find solution in below link.

https://community.magento.com/t5/Magento-2-x-Admin-Configuration/CLI-not-recognizing-magento-commands/td-p/45869

5
  • 1
    Yes it is Version Error, also when i change my php version to 7.2 all commands are run normally. But when start admin panel with php changed version 7.2 , My admin panel was to working. so always i change my php version and apply all these commands and again change version to 7.3. after that i found a short way to apply my commands without change version is:- /usr/bin/php7.2 bin/magento indexer:reindex so if you have anny suggestion for this please give me Thanks Commented Jul 3, 2019 at 10:56
  • have you solved your problem?
    – Mohit Rane
    Commented Jul 3, 2019 at 11:00
  • now i write my full comment Please read it now Commented Jul 3, 2019 at 11:02
  • 1
    you can use php7.2 bin/magento indexer:reindex if this solved your problem mark it as accepted so it will help others.
    – Mohit Rane
    Commented Jul 3, 2019 at 11:06
  • Thanks This command Helps me alwayes php7.2 bin/magento indexer:reindex Commented Jul 4, 2019 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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