Jump to content

Recommended Posts

Hi,

 

I have set my shop to Maintenance mode and has been working fine for months whilst the site is being developed, however I recently have got many different people to check if they can view my site and they can without me adding there IP address. Please can anyone help me to resolve this issue?

 

Thanks,

Tommy

Link to comment
Share on other sites

  • 4 months later...
  • 4 weeks later...
  • 1 year later...

Hi

 

I'm having the same issue, currently setting up a new shop and I have it in maintenance mode and rather surprisingly I've just received 2 orders!!??*

 

I've asked a few colleagues in different locations to see if they can see the site, some can some can't, also if I view the site in Safari the site is in maintenance mode but in Firefox the site is visible.

 

I'm using 1.6.0.14.

 

Was there ever an answer for this.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...
  • 1 month later...

Same issue happens with my store (1.6.1.2)

 

Problem exist with some servers configuration.

 

I can solve my problem changed in class/tools.php (don´t forget override ) function getRemoteAddr()

 

I change last else server variable:

 

Remove : 

return $_SERVER['REMOTE_ADDR'];

 

and put:

return $_SERVER['HTTP_X_REAL_IP'];

 

OBS: you can check what best var is for your server configuration, running in one php file the follow code : print_r($_SERVER);

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

  • 1 month later...

Same issue happens with my store (1.6.1.2)

 

Problem exist with some servers configuration.

 

I can solve my problem changed in class/tools.php (don´t forget override ) function getRemoteAddr()

 

I change last else server variable:

 

Remove : 

return $_SERVER['REMOTE_ADDR'];

 

and put:

return $_SERVER['HTTP_X_REAL_IP'];

 

OBS: you can check what best var is for your server configuration, running in one php file the follow code : print_r($_SERVER);

 

 

Thanks PauloKruz,

 

I had the same issue and your solution worked.

Link to comment
Share on other sites

  • 1 month later...

I'm having the same problem with my v1.6.1.3: entering my ip address in Maintenance Mode makes the store accessible to anyone.

 

I tried PauloKruz's solution below:

Same issue happens with my store (1.6.1.2)

 

Problem exist with some servers configuration.

 

I can solve my problem changed in class/tools.php (don´t forget override ) function getRemoteAddr()

 

I change last else server variable:

 

Remove : 

return $_SERVER['REMOTE_ADDR'];

 

and put:

return $_SERVER['HTTP_X_REAL_IP'];

 

OBS: you can check what best var is for your server configuration, running in one php file the follow code : print_r($_SERVER);

...but this didn't work for me; after changing the code as described, Prestashop wouldn't allow me to enter my ip address in Maintenance Mode at all.

 

Anybody got any other ideas?

 

Thanks

Scott

Link to comment
Share on other sites

  • 5 months later...

So, I finally have this problem too after upgrading to that latest version of Prestashop, and this solution does not work, maintenance mode is not activated correctly, despite no maintenance URL indicated.

 

There are numerous threads about this issue, but not many solutions. Anyone ever found out why this is happening?

 

Kind regards,

 

Daniel

Link to comment
Share on other sites

  • 1 month later...

The problem is about server configuration.

 

 

So, I finally have this problem too after upgrading to that latest version of Prestashop, and this solution does not work, maintenance mode is not activated correctly, despite no maintenance URL indicated.

 

There are numerous threads about this issue, but not many solutions. Anyone ever found out why this is happening?

 

Kind regards,

 

Daniel

 

Problem is about server configuration, if you apply above solution the problem is solved.

 

After override class/tools.php don´t forget:

You need to trigger the regeneration of the /cache/class_index.php file. This is done simply by deleting the file. It is the same when manually removing an override: in order to reinstate the default behavior, you must delete the /cache/class_index.php

Link to comment
Share on other sites

  • 4 months later...

Same issue happens with my store (1.6.1.2)

 

Problem exist with some servers configuration.

 

I can solve my problem changed in class/tools.php (don´t forget override ) function getRemoteAddr()

 

