Jump to content

Declaration of AdminLoginControllerCore::viewAccess() must be compatible with AdminControllerCore:


Car Paradise

Recommended Posts

 
Hello, I'm really desperated for help. Trying to figure out this problem for a week..
I was using prestashop on hosting with no problem. Now I started my home web server and I'm trying to get it working.

I tried many different prestashop versions and reinstalled them x times.. All the time problem is that, I can Access front panel, but not the backend panel..

All the time it shows Http 500 ERROR : Server can't Handle this request. Now I enabled debugging and it shows me error:

Fatal error: Declaration of AdminLoginControllerCore::viewAccess() must be compatible with AdminControllerCore::viewAccess($disable = false) in C:\xampp\htdocs\Shop\controllers\admin\AdminLoginController.php on line 27

And Line 27

class AdminLoginControllerCore extends AdminController{

I can't understand why this is happening, because I haven't edited and changed any file or folder.

Link to comment
Share on other sites

12 hours ago, bellini13 said:

have you installed a module, or created a custom override of the AdminLoginController?

For overrides, check the /override/controller/admin/ folder to see if you have an override file there.  If you do, then you must figure out why...

Hello.

How I earlier said. I haven't changed anything just deleted instalation folder. No folder or file has been edited. And no modules are installed(Don't even know how to do it if I can't acces backend)

Link to comment
Share on other sites

Check which PHP Version is running on the webserver. I got this error when running on PHP 7.2.
I switched back to 7.1 (7.1.15 to be exact) and it solved the problem.
PHP 5.6, 7.0, 7.1 are definitely working.

  • Thanks 1
Link to comment
Share on other sites

41 minutes ago, eugenata said:

Modify: /controllers/admin/AdminLoginController.php

from:


public function viewAccess()
    {
        return true;
    }

to:


public function viewAccess($disable = false)
    {
        return true;
    }

work on 7.2 php version

 

Of course this works, but unfortunately that's not the only spot. You'll need to change every overriding method and not only for viewAccess, there are other Methods built the same way you need to change them also.
So it's way easier and less time consuming to just switch the php version

Link to comment
Share on other sites

  • 2 weeks later...

@selectshop.at thanks, that would then explain the message:

Warning: openssl_decrypt(): IV passed is only 7 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /mnt/web107/d0/05/5176805/htdocs/Prestashop_05/classes/Rijndael.php on line 85

but i don't use ssl at the moment. any ideas?
Link to comment
Share on other sites

  • 7 months later...
On 28/3/2018 at 9:23, SeKa said:

Compruebe qué versión de PHP se está ejecutando en el servidor web. Tengo este error cuando se ejecuta en PHP 7.2.
Cambié de nuevo a 7.1 (7.1.15 para ser exactos) y resolvió el problema.
PHP 5.6, 7.0, 7.1 definitivamente están funcionando.

gracias amigo solucionado, tenia la version 7.2 y la cambie a la 7.1 

Link to comment
Share on other sites

  • 3 months later...
On 3/28/2018 at 8:39 AM, Car Paradise said:

Hello.

How I earlier said. I haven't changed anything just deleted instalation folder. No folder or file has been edited. And no modules are installed(Don't even know how to do it if I can't acces backend)  FileZilla Malwarebytes Rufus 

I tried many different prestashop versions and reinstalled them x times.. All the time problem is that, I can Access front panel, but not the backend panel..

Edited by CORIYATSIA (see edit history)
Link to comment
Share on other sites

  • 1 month later...

I had same exact issue today.. I wanted to remove that red bar for support that displays in dashboard, so I uninstalled the facebook OpenGraph Tags module.. This gave me issues when trying to uninstall (gave me error message that I did not document), but finally was able to do so.. Then today, I tried to access BO and experienced 500 error, but the website was functioning..  I debugged and received following error.

Fatal error: Declaration of AdminLoginControllerCore::viewAccess() must be compatible with AdminControllerCore::viewAccess($disable = false) in /home/notredamefinejew/public_html/controllers/admin/AdminLoginController.php on line 27

After clearing out cache and following other forum posts suggestions (disable module gamification) with no success, I decided to look into the php version.

I was running php 7.0 and after upgrading to php 7.1, problem has since resolved!

I'm now able to access BO, and FO still functioning with no issues.

Link to comment
Share on other sites

  • 2 years later...

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...