Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with Down for Maintenance Contribution


Kelly_Hero

Recommended Posts

I have installed Down for Maintenance v1.1.

 

In Admin, whenever I set Down for Maintenance: ON/OFF to true or NOTIFY PUBLIC Before going Down for Maintenance: ON/OFF to true, I get a blank white page whenever I try to go visit the site.

 

I've checked my codes over and over and can find nothing wrong. However, I think this code may be causing my problem:

 

Old Configuration.php Code:

 

if ($HTTP_GET_VARS['action']) {
   switch ($HTTP_GET_VARS['action']) {
     case 'save':
       $configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']);
       $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);

       tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . tep_db_input($cID) . "'");
       tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID));
       break;
   }
 }

 

New Configuration.php Code:

 

    if (tep_not_null($action)) {
   switch ($action) {
     case 'save':
       $configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']);
       $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);

       tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . (int)$cID . "'");
       // set the WARN_BEFORE_DOWN_FOR_MAINTENANCE to false if DOWN_FOR_MAINTENANCE = true
       if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'true') ) {
       tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = 'false', last_modified = '" . NOW . "' where configuration_key = 'WARN_BEFORE_DOWN_FOR_MAINTENANCE'"); }
       tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID));
       break;
   }
 }

 

I am using OSCommerce 2.2 MS1. My Server is Microsoft-IIS/6.0. My PHP Version is: 4.3.2. Any assistance would be greatly appreciated.

 

Kelly

Happiness does not come from doing easy work but from the afterglow of satisfaction that comes after the achievement of a difficult task that demanded our best. --Anonymous

Link to comment
Share on other sites

Problem fixed! :D :D :D

 

I had missed uploading the catalog/includes/languages/english/down_for_maintenance.php file to the server.

 

Doh!

Happiness does not come from doing easy work but from the afterglow of satisfaction that comes after the achievement of a difficult task that demanded our best. --Anonymous

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...