I change last else server variable:

 

Remove : 

return $_SERVER['REMOTE_ADDR'];

 

and put:

return $_SERVER['HTTP_X_REAL_IP'];

 

OBS: you can check what best var is for your server configuration, running in one php file the follow code : print_r($_SERVER);

 

I am new to webhosting and to PrestaShop. I have begun setting up my new site in maintenance mode, and found out that it is visible and usable to anyone. The Maintenance mode switch is not working at all. The above advice is too advanced for me. I have no idea how or where to implement it. Can someone tell me in basic terms how to fix Maintenance Mode so it turns the site off until it is ready?

It looks like you folks are working at a command line interface, which I am not at all familiar with.

I dont have a stock of summer dresses to sell if anyone orders something!

Link to comment
Share on other sites

  • 2 years later...
On 11/6/2015 at 12:00 AM, PauloKruz said:

Same issue happens with my store (1.6.1.2)

 

Problem exist with some servers configuration.

 

I can solve my problem changed in class/tools.php (don´t forget override ) function getRemoteAddr()

 

I change last else server variable:

 

Remove : 

return $_SERVER['REMOTE_ADDR'];

 

and put:

return $_SERVER['HTTP_X_REAL_IP'];

 

OBS: you can check what best var is for your server configuration, running in one php file the follow code : print_r($_SERVER);

If I do this, it will break my Store (Multishop). The result is HTTP Error 500. After deleting /cache/class_index.php it comes back online.

Though even after applying this fix, the behaviour is the same as before:

One shop doesn't want to go into maintenance mode.

One shop won't whitelist certain IP's.

Version: Prestashop 1.6.1.22

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

  • 1 year later...

Hi everybody, 

In summary, this famous 500 error is the web server's way of saying "Oops! An error has occurred, but we can't tell you more." Therefore, if you have the same problem on your site and the error messages are too vague, you can activate your web host's FTP or CPanel error reports in your PrestaShop shop.

Debugging:

There are 2 ways to enable these reports, depending on the version you are using:

» From PrestaShop v1.4 to v1.5.2

  1. Open config/config.inc.php
  2. On line 29, you will find this line: @ini_set('display_errors','off');
  3. Replace it with: @ini_set('display_errors','on');

» PrestaShop v1.5.3 and later versions (including 1.6 and 1.7)

  1. Open config/defines.inc.php
  2. On line 28, you will find this line: define('_PS_MODE_DEV_', false);
  3. Replace it with: define('_PS_MODE_DEV_', true);

 

Example: 

There were similar symptoms on the server as most of people here described: back office was accessible without problems, front-end was giving HTTP 500 errors for IP addresses defined in the debugging mode but worked fine for all other IP addresses. By enabling debugging options as described above, the HTTP 500 error revealed to be caused by a duplicate PHP file that was made as a manual backup in classes directory of one of the modules in folder: 

web/modules/pspagebuilder/classes/widget

 

1120758432_httperror500.thumb.png.7aa2853ca276d5f4411fed31c5d96244.png

I got this error

FatalErrorException

Compile Error: Canot declare class

PsWidgetNewsletter, because the name is already in use

 

Solution: The fix in this particular case consisted in removing the file completely. But as I still wanted to keep the backup copy, I opted to rename the *.PHP suffix of the duplicated file. Once done no HTTP 500 error was displayed as there were no duplicate PHP classes defined. All started to run smoothly. 

 

I hope this helps, 

 

Regards, Martin Mi

DataQuo, s.r.o. 

www.dataquo.eu

 

Link to comment
Share on other sites

  • 10 months later...

Edited .. nevermind wow ... somehow, the very end of the file which there was no reason i would have ended up to the bottom ... was partially erased? What in the world?  So I just unzipped the file file saved and went to the local tools folder and copied and pasted lol.  Man this app is so buggy that it screws up locally hahaha.  Please prestashop get on your app and make it easier on everyone.

Edited by Anthony P
Self-Fault (see edit history)
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...