Jump to content

Multiple "already defined" errors in php logs


Recommended Posts

After installing, I cannot access admin. I have installed/reinstalled 3 times. Initially I get a 500 error, but when I view the php logs I get several lines that all say something like:

[php7:notice] [pid 17524] [client ::1:62297] PHP Notice:  Constant _PS_GENDERS_DIR_ already defined in /prestashop/config/defines.inc.php on line 121

[Mon Dec 10 21:11:14.041177 2018] [php7:notice] [pid 17524] [client ::1:62297] PHP Notice:  Constant _PS_LANG_IMG_DIR_ already defined in /prestashop/config/defines.inc.php on line 122
[Mon Dec 10 21:11:14.041188 2018] [php7:notice] [pid 17524] [client ::1:62297] PHP Notice:  Constant _PS_MANU_IMG_DIR_ already defined in /prestashop/config/defines.inc.php on line 123
[Mon Dec 10 21:11:14.041199 2018] [php7:notice] [pid 17524] [client ::1:62297] PHP Notice:  Constant _PS_ORDER_STATE_IMG_DIR_ already defined in /prestashop/config/defines.inc.php on line 124
[Mon Dec 10 21:11:14.041210 2018] [php7:notice] [pid 17524] [client ::1:62297] PHP Notice:  Constant _PS_PROD_IMG_DIR_ already defined in /prestashop/config/defines.inc.php on line 125
[Mon Dec 10 21:11:14.041221 2018] [php7:notice] [pid 17524] [client ::1:62297] PHP Notice:  Constant _PS_SHIP_IMG_DIR_ already defined in /prestashop/config/defines.inc.php on line 126

 

it just goes on and on and on and on. 

Any ideas?
 

 

Link to comment
Share on other sites

these are php  'notices' and would not cause php script to end nor do I think they have anything to do with your access issue.

use ftp and ensure ps debug mode is enabled (search forum on how to).  We want to revisit the 500 error, recreate and get underlying php error.  Also you can contact your hosting company as post install ps usually runs pretty good.

you rename the admin directory yes?  and dare using that in your url to access back office?

you deleted the install directory?

 

Link to comment
Share on other sites

So I actually hadn't renamed the admin directory or removed the install directory. I had hoped it would be that simple. But I'm still getting the exact same errors.

I'm actually running this on my MAC OSX Apache Server. 

PHP version 7.1

MySQL version 5.6.41

Link to comment
Share on other sites

UPDATE

So I tried commenting out:

//require_once(__DIR__.'/config/defines.inc.php');
//require_once(__DIR__.'/classes/PrestaShopAutoload.php');

in the autoload.php file.

 

This actually loaded the admin login screen and allowed me to login.

 

But once I logged in I got this (from debugger):

Level Channel Message
CRITICAL20:09:58 php Fatal Compile Error: Cannot declare class ComposerAutoloaderInit3e8f95d9b4b1dbdd6f7eb126a99fd4d2, because the name is already in use
DEBUG20:09:58 doctrine SELECT name FROM ps_module WHERE active = 1
CRITICAL20:09:59 request Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: "Compile Error: Cannot declare class ComposerAutoloaderInit3e8f95d9b4b1dbdd6f7eb126a99fd4d2, because the name is already in use" at /Users/Casey/Sites/prestashop/modules/welcome/vendor/composer/autoload_real.php line 5

 

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