Page 10 of 11 FirstFirst ... 891011 LastLast
Results 91 to 100 of 103
  1. #91
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Superglobals Plus

    @dbltoe, the issue appears to be twofold:

    1) I'll get /includes/functions/extra_functions/superglobals.php updated to check for the presence of that constant before use.

    2) Since that setting was introduced back in 2012, it looks like you might not have copied /admin/includes/functions/extra_functions/superglobals.php (which does the plugin's database initialization).

  2. #92
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,137
    Plugin Contributions
    11

    Default Re: Superglobals Plus

    Here's what's at admin/includes/functions/extra_functions/superglobals.php
    Code:
    <?php// -----
    // Starting with v1.6.0 of the plugin, perform the auto-install of the various configuration items.
    //
    $configurationGroupTitle = 'Superglobals';
    $configuration = $db->Execute("SELECT configuration_group_id FROM " . TABLE_CONFIGURATION_GROUP . " WHERE configuration_group_title = '$configurationGroupTitle' LIMIT 1");
    if ($configuration->EOF) {
      $db->Execute("INSERT INTO " . TABLE_CONFIGURATION_GROUP . " 
                     (configuration_group_title, configuration_group_description, sort_order, visible) 
                     VALUES ('$configurationGroupTitle', 'Superglobals Settings', '1', '1');");
      $configuration_group_id = $db->Insert_ID(); 
      $db->Execute("UPDATE " . TABLE_CONFIGURATION_GROUP . " SET sort_order = $configuration_group_id WHERE configuration_group_id = $configuration_group_id;");
      
    } else {
      $configuration_group_id = $configuration->fields['configuration_group_id'];
      
    }
    
    
    // -----
    // Set the various configuration items, if Super Globals wasn't previously installed.
    //
    if (!defined ('SHOW_SUPERGLOBALS')) {
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Enable Superglobals (catalog)', 'SHOW_SUPERGLOBALS', 'false', 'If true, the Superglobals will be shown in the shop at the bottom of the pages (and depending on the settings below).', $configuration_group_id, 10, NULL , 'zen_cfg_select_option(array(\'true\', \'false\'),')");
      
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Enable Superglobals (admin)', 'SHOW_SUPERGLOBALS_ADMIN', 'false', 'If true, the Superglobals will be shown in the admin at the top of pages (and depending on the settings below).', $configuration_group_id, 15, NULL , 'zen_cfg_select_option(array(\'true\', \'false\'),')");
      
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show Superglobals in Popup', 'SHOW_SUPERGLOBALS_POPUP', 'true', 'If true the Superglobals will be displayed in a popup window, using javascript. Set to false if you do not want or can not use javascript and the Superglobals will be displayed at the bottom of each page.', $configuration_group_id, 18, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),')");
    
    
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show the Superglobals to all (no IP check)', 'SHOW_SUPERGLOBALS_TO_ALL', 'false', 'If true, the Superglobals will be shown to every visitor (= Security risk).', $configuration_group_id, 20, NULL , 'zen_cfg_select_option(array(\'true\', \'false\'),')");
    
    
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'List of allowed IP addresses (comma separated list)', 'SHOW_SUPERGLOBALS_IP', '127.0.0.1,1,::1', 'Enter a comma separated list of allowed IP addresses. Default setting: 127.0.0.1,1,::1 (=localhost)', $configuration_group_id, 30, NULL, NULL)");
    
    
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Maximum recursion level', 'SHOW_SUPERGLOBALS_MAX_LEVEL', '12', 'Enter the maximum recursion level. Default setting: 12. This prevents infinite loops in case of recursion (" . '$GLOBALS' . " recursion is automatically detected). 0 disables the maximum recursion level protection', $configuration_group_id, 32, NULL, NULL)");
      
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show " . '$GLOBALS' . " (shows all globals)', 'SHOW_SUPERGLOBALS_ALL', 'false', 'Show the contents of all Globals as well as all Super Globals. If enabled, the below settings for showing Super Globals will be overridden.', $configuration_group_id, 34, NULL , 'zen_cfg_select_option(array(\'true\', \'false\'),')");
      
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show the \"queryCache\" object?', 'SHOW_SUPERGLOBALS_QUERYCACHE', 'false', 'If <b>Show " . '$GLOBALS' . "</b> is set to \"true\", show the contents of the queryCache object?. If enabled, the amount of time required to format the " . '$GLOBALS' . " will be impacted.', $configuration_group_id, 35, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),')");
      
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Filter HTTP_ variables', 'SHOW_SUPERGLOBALS_FILTER_HTTP', 'true', 'If true, the <em>deprecated</em> HTTP_ variables are filtered out (recommended).', $configuration_group_id, 36, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),')");
      
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show " . '$_GET' . "', 'SHOW_SUPERGLOBALS_GET', 'false', 'Show the contents of this variable.', $configuration_group_id, 40, NULL , 'zen_cfg_select_option(array(\'true\', \'false\'),')");
      
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show " . '$_POST' . "', 'SHOW_SUPERGLOBALS_POST', 'true', 'Show the contents of this variable.', $configuration_group_id, 50, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),')");
      
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show " . '$_COOKIE' . "', 'SHOW_SUPERGLOBALS_COOKIE', 'false', 'Show the contents of this variable.', $configuration_group_id, 60, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),')");
    
    
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show " . '$_REQUEST' . "', 'SHOW_SUPERGLOBALS_REQUEST', 'false', 'Show the contents of this variable.', $configuration_group_id, 65, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),')");
    
    
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show " . '$_SESSION' . "', 'SHOW_SUPERGLOBALS_SESSION', 'true', 'Show the contents of this variable.', $configuration_group_id, 70, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),')");
    
    
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show " . '$_SERVER' . "', 'SHOW_SUPERGLOBALS_SERVER', 'false', 'Show the contents of this variable.', $configuration_group_id, 80, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),')");
    
    
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show " . '$_ENV' . "', 'SHOW_SUPERGLOBALS_ENV', 'false', 'Show the contents of this variable.', $configuration_group_id, 90, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),')");
    
    
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show " . '$_FILES' . "', 'SHOW_SUPERGLOBALS_FILES', 'false', 'Show the contents of this variable.', $configuration_group_id, 100, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),')");
    
    
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show defined CONSTANTS', 'SHOW_SUPERGLOBALS_GET_DEFINED_CONSTANTS', 'false', 'Show all defined constants (Only switch on when needed, slows down page views!).', $configuration_group_id, 110, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),')");
    
    
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Show included files', 'SHOW_SUPERGLOBALS_GET_INCLUDED_FILES', 'false', 'Show all included (and required) files.', $configuration_group_id, 120, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),')");
      
    }
    if (!defined ('SHOW_SUPERGLOBALS_EXCLUSIONS')) {
      $db->Execute ("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Super Globals Exclusions', 'SHOW_SUPERGLOBALS_EXCLUSIONS', 'configuration,saniGroup1,main_category_tree', 'Use this field to identify (using a packed, comma-separated list) any Super Globals that should <b>not</b> be displayed if <b>Show " . '$GLOBALS' . "</b> is set to \"true\".  These variables typically are large arrays that do not contain pertinent information.<br />Default: <em>configuration,saniGroup1,main_category_tree</em>', $configuration_group_id, 37, NULL, NULL)");
    
    
    }
    //----
    // If the installation supports admin-page registration (i.e. v1.5.0 and later), then register the Superglobals configuration.
    //
    if (function_exists('zen_register_admin_page')) {
      if (!zen_page_key_exists('configSuperglobals')) {
        zen_register_admin_page('configSuperglobals', 'BOX_CONFIGURATION_SUPERGLOBALS', 'FILENAME_CONFIGURATION', "gID=$configuration_group_id", 'configuration', 'Y', $configuration_group_id);
      }
    }  
    // -----
    // Pull in the echo_superglobals() function.
    //
    define('SHOW_SUPERGLOBALS_FROM_ADMIN', TRUE);
    include (DIR_FS_CATALOG . DIR_WS_FUNCTIONS . 'extra_functions/superglobals.php');

  3. #93
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Superglobals Plus

    What's the history of the site? Was this an upgrade or an initial install?

  4. #94
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,137
    Plugin Contributions
    11

    Default Re: Superglobals Plus

    As stated earlier, put up new files for 1.5.6c (with no demo), immediately installed the mods, did not create any categories or products.
    The error showed up once and has not repeated itself (sorry, left that part out)

    PHP 7.2.21

    MySQL 5.7.27
    ZC 1.5.6c New Install
    Apache
    No Categories or Products

  5. #95
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Superglobals Plus

    OK, that makes sense (and the correction I've got on GitHub will, er, correct that).

    The issue is that, on initial install, that storefront extra_functions file is loaded, but the configuration has not yet been set.

  6. #96
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,137
    Plugin Contributions
    11

    Default Re: Superglobals Plus

    Figured it was something simple but wanted to let you know when and how it happened.

    Thanks, again, for all you do for ZC

  7. #97
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Superglobals Plus

    I've just submitted v2.0.2 to the Zen Cart moderators for review and will post back here once it's available for download.

    This release contains the change associated with the following GitHub issue (thanks, @dbltoe):


    #15: Ensure configuration setting presence prior to use

  8. #98
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Superglobals Plus

    Quote Originally Posted by lat9 View Post
    I've just submitted v2.0.2 to the Zen Cart moderators for review and will post back here once it's available for download.

    This release contains the change associated with the following GitHub issue (thanks, @dbltoe):


    #15: Ensure configuration setting presence prior to use
    Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=524

  9. #99
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Superglobals Plus

    I've just submitted v2.1.0 of Super Globals for the Zen Cart moderators' review and will post back here once it's available for download.

    This version makes use of Zen Cart notifications rather than directly-input code blocks to enable a fairly drop-in plugin for zc156b and later; see GitHub issue #16 for details.

  10. #100
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Superglobals Plus

    Quote Originally Posted by lat9 View Post
    I've just submitted v2.1.0 of Super Globals for the Zen Cart moderators' review and will post back here once it's available for download.

    This version makes use of Zen Cart notifications rather than directly-input code blocks to enable a fairly drop-in plugin for zc156b and later; see GitHub issue #16 for details.
    Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=524

 

 
Page 10 of 11 FirstFirst ... 891011 LastLast

Similar Threads

  1. v151 Re:Superglobals : Failure to install and run the ‘superglobals.sql.
    By lewisasding in forum Installing on a Windows Server
    Replies: 2
    Last Post: 31 May 2013, 02:25 PM
  2. Google Plus 1
    By rockmellon in forum All Other Contributions/Addons
    Replies: 29
    Last Post: 29 Dec 2011, 10:12 PM
  3. Manufacturer Info Plus
    By kuroi in forum Addon Sideboxes
    Replies: 13
    Last Post: 16 Jun 2011, 04:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR