barzacchini Posted December 5, 2017 Share Posted December 5, 2017 New Installation on my windows 2008 r2 server Installation without errors and the shop is perfectly functionaly. When I open admin page (http://localhost/admin/) I have an error: FatalErrorException in AdminDashboardController.php line 539: Compile Error: Declaration of AdminDashboardControllerCore::setMedia() must be compatible with AdminControllerCore::setMedia($isNewTheme = false) Prestashop 1.7.2.4 php-7.2.0-Win32-VC15-x64 Apache 2.4 mysql-5.7.20.0 can help me? Thanks Andrea Link to comment Share on other sites More sharing options...
barzacchini Posted December 5, 2017 Author Share Posted December 5, 2017 Sorry, other page give me same errors ! Please help me C:\Apache24\logs\error.log [Tue Dec 05 09:48:16.033325 2017] [core:notice] [pid 5352:tid 284] AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache24' [Tue Dec 05 09:48:16.034325 2017] [mpm_winnt:notice] [pid 5352:tid 284] AH00418: Parent: Created child process 6148 [Tue Dec 05 09:48:16.431376 2017] [ssl:warn] [pid 6148:tid 152] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name [Tue Dec 05 09:48:17.074958 2017] [ssl:warn] [pid 6148:tid 152] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name [Tue Dec 05 09:48:17.07[spam-filter] 2017] [mpm_winnt:notice] [pid 6148:tid 152] AH00354: Child: Starting 64 worker threads. [Tue Dec 05 09:48:17.289985 2017] [mpm_winnt:notice] [pid 6164:tid 152] AH00364: Child: All worker threads have exited. [Tue Dec 05 09:48:23.933329 2017] [php7:error] [pid 6148:tid 1012] [client ::1:51003] PHP Fatal error: Declaration of AdminDashboardControllerCore::setMedia() must be compatible with AdminControllerCore::setMedia($isNewTheme = false) in C:\\Apache24\\htdocs\\controllers\\admin\\AdminDashboardController.php on line 539 [Tue Dec 05 09:48:26.741185 2017] [php7:error] [pid 6148:tid 1004] [client ::1:51004] PHP Fatal error: Declaration of AdminDashboardControllerCore::setMedia() must be compatible with AdminControllerCore::setMedia($isNewTheme = false) in C:\\Apache24\\htdocs\\controllers\\admin\\AdminDashboardController.php on line 539 [Tue Dec 05 09:48:29.939591 2017] [php7:error] [pid 6148:tid 1004] [client ::1:51007] PHP Fatal error: Declaration of AdminDashboardControllerCore::setMedia() must be compatible with AdminControllerCore::setMedia($isNewTheme = false) in C:\\Apache24\\htdocs\\controllers\\admin\\AdminDashboardController.php on line 539 [Tue Dec 05 09:48:46.028134 2017] [php7:notice] [pid 6148:tid 1004] [client ::1:51009] PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in C:\\Apache24\\htdocs\\vendor\\prestashop\\smarty\\sysplugins\\smarty_internal_compilebase.php on line 75, referer: http://localhost/install/index.php [Tue Dec 05 09:48:49.001512 2017] [php7:notice] [pid 6148:tid 996] [client ::1:51016] PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in C:\\Apache24\\htdocs\\vendor\\prestashop\\smarty\\sysplugins\\smarty_internal_compilebase.php on line 75, referer: http://localhost/install/index.php [Tue Dec 05 09:54:21.084681 2017] [php7:error] [pid 6148:tid 1012] [client ::1:51032] PHP Fatal error: Declaration of AdminDashboardControllerCore::setMedia() must be compatible with AdminControllerCore::setMedia($isNewTheme = false) in C:\\Apache24\\htdocs\\controllers\\admin\\AdminDashboardController.php on line 539 Link to comment Share on other sites More sharing options...
barzacchini Posted December 5, 2017 Author Share Posted December 5, 2017 hello! Finaly I solved the problem was php version I installed php-7.0.26-Win32-VC14-x64 , configured php.ini and all is ok thank Andrea 1 Link to comment Share on other sites More sharing options...
Mold Posted December 6, 2017 Share Posted December 6, 2017 Hi! Please tell me how you configured php.ini, because I have the same problem and no succes for now. Or upload it somewhere. Link to comment Share on other sites More sharing options...
Besens Posted December 6, 2017 Share Posted December 6, 2017 (edited) Exactly the same thing for me... But on ArchLinux : Apache/2.4.29 (Unix) PHP/7.2.0 Presta. 1.7.2.4 Edited December 6, 2017 by Besens (see edit history) Link to comment Share on other sites More sharing options...
Besens Posted December 6, 2017 Share Posted December 6, 2017 (edited) In fact just change add $isNewTheme = false in setMedia declaration and set $isNewTheme in parent::setMedia call. AdminDashboardController.php (# 43) public function setMedia($isNewTheme = false) { parent::setMedia($isNewTheme); $this->addJqueryUI('ui.datepicker'); $this->addJS(array( _PS_JS_DIR_.'vendor/d3.v3.min.js', __PS_BASE_URI__.$this->admin_webpath.'/themes/'.$this->bo_theme.'/js/vendor/nv.d3.min.js', _PS_JS_DIR_.'/admin/dashboard.js', )); $this->addCSS(__PS_BASE_URI__.$this->admin_webpath.'/themes/'.$this->bo_theme.'/css/vendor/nv.d3.css'); } I submited this correction on GitHub (https://github.com/PrestaShop/PrestaShop/pull/8588) Edited December 6, 2017 by Besens (see edit history) 4 1 Link to comment Share on other sites More sharing options...
Mold Posted December 6, 2017 Share Posted December 6, 2017 (edited) Interesting, we a fixing Prestashop.... I was a bit afraid to make changes to not break it, but since I just test it now ... So after I applied the fix you said I got 2 more errors: FatalErrorException in AdminLoginController.php line 400: Compile Error: Declaration of AdminLoginControllerCore::viewAccess() must be compatible with AdminControllerCore::viewAccess($disable = false) Then I edited line 164 (in AdminLoginController.php) : public function viewAccess() to: public function viewAccess($disable = false) And got the next error: FatalErrorException in AdminLoginController.php line 400: Compile Error: Declaration of AdminLoginControllerCore::setMedia() must be compatible with AdminControllerCore::setMedia($isNewTheme = false) Then edited line 47: public function setMedia() to: public function setMedia($isNewTheme = false) And got acces to BO, at last. But... I have a warning in BO: Warning line 569 file C:\\Apache24\\htdocs\\classes\\controller\\AdminController.php[2] count(): Parameter must be an array or an object that implements Countable Then a lot of more errors inside BO. Someone from Presta team have to definitely check this tread. I do have PHP 7.2(64bit) installed, on Apache 2.4.29(64bit) Windows 7(64bit), VC2017(64bit), MySql 5.6(64bit) PrestaShop 1.7.2.4 Edited December 6, 2017 by Mold (see edit history) 2 Link to comment Share on other sites More sharing options...
Wallgrind.nl Posted December 6, 2017 Share Posted December 6, 2017 You should not use PHP 7.2 Even php 7.1 is not properly working on few prestashop instances Link to comment Share on other sites More sharing options...
Mold Posted December 7, 2017 Share Posted December 7, 2017 (edited) I've managed to install Prestashop with PHP 7.1 Had to add this to apache's httpd.connf: LoadFile "C:/php71/libeay32.dll" LoadFile "C:/php71/ssleay32.dll" LoadFile "C:/php71/php7ts.dll" LoadFile "C:/php71/libpq.dll" Because after many tests with different versions of PHP I had no Curl and OpenSSL in phpinfo(). What is interesting the files libeay32.dll and sleay32.dll are missing in PHP7.2. This may have something to do with the problem noted above. Edited December 7, 2017 by Mold (see edit history) Link to comment Share on other sites More sharing options...
Marcelo Nava Posted January 14, 2018 Share Posted January 14, 2018 On 5/12/2017 at 8:14 AM, barzacchini said: hello! Finaly I solved the problem was php version I installed php-7.0.26-Win32-VC14-x64 , configured php.ini and all is ok thank Andrea Hi. can you please tell me how can i install? please Link to comment Share on other sites More sharing options...
Marcelo Nava Posted January 16, 2018 Share Posted January 16, 2018 por favor me pueden dar una mano, ayer me salia el error en el admin, pero la paginma cargada bien. Ahora me sale este error [PrestaShopException] Link to database cannot be established:SQLSTATE[HY000] [1049] Unknown database 'tienda'at line 102 in file classes/db/DbPDO.php 97. public function connect() 98. { 99. try { 100. $this->link = $this->_getPDO($this->server, $this->user, $this->password, $this->database, 5); 101. } catch (PDOException $e) { 102. throw new PrestaShopException('Link to database cannot be established:'.$e->getMessage()); 103. } 104. 105. // UTF-8 support 106. if ($this->link->exec('SET NAMES \'utf8\'') === false) { 107. throw new PrestaShopException('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.'); DbPDOCore->connect - [line 323 - classes/db/Db.php] DbCore->__construct - [line 234 - classes/db/Db.php] - [4 Arguments] DbCore::getInstance - [line 48 - config/alias.php] pSQL - [line 339 - classes/shop/Shop.php] - [1 Arguments] ShopCore::initialize - [line 120 - config/config.inc.php] require - [line 27 - index.php] - [1 Arguments] Link to comment Share on other sites More sharing options...
Marcelo Nava Posted January 16, 2018 Share Posted January 16, 2018 On 6/12/2017 at 11:17 AM, Mold said: Interesting, we a fixing Prestashop.... I was a bit afraid to make changes to not break it, but since I just test it now ... So after I applied the fix you said I got 2 more errors: FatalErrorException in AdminLoginController.php line 400: Compile Error: Declaration of AdminLoginControllerCore::viewAccess() must be compatible with AdminControllerCore::viewAccess($disable = false) Then I edited line 164 (in AdminLoginController.php) : public function viewAccess() to: public function viewAccess($disable = false) And got the next error: FatalErrorException in AdminLoginController.php line 400: Compile Error: Declaration of AdminLoginControllerCore::setMedia() must be compatible with AdminControllerCore::setMedia($isNewTheme = false) Then edited line 47: public function setMedia() to: public function setMedia($isNewTheme = false) And got acces to BO, at last. But... I have a warning in BO: Warning line 569 file C:\\Apache24\\htdocs\\classes\\controller\\AdminController.php[2] count(): Parameter must be an array or an object that implements Countable Then a lot of more errors inside BO. Someone from Presta team have to definitely check this tread. I do have PHP 7.2(64bit) installed, on Apache 2.4.29(64bit) Windows 7(64bit), VC2017(64bit), MySql 5.6(64bit) PrestaShop 1.7.2.4 probe de todo y esta es la verdadera solucion mil gracias THANKS A LOT Link to comment Share on other sites More sharing options...
Marcelo Nava Posted January 16, 2018 Share Posted January 16, 2018 On 6/12/2017 at 11:17 AM, Mold said: Interesting, we a fixing Prestashop.... I was a bit afraid to make changes to not break it, but since I just test it now ... So after I applied the fix you said I got 2 more errors: FatalErrorException in AdminLoginController.php line 400: Compile Error: Declaration of AdminLoginControllerCore::viewAccess() must be compatible with AdminControllerCore::viewAccess($disable = false) Then I edited line 164 (in AdminLoginController.php) : public function viewAccess() to: public function viewAccess($disable = false) And got the next error: FatalErrorException in AdminLoginController.php line 400: Compile Error: Declaration of AdminLoginControllerCore::setMedia() must be compatible with AdminControllerCore::setMedia($isNewTheme = false) Then edited line 47: public function setMedia() to: public function setMedia($isNewTheme = false) And got acces to BO, at last. But... I have a warning in BO: Warning line 569 file C:\\Apache24\\htdocs\\classes\\controller\\AdminController.php[2] count(): Parameter must be an array or an object that implements Countable Then a lot of more errors inside BO. Someone from Presta team have to definitely check this tread. I do have PHP 7.2(64bit) installed, on Apache 2.4.29(64bit) Windows 7(64bit), VC2017(64bit), MySql 5.6(64bit) PrestaShop 1.7.2.4 hi.. do you have a solution? maybe some pleople have? Link to comment Share on other sites More sharing options...
Mold Posted January 19, 2018 Share Posted January 19, 2018 I'm done with experiments for now. I use a stable php 7.0 and will concentrate on the main job - building an online store. 1 1 Link to comment Share on other sites More sharing options...
Christian Posted January 22, 2018 Share Posted January 22, 2018 (edited) Hi, same error Edited January 22, 2018 by Christian It's wrong. (see edit history) Link to comment Share on other sites More sharing options...
Marcelo Nava Posted January 24, 2018 Share Posted January 24, 2018 On 22/1/2018 at 10:50 AM, Christian said: Hi, same error Hi, thank you for your answer an help, the admin page works but on product i cant save any change.. mesaage says :"No se puede actualizar la configuración." / The configuration can not be updated. Link to comment Share on other sites More sharing options...
magazin online Posted January 31, 2018 Share Posted January 31, 2018 (edited) I solved my same error this way: - uninstall newest version of xampp, version that gave me these kind of error - install an older version that worked for me Xampp 5.6.28 (https://sourceforge.net/projects/xampp/files/) Problem solved. Back office and front office work great. I needed xampp to restore and older prestashop project. Edited January 31, 2018 by magazin online (see edit history) Link to comment Share on other sites More sharing options...
SilvioSilver Posted April 19, 2018 Share Posted April 19, 2018 Hi all, FatalErrorException mssgs. resolved with PrestaShop 1.7.3.1 on XAMPP portable win32-7.2.4-0VC15, using PHP 7.2.4 When try to access admin page, for login, system display few, in order, error mssgs: FatalErrorException in AdminDashboardController.php line "43": <- originally find 'setMedia()' on line 43, and add command inside brackets Declaration of AdminDashboardControllerCore::setMedia() must be compatible with AdminControllerCore::setMedia($isNewTheme = false) FatalErrorException in AdminLoginController.php line "164": <- originally find 'viewAccess()' on line 164, and add command inside brackets Declaration of AdminLoginControllerCore::viewAccess() must be compatible with AdminControllerCore::viewAccess($disable = false) FatalErrorException in AdminLoginController.php line "47": <- originally find 'setMedia()' on line 47, and add command inside brackets Declaration of AdminLoginControllerCore::setMedia() must be compatible with AdminControllerCore::setMedia($isNewTheme = false) Save both files, and access to admin area over your chosen folder name .../prestashop/admin123/ (NO need for restart server or cleaning browser cache). Enjoy in your PrestaShop. P.S. Admins ! Font color picker, on forum, freeze page, need for reload! Link to comment Share on other sites More sharing options...
backamblock Posted July 27, 2018 Share Posted July 27, 2018 On 6.12.2017 at 3:30 PM, Besens said: In fact just change add $isNewTheme = false in setMedia declaration and set $isNewTheme in parent::setMedia call. AdminDashboardController.php (# 43) public function setMedia($isNewTheme = false) { parent::setMedia($isNewTheme); $this->addJqueryUI('ui.datepicker'); $this->addJS(array( _PS_JS_DIR_.'vendor/d3.v3.min.js', __PS_BASE_URI__.$this->admin_webpath.'/themes/'.$this->bo_theme.'/js/vendor/nv.d3.min.js', _PS_JS_DIR_.'/admin/dashboard.js', )); $this->addCSS(__PS_BASE_URI__.$this->admin_webpath.'/themes/'.$this->bo_theme.'/css/vendor/nv.d3.css'); } I submited this correction on GitHub (https://github.com/PrestaShop/PrestaShop/pull/8588) thanks mate, my problem was not in relation to the topic but your solution helped me very much with this module: https://github.com/sarjon/gamifications 1 Link to comment Share on other sites More sharing options...
Meli13lm Posted September 6, 2018 Share Posted September 6, 2018 (edited) Hi, I have the same error... FatalErrorException in AdminDashboardController.php line 539:Compile Error: Declaration of AdminDashboardControllerCore::setMedia() must be compatible with AdminControllerCore::setMedia($isNewTheme = false) I've just uploaded my local prestashop to my hosting. My home page is OK (www.royalfellassb.com) but I can't enter to my back-office since I uploaded my web to the host. I tried what Mold said but It ends with a lot of errors in the back office panels... Does anybody knows what can I do ? Thanks Edited September 6, 2018 by Meli13lm (see edit history) Link to comment Share on other sites More sharing options...
mma87 Posted October 9, 2018 Share Posted October 9, 2018 Hello, prestashop 1.7.3 php 7.2 I had the same issue, I add $isNewTheme = false in controllers/admin/AdminLoginController.php public function setMedia($isNewTheme = false) and from: public function viewAccess() { return true; } to: public function viewAccess($disable = false) { return true; } 1 Link to comment Share on other sites More sharing options...
pliciweb_stephane Posted October 24, 2018 Share Posted October 24, 2018 You need to upgrade Prestashop Or to go back to PHP 7.1 Link to comment Share on other sites More sharing options...
juliusco Posted April 19, 2019 Share Posted April 19, 2019 On 12/5/2017 at 5:44 PM, barzacchini said: hello! Finaly I solved the problem was php version I installed php-7.0.26-Win32-VC14-x64 , configured php.ini and all is ok thank Andrea Thank you, this help Link to comment Share on other sites More sharing options...
kezzmania Posted March 6, 2020 Share Posted March 6, 2020 On 10/24/2018 at 3:06 PM, pliciweb_stephane said: You need to upgrade Prestashop Or to go back to PHP 7.1 Hi, can I upgrade it manually via FTP? Thanks in advance Link to comment Share on other sites More sharing options...
Anartisanart Posted March 10, 2021 Share Posted March 10, 2021 hi, you can see here : https://belvg.com/blog/how-to-upgrade-prestashop-step-by-step-instruction.html it work for me. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now