Jump to content

Strange behavior of define('_PS_MODE_DEV_', ..... for false and true


Recommended Posts

Hi community!

I've got PS 1.7.6.1 and started migration from one server to new one. 

PHP ver. for my old server = 7.2.34

PHP ver. for my new server = 7.2.34 (was installed for compatibility by me) 

I've faced with Backend login.

Frontend works fine

Backend got me 500 error. 

When I set define('_PS_MODE_DEV_', TRUE);  - Backend works good, but frontend shows me a lot of internal errors. 

 

But when I change setting to define('_PS_MODE_DEV_', FALSE);  BackEnd got an error 500, and Frontend operates good. 

I tried to change PHP ver. from 7.1.33 to 7.4.33 - situation all the same. 

I'm afraid to upgrade PS version because of my custom version of the Template. 

Could you advise - any solution for this ? 

Is it possible to activate Debug mode only for Backend ? :-)

In this case I can run Backend and run FronEnd without debug mode.  

 

Thanks for your time and advices! 

Front-end.jpg

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

Hi,

You won't get this error with PHP 7.1, since count() is typical of incompatibility with PHP 7.2 and higher.

In any case, it's essential to correct these errors. Perhaps a simple update of the modules would be enough to make the error disappear, otherwise you'll have to change the code.

 

Edited by Mediacom87 (see edit history)
  • Like 1
Link to comment
Share on other sites

9 hours ago, Mediacom87 said:

Hi,

You won't get this error with PHP 7.1, since count() is typical of incompatibility with PHP 7.2 and higher.

In any case, it's essential to correct these errors. Perhaps a simple update of the modules would be enough to make the error disappear, otherwise you'll have to change the code.

 

 

Link to comment
Share on other sites

Thanks for your reply. 

The main problem - Prestashop worked ok on my old server with PHP 7.2.34 , but when I migrate to another new server with different IP and the same configuration of PHP version - I can't enter BackEnd (error 500). When I activate Debug mode  - I can login Backend, FrontEnd shows me a lot of errors. 

Any workaround how to compare source and target servers to identify problems? 

May be rights? PHP versions are the same versions. Old server = CentOS, new server = Ubuntu. Does it mean  - OS version? PHP versions the same 7.2.34

Link to comment
Share on other sites

@Mediacom87 You are the best

Idea with clear of cache works fine. 

I've removed manually files in folders:

 - var/cache/prod

- img/tmp

- Backend works fine. 

P.S. I've got a thought before to clear a cache. 

I've activated Debug mode and try to clear cache with help of Backend menu - it didn't help me 

But when I remove all cache file manually - Backend and frontend work smoothly. 

Thanks again for help and advices!

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