Guest Posted February 4, 2005 Share Posted February 4, 2005 Daniel, yea,, thats the every thing I am looking for,, that way,, i dont have to keep updateing that area myself. Would be most greatful if you get a chance to find the code, when you have a chance,,, Regards Tom Quote Link to comment Share on other sites More sharing options...
fadedlazer Posted February 5, 2005 Share Posted February 5, 2005 Daniel, yea,, thats the every thing I am looking for,, that way,, i dont have to keep updateing that area myself. Would be most greatful if you get a chance to find the code, when you have a chance,,, Regards Tom <{POST_SNAPBACK}> I know I got it from the old down for maint...link is here http://www.oscommerce.com/community/contributions,1057 You may have to start searching through the code from one of the releases that state (exclued ip)..I will look through my code, but it has been about a year since I installed it... Let us know if you found the right code. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 5, 2005 Share Posted February 5, 2005 Daniel, 1057, is the old one? that is the one I installed. didnt realize there was more than one of them. Whats the difference, if i may ask? Regards Tom Quote Link to comment Share on other sites More sharing options...
tomjmul Posted March 1, 2005 Share Posted March 1, 2005 I am using an extremely popular (largest) ISP in the UK. This ISP forces the use of a proxy server. Because the IP address that DFM uses, is actually the proxy's IP and not my real one, if I exluded myself from the down for maintenance page, I also excluded about 2 million other people as well. If anyone else has the same problem, here is a little fix I came up with. I am not a PHP programmer by any means, so if there is a more elegent way of doing this - what the hell :D in /includes/application_top.php: find the line: if (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE != getenv('REMOTE_ADDR')){ and replace with: $proxy = getenv('HTTP_X_FORWARDED_FOR'); $real_ip = (isset($proxy) && $proxy != "")?getenv('HTTP_X_FORWARDED_FOR'):getenv('REMOTE_ADDR'); if (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE != $real_ip){ Now you can set your real IP address in the control panel and tada - problem solved. Quote OSC Image Magic On-the-fly thumbnails, watermarks and image processing Link to comment Share on other sites More sharing options...
RojanUK Posted April 3, 2005 Share Posted April 3, 2005 I've just tried to install this contrib. Putting all the manual changes in the file was obviously not a big problem, but when I tried to load the down_for_maintenance_v1.1_english.sql file via phpMyAdmin, I get the following error: Error SQL-query : INSERT INTO configuration_group( configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible ) VALUES ( '16', 'Site Maintenance', 'Site Maintenance Options', '16', '1' ) MySQL said: #1062 - Duplicate entry '16' for key 1 I'm open for any suggestion how to solve this. Thanks, Quote RojanUK Link to comment Share on other sites More sharing options...
RojanUK Posted April 6, 2005 Share Posted April 6, 2005 Bump. Does anybody know a solution for this problem? Thanks, Quote RojanUK Link to comment Share on other sites More sharing options...
RojanUK Posted April 7, 2005 Share Posted April 7, 2005 Still no solution... :( Quote RojanUK Link to comment Share on other sites More sharing options...
RojanUK Posted April 8, 2005 Share Posted April 8, 2005 This is aparently a difficult problem, but I'm still hoping that somebody might have a solution for me. Quote RojanUK Link to comment Share on other sites More sharing options...
RojanUK Posted April 9, 2005 Share Posted April 9, 2005 Tried it with version 2.1 as well, with the same SQL error. :( Quote RojanUK Link to comment Share on other sites More sharing options...
Mighty Mike Posted April 9, 2005 Share Posted April 9, 2005 I've just tried to install this contrib. Putting all the manual changes in the file was obviously not a big problem, but when I tried to load the down_for_maintenance_v1.1_english.sql file via phpMyAdmin, I get the following error: Error SQL-query : INSERT INTO configuration_group( configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible ) VALUES ( '16', 'Site Maintenance', 'Site Maintenance Options', '16', '1' ) MySQL said: #1062 - Duplicate entry '16' for key 1 I'm open for any suggestion how to solve this. Thanks, <{POST_SNAPBACK}> It may be because you already have someting in your configuration table with "16" change the "16" to something else like "55" or just look in your config table and see which is the next available number Quote Link to comment Share on other sites More sharing options...
RojanUK Posted April 9, 2005 Share Posted April 9, 2005 It may be because you already have someting in your configuration table with "16" change the "16" to something else like "55" or just look in your config table and see which is the next available number <{POST_SNAPBACK}> I didn't know how to change it either, but I just took a chance on my test site and it worked like a charm. Thanks! Quote RojanUK Link to comment Share on other sites More sharing options...
iweblogix Posted November 1, 2005 Share Posted November 1, 2005 I installed Down for Maintenance v2.1 . everything shows up in the admin control panel. I turn everything to true and set my ip to what my ip is but when I turn on maintenance it does not display that the site is down for maintenance at all? I have no idea if this is because my IP address is one that changes all the time and not static or if it is a problem with code some where. I've had others test it that are not on the same ISP and the site comes up normally for them when i have maintenance turned on. Anyone who could help me with this I would greatly appreciate it. Andy Quote Link to comment Share on other sites More sharing options...
kittmaster Posted December 10, 2005 Share Posted December 10, 2005 Right, very useful idea! Thanks!but... ;-) > Oh one more thing: in header.php it says tep_output_warning( twice, this gives me an error message on 2.2 ms2. I think it should say tep_output_string( , > at least it works for me that way Okay, I notice this think me too (replace tep_output_warning with tep_output_string) but tep_output_string returns nothing at all! This will return null chain: tep_output_string(TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE); and this will work well: echo TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE; I think it's not very "osCommerce's way" to do thinks, but I don't understand why tep_output_string doesn't work with me ? The strings are : TEXT_BEFORE_DOWN_FOR_MAINTENANCE = "AVERTISSEMENT : Le site sera ferm? pour maintenance dans la p?riode du " PERIOD_BEFORE_DOWN_FOR_MAINTENANCE = "28/07/2003 01h -> 02h" If anybody have any explication, it'll be appreciated :-) (sorry for my bad english...) The reason it seems is that the code was altered from tep_output_warning to another format. I have the solution for MS2 and it works with all contribs installed. Use the code below and it should solve your issues and get the warning working as they were meant to. Works flawlessly on my site........:) // give the visitors a message that the website will be down at ... time if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'false') ) { $messageStack->add('header', TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE, 'warning'); } // this will let the admin know that the website is DOWN FOR MAINTENANCE to the public if ( (DOWN_FOR_MAINTENANCE == 'true') && (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE == getenv('REMOTE_ADDR')) ) { $messageStack->add('header', TEXT_ADMIN_DOWN_FOR_MAINTENANCE, 'warning'); } // check session.auto_start is disabled Greets Chris Quote Link to comment Share on other sites More sharing options...
mnm00 Posted January 31, 2006 Share Posted January 31, 2006 i get this error after install down for maintenance.. anyone can help..?? plz Fatal error: Cannot redeclare tep_db_connect() (previously declared in C:\Inetpub\wwwroot\shop\includes\functions\database.php:13) in C:\Inetpub\wwwroot\shop\includes\functions\database.php on line 25 Quote Link to comment Share on other sites More sharing options...
kunal247 Posted April 16, 2006 Share Posted April 16, 2006 It may be because you already have someting in your configuration table with "16" change the "16" to something else like "55" or just look in your config table and see which is the next available number I was experiencing the same problem. Found a solution to this as 16 was already being used on my site. Change 16 to 17 or 18 on the entire SQL file and then run the querry and all should work just fine. Good Luck. Kunal Quote Link to comment Share on other sites More sharing options...
codex Posted April 29, 2006 Share Posted April 29, 2006 SQL query: # NEW RECORDS FOR: DOWN FOR MAINTENANCE v1.1 # Created by: fram [email protected] # Updated by Farrukh # Donald Harriman # Change the value of Site Maintenance to 16 or anything greater than 15. I have already set it to 16 INSERT INTO configuration_group( configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible ) VALUES ( '16', 'Site Maintenance', 'Site Maintenance Options', '16', '1' ); MySQL said: Documentation #1062 - Duplicate entry '16' for key 1 i got this MySQL error than i tried to update my datebase maybe someone can help me with this ? thank you Quote Link to comment Share on other sites More sharing options...
HelleM Posted November 29, 2006 Share Posted November 29, 2006 Try to put my question in the right fora: Hi I runs perfect, except when I choose NOTICE PUBLIC Before going Down for Maintenance ON/OFF The minut it's ON - the index page is blank?? All other things works well. The page is also blank if I fill in my IP address. (tried an earlier solution from this fora - nope did not work in my case) The only thing left in the browser is the hostname/down_for_maintenance.php link with a blamk page!!! Has anybody a solution?? Please Something MUST be missing in the files? Helle :-) Very happy for this contrib, just need to figure this out? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.