Jump to content

PHP Fatal error: Cannot use object of type Symfony\\Component\\HttpFoundation\\ParameterBag as array in Security/Admin.php:91


asmar

Recommended Posts

Hi all,

On the same server I had the live site running on domain.com and the dev at domaindev.com

I've copied all content + db to the live one (the previous was 1.6 while the new latest 1.7) and everything works fine apart from the fact that I cannot login at all at admin.

I'm getting a 500 error and the logs showing the following:

[Tue Nov 26 16:55:04.938070 2019] [fcgid:warn] [pid 2592] [client 178.147.6.212:55321] mod_fcgid: stderr: PHP Fatal error:  Uncaught Symfony\\Component\\Debug\\Exception\\FatalThrowableError: Cannot use object of type Symfony\\Component\\HttpFoundation\\ParameterBag as array in /home/eshop/public_html/src/Adapter/Security/Admin.php:91
[Tue Nov 26 16:55:04.938112 2019] [fcgid:warn] [pid 2592] [client 178.147.6.212:55321] mod_fcgid: stderr: Stack trace:
[Tue Nov 26 16:55:04.938115 2019] [fcgid:warn] [pid 2592] [client 178.147.6.212:55321] mod_fcgid: stderr: #0 /home/eshop/public_html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php(212): PrestaShop\\PrestaShop\\Adapter\\Security\\Admin->onKernelRequest(Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent), 'kernel.request', Object(Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))
[Tue Nov 26 16:55:04.938119 2019] [fcgid:warn] [pid 2592] [client 178.147.6.212:55321] mod_fcgid: stderr: #1 /home/eshop/public_html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php(44): Symfony\\Component\\EventDispatcher\\EventDispatcher->doDispatch(Array, 'kernel.request', Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent))
[Tue Nov 26 16:55:04.938123 2019] [fcgid:warn] [pid 2592] [client 178.147.6.212:55321] mod_fcgid: stderr: #2 /home/eshop/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(127): Symfony\\Component\\EventDispatcher\\EventDispatcher->dispatch('kernel.request', Object(Symfony\\Component\\HttpKerne in /home/eshop/public_html/src/Adapter/Security/Admin.php on line 91

I've spend a lot of time searching similar problems but no luck in any of the posts.

Any help is very much appreciated.

Thanks

Link to comment
Share on other sites

  • 2 months later...

Hi! I try to transfer a live prestashop version in my local environnement but it doesn't work and I have exactly the same issue. I try to delete everything under var/cache but it create an other error because the program search into those files that doesn't exist anymore. I don't know what to do.

The error I have when I delete files under cache

[17-Feb-2020 11:21:32 Europe/Berlin] PHP Fatal error:  require_once(): Failed opening required '/opt/lampp/htdocs/backup/var/cache/prod/appParameters.php' (include_path='/opt/lampp/htdocs/backup/vendor/pear/pear_exception:/opt/lampp/htdocs/backup/vendor/pear/console_getopt:/opt/lampp/htdocs/backup/vendor/pear/pear-core-minimal/src:/opt/lampp/htdocs/backup/vendor/pear/archive_tar:.:/opt/lampp/lib/php') in /opt/lampp/htdocs/backup/config/bootstrap.php on line 86

Can you help me ?

 

Link to comment
Share on other sites

  • 3 years later...

I know that is old thread, but maybe someone go here (like me).

I have similar problem, and after check that messages I check in: var/logs/prod.log and found this:

[YYYY-MM-DD HH:MM:ss] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\UndefinedFunctionException: "Attempted to call function "simplexml_load_string" from the global namespace." at /censored/www/classes/controller/AdminController.php line 2248 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException(code: 0): Attempted to call function \"simplexml_load_string\" from the global namespace. at /censored/www/classes/controller/AdminController.php:2248)"} []

so i found that i havn't installed php-xml module (or php-simplexml) - after install needed module now all is ok (yes i migrate page from one to another server).

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...