bsmither Posted March 1, 2023 Share Posted March 1, 2023 If you are willing to do a lot of work, we can try to find the problem. Quote Link to comment Share on other sites More sharing options...
RobinSomes Posted March 1, 2023 Share Posted March 1, 2023 1 hour ago, bsmither said: If you are willing to do a lot of work, we can try to find the problem. Certainly happy to try, yes; it would be better fixed if possible. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 2, 2023 Share Posted March 2, 2023 (edited) One more place to verify: In /classes/cubecart.class.php, at line 2323 (the line of the error message): $plugin_path = (isset($gateway['base_folder'])) ? CC_ROOT_DIR.'/modules/plugins/'.$gateway['base_folder'].'/gateway.class.php' : ''; Does that statement look like what is in your installation? EDIT: No, it wouldn't. I changed that statement to suit my own needs. Edited March 2, 2023 by bsmither Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 2, 2023 Share Posted March 2, 2023 In the PayPal Commerce module: /hooks/class.cubecart.display_gateways.php Near line 14, find: $module_config = $GLOBALS['config']->get('paypal_commerce'); On the same line, after that statement, add: $GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'PayPal Commerce:'.print_r($module_config,true)); In /classes/cubecart.class.php: Near line 2319, find: if(is_array($gateways) && !empty($gateways)) { On the same line, after that statement, add: $GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'Gateways? '.(is_array($gateways)?"Yes":"No").':'.'How many? '.count($gateways)); Near line 2321, find: foreach ($gateways as $gateway) { On the same line, after that statement, add: $GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'Gateway => '.print_r($gateway,true)); In CubeCart's admin, Store Settings, Advanced tab, enable Debug mode and enter your network's IP address in the following text entry field (www.showmyip.com). Make sure PayPal Commerce is enabled. Clear CubeCart's cache. Visit the checkout page where the list of gateways should be listed. Below the main content on the page, there is a grey section of debug data. Very near the bottom of that section you will find Debug Messages. What are they? Quote Link to comment Share on other sites More sharing options...
Robin Somes Posted March 2, 2023 Author Share Posted March 2, 2023 11 hours ago, bsmither said: In the PayPal Commerce module: /hooks/class.cubecart.display_gateways.php Near line 14, find: $module_config = $GLOBALS['config']->get('paypal_commerce'); On the same line, after that statement, add: $GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'PayPal Commerce:'.print_r($module_config,true)); In /classes/cubecart.class.php: Near line 2319, find: if(is_array($gateways) && !empty($gateways)) { On the same line, after that statement, add: $GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'Gateways? '.(is_array($gateways)?"Yes":"No").':'.'How many? '.count($gateways)); Near line 2321, find: foreach ($gateways as $gateway) { On the same line, after that statement, add: $GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'Gateway => '.print_r($gateway,true)); In CubeCart's admin, Store Settings, Advanced tab, enable Debug mode and enter your network's IP address in the following text entry field (www.showmyip.com). Make sure PayPal Commerce is enabled. Clear CubeCart's cache. Visit the checkout page where the list of gateways should be listed. Below the main content on the page, there is a grey section of debug data. Very near the bottom of that section you will find Debug Messages. What are they? Many thanks. Done all that: Debug Messages: [0] Cubecart::_listPaymentOptions:2319:Gateways? Yes:How many? 1 [1] Cubecart::_listPaymentOptions:2322:Gateway => Array ( [module_id] => 1584 [module] => gateway [folder] => SagePay [status] => 1 [default] => 1 [countries] => [position] => 0 ) Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 2, 2023 Share Posted March 2, 2023 (edited) No message from the PayPal hook. This will check if CubeCart is even becoming aware of PayPal's hooks. In /classes/hookloader.class.php: Near lines 450-452, find: $this->_hook_list[$hook['trigger']][$hook['plugin']] = $hook; } return true; On the same line, after the closing parenthesis on the middle line, add: foreach ($this->_hook_list as $hook['trigger'] => $trigger_plugin) { $GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'Hooks: '.$hook['trigger'].' => '.print_r($trigger_plugin,true)); } Edited March 2, 2023 by bsmither Quote Link to comment Share on other sites More sharing options...
RobinSomes Posted March 2, 2023 Share Posted March 2, 2023 3 hours ago, bsmither said: No message from the PayPal hook. This will check if CubeCart is even becoming aware of PayPal's hooks. In /classes/hookloader.class.php: Near lines 450-452, find: $this->_hook_list[$hook['trigger']][$hook['plugin']] = $hook; } return true; On the same line, after the closing parenthesis on the middle line, add: foreach ($this->_hook_list as $hook['trigger'] => $trigger_plugin) { $GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'Hooks: '.$hook['trigger'].' => '.print_r($trigger_plugin,true)); } Debug Messages: [0] HookLoader::_build_hooks_list:451:Hooks: admin.navigation => Array ( [product_addons] => Array ( [hook_id] => 204 [plugin] => product_addons [hook_name] => Noodleman :: Navigation Menu Item [enabled] => 1 [trigger] => admin.navigation [filepath] => [priority] => 0 ) ) [1] HookLoader::_build_hooks_list:451:Hooks: admin.product.save.post_process => Array ( [product_addons] => Array ( [hook_id] => 205 [plugin] => product_addons [hook_name] => Noodleman :: Save Addons [enabled] => 1 [trigger] => admin.product.save.post_process [filepath] => [priority] => 0 ) ) [2] HookLoader::_build_hooks_list:451:Hooks: class.cubecart.display_product => Array ( [product_addons] => Array ( [hook_id] => 206 [plugin] => product_addons [hook_name] => Noodleman :: Product Page [enabled] => 1 [trigger] => class.cubecart.display_product [filepath] => [priority] => 0 ) ) [3] HookLoader::_build_hooks_list:451:Hooks: controller.index => Array ( [product_addons] => Array ( [hook_id] => 207 [plugin] => product_addons [hook_name] => Listener [enabled] => 1 [trigger] => controller.index [filepath] => [priority] => 0 ) [paypal_commerce] => Array ( [hook_id] => 241 [plugin] => paypal_commerce [hook_name] => Index Controller [enabled] => 1 [trigger] => controller.index [filepath] => [priority] => 0 ) ) [4] HookLoader::_build_hooks_list:451:Hooks: class.cart.clear => Array ( [product_addons] => Array ( [hook_id] => 208 [plugin] => product_addons [hook_name] => Empty Cart [enabled] => 1 [trigger] => class.cart.clear [filepath] => [priority] => 0 ) [paypal_commerce] => Array ( [hook_id] => 247 [plugin] => paypal_commerce [hook_name] => Clear Cart [enabled] => 1 [trigger] => class.cart.clear [filepath] => [priority] => 0 ) ) [5] HookLoader::_build_hooks_list:451:Hooks: class.cart.construct.pre => Array ( [product_addons] => Array ( [hook_id] => 209 [plugin] => product_addons [hook_name] => Construct Pre [enabled] => 1 [trigger] => class.cart.construct.pre [filepath] => [priority] => 0 ) [paypal_commerce] => Array ( [hook_id] => 252 [plugin] => paypal_commerce [hook_name] => Prevent basket changes [enabled] => 1 [trigger] => class.cart.construct.pre [filepath] => [priority] => 0 ) ) [6] HookLoader::_build_hooks_list:451:Hooks: class.order.products.add.pre => Array ( [product_addons] => Array ( [hook_id] => 210 [plugin] => product_addons [hook_name] => Order Inventory [enabled] => 1 [trigger] => class.order.products.add.pre [filepath] => [priority] => 0 ) ) [7] HookLoader::_build_hooks_list:451:Hooks: controller.admin => Array ( [product_addons] => Array ( [hook_id] => 211 [plugin] => product_addons [hook_name] => Custom Admin JS [enabled] => 1 [trigger] => controller.admin [filepath] => [priority] => 0 ) ) [8] HookLoader::_build_hooks_list:451:Hooks: admin.category.save.pre_process => Array ( [product_addons] => Array ( [hook_id] => 212 [plugin] => product_addons [hook_name] => Category Clone [enabled] => 1 [trigger] => admin.category.save.pre_process [filepath] => [priority] => 0 ) ) [9] HookLoader::_build_hooks_list:451:Hooks: class.gui.head_js => Array ( [paypal_commerce] => Array ( [hook_id] => 242 [plugin] => paypal_commerce [hook_name] => JS [enabled] => 1 [trigger] => class.gui.head_js [filepath] => [priority] => 0 ) ) [10] HookLoader::_build_hooks_list:451:Hooks: class.cubecart.display_basket.alternate => Array ( [paypal_commerce] => Array ( [hook_id] => 243 [plugin] => paypal_commerce [hook_name] => Checkout Smart Button [enabled] => 1 [trigger] => class.cubecart.display_basket.alternate [filepath] => [priority] => 0 ) ) [11] HookLoader::_build_hooks_list:451:Hooks: class.cubecart.pre_basket => Array ( [paypal_commerce] => Array ( [hook_id] => 244 [plugin] => paypal_commerce [hook_name] => Create Order [enabled] => 1 [trigger] => class.cubecart.pre_basket [filepath] => [priority] => 0 ) ) [12] HookLoader::_build_hooks_list:451:Hooks: class.cubecart.construct.confirm => Array ( [paypal_commerce] => Array ( [hook_id] => 245 [plugin] => paypal_commerce [hook_name] => Create Customer [enabled] => 1 [trigger] => class.cubecart.construct.confirm [filepath] => [priority] => 0 ) ) [13] HookLoader::_build_hooks_list:451:Hooks: class.cart.update => Array ( [paypal_commerce] => Array ( [hook_id] => 246 [plugin] => paypal_commerce [hook_name] => Update order [enabled] => 1 [trigger] => class.cart.update [filepath] => [priority] => 0 ) ) [14] HookLoader::_build_hooks_list:451:Hooks: class.cubecart.display_gateways => Array ( [paypal_commerce] => Array ( [hook_id] => 248 [plugin] => paypal_commerce [hook_name] => Display Gateway or Make Payment [enabled] => 1 [trigger] => class.cubecart.display_gateways [filepath] => [priority] => 0 ) ) [15] HookLoader::_build_hooks_list:451:Hooks: class.cubecart.construct.cancel => Array ( [paypal_commerce] => Array ( [hook_id] => 249 [plugin] => paypal_commerce [hook_name] => Cancel PayPal Commerce [enabled] => 1 [trigger] => class.cubecart.construct.cancel [filepath] => [priority] => 0 ) ) [16] HookLoader::_build_hooks_list:451:Hooks: class.cubecart.construct.callback.gateway => Array ( [paypal_commerce] => Array ( [hook_id] => 250 [plugin] => paypal_commerce [hook_name] => Path to plugin gateway class [enabled] => 1 [trigger] => class.cubecart.construct.callback.gateway [filepath] => [priority] => 0 ) ) [17] HookLoader::_build_hooks_list:451:Hooks: class.cubecart.construct.gateway => Array ( [paypal_commerce] => Array ( [hook_id] => 251 [plugin] => paypal_commerce [hook_name] => Finalize order [enabled] => 1 [trigger] => class.cubecart.construct.gateway [filepath] => [priority] => 0 ) ) [18] HookLoader::_build_hooks_list:451:Hooks: class.order.order_status => Array ( [paypal_commerce] => Array ( [hook_id] => 253 [plugin] => paypal_commerce [hook_name] => Void auth for cancelled order [enabled] => 1 [trigger] => class.order.order_status [filepath] => [priority] => 0 ) ) [19] HookLoader::_build_hooks_list:451:Hooks: class.gui.display_side_basket => Array ( [paypal_commerce] => Array ( [hook_id] => 254 [plugin] => paypal_commerce [hook_name] => Hide Checkout Button [enabled] => 1 [trigger] => class.gui.display_side_basket [filepath] => [priority] => 0 ) ) [20] Cubecart::_listPaymentOptions:2319:Gateways? Yes:How many? 1 [21] Cubecart::_listPaymentOptions:2322:Gateway => Array ( [module_id] => 1584 [module] => gateway [folder] => SagePay [status] => 1 [default] => 1 [countries] => [position] => 0 ) Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 2, 2023 Share Posted March 2, 2023 This is the one I wanted to see: [14] HookLoader::_build_hooks_list:451:Hooks: class.cubecart.display_gateways => Array ( [paypal_commerce] => Array ( [hook_id] => 248 [plugin] => paypal_commerce [hook_name] => Display Gateway or Make Payment [enabled] => 1 [trigger] => class.cubecart.display_gateways [filepath] => [priority] => 0 ) ) More to come. 1 Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2023 Share Posted March 3, 2023 (edited) In the file /classes/hookloader.class.php: Near line 279, find: if ($GLOBALS['config']->get('config', 'safe_mode')===true) { On the same line, after the statement, add: $GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'Whoa! Safe Mode is enabled!'); Near line 285, find: if (is_array($this->_hook_list) && isset($this->_hook_list[$trigger]) && !empty($this->_hook_list[$trigger])) { On the same line, after the statement, add: if ("class.cubecart.display_gateways" == $trigger) {$GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'We found class.cubecart.display_gateways in the hook list.');} Near line 291, find: if (file_exists($this->_hook_dir.'/'.$hook['plugin'].'/'.$hook['filepath']) && $this->_security_check($hook['filepath'])) { On the same line, after the statement, add: if ("class.cubecart.display_gateways" == $trigger) {$GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'The hook file exists and passed the security check: '.$this->_hook_dir.'/'.$hook['plugin'].'/'.$hook['filepath']);} Near lines 302-304, find: } // Load hook for code snippets After the closing parenthesis on the first line, add: else { $GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'Not loading a hook because:'.print_r(array('Is the HookLoader enabled?' => $this->_enabled, 'Do we have a trigger?' => !empty($trigger), 'Do we have a HookLoader _hook_list?' => !empty($this->_hook_list)))); } Please remove the code that was added near line 451. Edited March 3, 2023 by bsmither Quote Link to comment Share on other sites More sharing options...
Robin Somes Posted March 3, 2023 Author Share Posted March 3, 2023 8 hours ago, bsmither said: In the file /classes/hookloader.class.php: Near line 279, find: if ($GLOBALS['config']->get('config', 'safe_mode')===true) { On the same line, after the statement, add: $GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'Whoa! Safe Mode is enabled!'); Near line 285, find: if (is_array($this->_hook_list) && isset($this->_hook_list[$trigger]) && !empty($this->_hook_list[$trigger])) { On the same line, after the statement, add: if ("class.cubecart.display_gateways" == $trigger) {$GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'We found class.cubecart.display_gateways in the hook list.');} Near line 291, find: if (file_exists($this->_hook_dir.'/'.$hook['plugin'].'/'.$hook['filepath']) && $this->_security_check($hook['filepath'])) { On the same line, after the statement, add: if ("class.cubecart.display_gateways" == $trigger) {$GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'The hook file exists and passed the security check: '.$this->_hook_dir.'/'.$hook['plugin'].'/'.$hook['filepath']);} Near lines 302-304, find: } // Load hook for code snippets After the closing parenthesis on the first line, add: else { $GLOBALS['debug']->debugMessage(__METHOD__.':'.__LINE__.':'.'Not loading a hook because:'.print_r(array('Is the HookLoader enabled?' => $this->_enabled, 'Do we have a trigger?' => !empty($trigger), 'Do we have a HookLoader _hook_list?' => !empty($this->_hook_list)))); } Please remove the code that was added near line 451. Debug Messages: [0] HookLoader::load:279:Whoa! Safe Mode is enabled! [1] HookLoader::load:279:Whoa! Safe Mode is enabled! [2] HookLoader::load:279:Whoa! Safe Mode is enabled! [3] HookLoader::load:279:Whoa! Safe Mode is enabled! [4] HookLoader::load:279:Whoa! Safe Mode is enabled! [5] HookLoader::load:279:Whoa! Safe Mode is enabled! [6] HookLoader::load:279:Whoa! Safe Mode is enabled! [7] HookLoader::load:279:Whoa! Safe Mode is enabled! [8] HookLoader::load:279:Whoa! Safe Mode is enabled! [9] HookLoader::load:279:Whoa! Safe Mode is enabled! [10] HookLoader::load:279:Whoa! Safe Mode is enabled! [11] HookLoader::load:279:Whoa! Safe Mode is enabled! [12] HookLoader::load:279:Whoa! Safe Mode is enabled! [13] HookLoader::load:279:Whoa! Safe Mode is enabled! [14] HookLoader::load:279:Whoa! Safe Mode is enabled! [15] HookLoader::load:279:Whoa! Safe Mode is enabled! [16] HookLoader::load:279:Whoa! Safe Mode is enabled! [17] HookLoader::load:279:Whoa! Safe Mode is enabled! [18] HookLoader::load:279:Whoa! Safe Mode is enabled! [19] HookLoader::load:279:Whoa! Safe Mode is enabled! [20] HookLoader::load:279:Whoa! Safe Mode is enabled! [21] HookLoader::load:279:Whoa! Safe Mode is enabled! [22] HookLoader::load:279:Whoa! Safe Mode is enabled! [23] HookLoader::load:279:Whoa! Safe Mode is enabled! [24] HookLoader::load:279:Whoa! Safe Mode is enabled! [25] HookLoader::load:279:Whoa! Safe Mode is enabled! [26] HookLoader::load:279:Whoa! Safe Mode is enabled! [27] HookLoader::load:279:Whoa! Safe Mode is enabled! [28] HookLoader::load:279:Whoa! Safe Mode is enabled! [29] HookLoader::load:279:Whoa! Safe Mode is enabled! [30] HookLoader::load:279:Whoa! Safe Mode is enabled! [31] HookLoader::load:279:Whoa! Safe Mode is enabled! [32] HookLoader::load:279:Whoa! Safe Mode is enabled! [33] HookLoader::load:279:Whoa! Safe Mode is enabled! [34] HookLoader::load:279:Whoa! Safe Mode is enabled! [35] HookLoader::load:279:Whoa! Safe Mode is enabled! [36] HookLoader::load:279:Whoa! Safe Mode is enabled! [37] Cubecart::_listPaymentOptions:2319:Gateways? Yes:How many? 1 [38] Cubecart::_listPaymentOptions:2322:Gateway => Array ( [module_id] => 1584 [module] => gateway [folder] => SagePay [status] => 1 [default] => 1 [countries] => [position] => 0 ) [39] HookLoader::load:279:Whoa! Safe Mode is enabled! [40] HookLoader::load:279:Whoa! Safe Mode is enabled! [41] HookLoader::load:279:Whoa! Safe Mode is enabled! [42] HookLoader::load:279:Whoa! Safe Mode is enabled! [43] HookLoader::load:279:Whoa! Safe Mode is enabled! [44] HookLoader::load:279:Whoa! Safe Mode is enabled! [45] HookLoader::load:279:Whoa! Safe Mode is enabled! [46] HookLoader::load:279:Whoa! Safe Mode is enabled! [47] HookLoader::load:279:Whoa! Safe Mode is enabled! [48] HookLoader::load:279:Whoa! Safe Mode is enabled! [49] HookLoader::load:279:Whoa! Safe Mode is enabled! [50] HookLoader::load:279:Whoa! Safe Mode is enabled! [51] HookLoader::load:279:Whoa! Safe Mode is enabled! [52] HookLoader::load:279:Whoa! Safe Mode is enabled! [53] HookLoader::load:279:Whoa! Safe Mode is enabled! [54] HookLoader::load:279:Whoa! Safe Mode is enabled! [55] HookLoader::load:279:Whoa! Safe Mode is enabled! [56] HookLoader::load:279:Whoa! Safe Mode is enabled! [57] HookLoader::load:279:Whoa! Safe Mode is enabled! [58] HookLoader::load:279:Whoa! Safe Mode is enabled! [59] HookLoader::load:279:Whoa! Safe Mode is enabled! [60] HookLoader::load:279:Whoa! Safe Mode is enabled! [61] HookLoader::load:279:Whoa! Safe Mode is enabled! [62] HookLoader::load:279:Whoa! Safe Mode is enabled! [63] HookLoader::load:279:Whoa! Safe Mode is enabled! [64] HookLoader::load:279:Whoa! Safe Mode is enabled! [65] HookLoader::load:279:Whoa! Safe Mode is enabled! [66] HookLoader::load:279:Whoa! Safe Mode is enabled! [67] HookLoader::load:279:Whoa! Safe Mode is enabled! [68] HookLoader::load:279:Whoa! Safe Mode is enabled! [69] HookLoader::load:279:Whoa! Safe Mode is enabled! [70] HookLoader::load:279:Whoa! Safe Mode is enabled! [71] HookLoader::load:279:Whoa! Safe Mode is enabled! [72] HookLoader::load:279:Whoa! Safe Mode is enabled! [73] HookLoader::load:279:Whoa! Safe Mode is enabled! [74] HookLoader::load:279:Whoa! Safe Mode is enabled! [75] HookLoader::load:279:Whoa! Safe Mode is enabled! [76] HookLoader::load:279:Whoa! Safe Mode is enabled! [77] HookLoader::load:279:Whoa! Safe Mode is enabled! [78] HookLoader::load:279:Whoa! Safe Mode is enabled! [79] HookLoader::load:279:Whoa! Safe Mode is enabled! [80] HookLoader::load:279:Whoa! Safe Mode is enabled! [81] HookLoader::load:279:Whoa! Safe Mode is enabled! [82] HookLoader::load:279:Whoa! Safe Mode is enabled! [83] HookLoader::load:279:Whoa! Safe Mode is enabled! [84] HookLoader::load:279:Whoa! Safe Mode is enabled! [85] HookLoader::load:279:Whoa! Safe Mode is enabled! [86] HookLoader::load:279:Whoa! Safe Mode is enabled! [87] HookLoader::load:279:Whoa! Safe Mode is enabled! [88] HookLoader::load:279:Whoa! Safe Mode is enabled! [89] HookLoader::load:279:Whoa! Safe Mode is enabled! [90] HookLoader::load:279:Whoa! Safe Mode is enabled! [91] HookLoader::load:279:Whoa! Safe Mode is enabled! [92] HookLoader::load:279:Whoa! Safe Mode is enabled! [93] HookLoader::load:279:Whoa! Safe Mode is enabled! [94] HookLoader::load:279:Whoa! Safe Mode is enabled! [95] HookLoader::load:279:Whoa! Safe Mode is enabled! [96] HookLoader::load:279:Whoa! Safe Mode is enabled! [97] HookLoader::load:279:Whoa! Safe Mode is enabled! [98] HookLoader::load:279:Whoa! Safe Mode is enabled! [99] HookLoader::load:279:Whoa! Safe Mode is enabled! [100] HookLoader::load:279:Whoa! Safe Mode is enabled! [101] HookLoader::load:279:Whoa! Safe Mode is enabled! [102] HookLoader::load:279:Whoa! Safe Mode is enabled! [103] HookLoader::load:279:Whoa! Safe Mode is enabled! [104] HookLoader::load:279:Whoa! Safe Mode is enabled! [105] HookLoader::load:279:Whoa! Safe Mode is enabled! [106] HookLoader::load:279:Whoa! Safe Mode is enabled! Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2023 Share Posted March 3, 2023 In the file /includes/global.inc.php: Find: $glob['safe_mode'] = true; Change to: $glob['safe_mode'] = false; This file is probably set to "Read-Only" by the operating system. You will need to change that so that the file can be edited. Quote Link to comment Share on other sites More sharing options...
RobinSomes Posted March 3, 2023 Share Posted March 3, 2023 5 hours ago, bsmither said: In the file /includes/global.inc.php: Find: $glob['safe_mode'] = true; Change to: $glob['safe_mode'] = false; This file is probably set to "Read-Only" by the operating system. You will need to change that so that the file can be edited. "Site error: the ionCube PHP Loader needs to be installed. This is a widely used PHP extension for running ionCube protected PHP code, website security and malware blocking. Please visit get-loader.ioncube.com for install assistance." On both the shop and the admin pages. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2023 Share Posted March 3, 2023 (edited) Re-edit globals.inc.php and set safe mode to true. Then, in admin, Manage Extensions, delete the Product Addons plugin. (Maybe just disabling the plugin will suffice.) Then, re-edit globals.inc.php and set safe mode to false. If you haven't done so already, convince your hosting provider to install ionCube to your server environment. Edited March 3, 2023 by bsmither Quote Link to comment Share on other sites More sharing options...
RobinSomes Posted March 3, 2023 Share Posted March 3, 2023 12 minutes ago, bsmither said: Re-edit globals.inc.php and set safe mode to true. Then, in admin, Manage Extensions, delete the Product Addons plugin. (Maybe just disabling the plugin will suffice.) Then, re-edit globals.inc.php and set safe mode to false. If you haven't done so already, convince your hosting provider to install ionCube to your server environment. Yes. I'm on PHP 8.0.x at the moment, for which ionCube will never be available, according to this: https://blog.ioncube.com/2022/08/12/ioncube-php-8-1-support-faq-were-almost-ready/ The hosting provider offers PHP 8.1.x as an option, for which ionCube may or may not be available, depending what one reads and where - it's certainly not enabled in the current PHP installation as standard, but I will ask them. My alternative would be to switch back to PHP 7.4 - on which the shop site worked well for a couple of years - but then the other domain under the same hosting account would start throwing error messages at me, as it's Joomla-based and requires at least 8.0. Leaving aside the usual wisdom of updating to the latest stable versions of everything. Meanwhile, back in CubeCart; with safe mode set to false: Debug Messages: [0] HookLoader::load:279:Whoa! Safe Mode is enabled! [1] HookLoader::load:279:Whoa! Safe Mode is enabled! [2] HookLoader::load:279:Whoa! Safe Mode is enabled! [3] HookLoader::load:279:Whoa! Safe Mode is enabled! [4] HookLoader::load:279:Whoa! Safe Mode is enabled! [5] HookLoader::load:279:Whoa! Safe Mode is enabled! [6] HookLoader::load:279:Whoa! Safe Mode is enabled! [7] HookLoader::load:279:Whoa! Safe Mode is enabled! [8] HookLoader::load:279:Whoa! Safe Mode is enabled! [9] HookLoader::load:279:Whoa! Safe Mode is enabled! [10] HookLoader::load:279:Whoa! Safe Mode is enabled! [11] HookLoader::load:279:Whoa! Safe Mode is enabled! [12] HookLoader::load:279:Whoa! Safe Mode is enabled! [13] HookLoader::load:279:Whoa! Safe Mode is enabled! [14] HookLoader::load:279:Whoa! Safe Mode is enabled! [15] HookLoader::load:279:Whoa! Safe Mode is enabled! [16] HookLoader::load:279:Whoa! Safe Mode is enabled! [17] HookLoader::load:279:Whoa! Safe Mode is enabled! [18] HookLoader::load:279:Whoa! Safe Mode is enabled! [19] HookLoader::load:279:Whoa! Safe Mode is enabled! [20] HookLoader::load:279:Whoa! Safe Mode is enabled! [21] HookLoader::load:279:Whoa! Safe Mode is enabled! [22] HookLoader::load:279:Whoa! Safe Mode is enabled! [23] HookLoader::load:279:Whoa! Safe Mode is enabled! [24] HookLoader::load:279:Whoa! Safe Mode is enabled! [25] HookLoader::load:279:Whoa! Safe Mode is enabled! [26] HookLoader::load:279:Whoa! Safe Mode is enabled! [27] HookLoader::load:279:Whoa! Safe Mode is enabled! [28] HookLoader::load:279:Whoa! Safe Mode is enabled! [29] HookLoader::load:279:Whoa! Safe Mode is enabled! [30] HookLoader::load:279:Whoa! Safe Mode is enabled! [31] HookLoader::load:279:Whoa! Safe Mode is enabled! [32] HookLoader::load:279:Whoa! Safe Mode is enabled! [33] HookLoader::load:279:Whoa! Safe Mode is enabled! [34] HookLoader::load:279:Whoa! Safe Mode is enabled! [35] HookLoader::load:279:Whoa! Safe Mode is enabled! [36] HookLoader::load:279:Whoa! Safe Mode is enabled! [37] HookLoader::load:279:Whoa! Safe Mode is enabled! [38] Cubecart::_listPaymentOptions:2319:Gateways? Yes:How many? 1 [39] Cubecart::_listPaymentOptions:2322:Gateway => Array ( [module_id] => 1584 [module] => gateway [folder] => SagePay [status] => 1 [default] => 1 [countries] => [position] => 0 ) [40] HookLoader::load:279:Whoa! Safe Mode is enabled! [41] HookLoader::load:279:Whoa! Safe Mode is enabled! [42] HookLoader::load:279:Whoa! Safe Mode is enabled! [43] HookLoader::load:279:Whoa! Safe Mode is enabled! [44] HookLoader::load:279:Whoa! Safe Mode is enabled! [45] HookLoader::load:279:Whoa! Safe Mode is enabled! [46] HookLoader::load:279:Whoa! Safe Mode is enabled! [47] HookLoader::load:279:Whoa! Safe Mode is enabled! [48] HookLoader::load:279:Whoa! Safe Mode is enabled! [49] HookLoader::load:279:Whoa! Safe Mode is enabled! [50] HookLoader::load:279:Whoa! Safe Mode is enabled! [51] HookLoader::load:279:Whoa! Safe Mode is enabled! [52] HookLoader::load:279:Whoa! Safe Mode is enabled! [53] HookLoader::load:279:Whoa! Safe Mode is enabled! [54] HookLoader::load:279:Whoa! Safe Mode is enabled! [55] HookLoader::load:279:Whoa! Safe Mode is enabled! [56] HookLoader::load:279:Whoa! Safe Mode is enabled! [57] HookLoader::load:279:Whoa! Safe Mode is enabled! [58] HookLoader::load:279:Whoa! Safe Mode is enabled! [59] HookLoader::load:279:Whoa! Safe Mode is enabled! [60] HookLoader::load:279:Whoa! Safe Mode is enabled! [61] HookLoader::load:279:Whoa! Safe Mode is enabled! [62] HookLoader::load:279:Whoa! Safe Mode is enabled! [63] HookLoader::load:279:Whoa! Safe Mode is enabled! [64] HookLoader::load:279:Whoa! Safe Mode is enabled! [65] HookLoader::load:279:Whoa! Safe Mode is enabled! [66] HookLoader::load:279:Whoa! Safe Mode is enabled! [67] HookLoader::load:279:Whoa! Safe Mode is enabled! [68] HookLoader::load:279:Whoa! Safe Mode is enabled! [69] HookLoader::load:279:Whoa! Safe Mode is enabled! [70] HookLoader::load:279:Whoa! Safe Mode is enabled! [71] HookLoader::load:279:Whoa! Safe Mode is enabled! [72] HookLoader::load:279:Whoa! Safe Mode is enabled! [73] HookLoader::load:279:Whoa! Safe Mode is enabled! [74] HookLoader::load:279:Whoa! Safe Mode is enabled! [75] HookLoader::load:279:Whoa! Safe Mode is enabled! [76] HookLoader::load:279:Whoa! Safe Mode is enabled! [77] HookLoader::load:279:Whoa! Safe Mode is enabled! [78] HookLoader::load:279:Whoa! Safe Mode is enabled! [79] HookLoader::load:279:Whoa! Safe Mode is enabled! [80] HookLoader::load:279:Whoa! Safe Mode is enabled! [81] HookLoader::load:279:Whoa! Safe Mode is enabled! [82] HookLoader::load:279:Whoa! Safe Mode is enabled! [83] HookLoader::load:279:Whoa! Safe Mode is enabled! [84] HookLoader::load:279:Whoa! Safe Mode is enabled! [85] HookLoader::load:279:Whoa! Safe Mode is enabled! [86] HookLoader::load:279:Whoa! Safe Mode is enabled! [87] HookLoader::load:279:Whoa! Safe Mode is enabled! [88] HookLoader::load:279:Whoa! Safe Mode is enabled! [89] HookLoader::load:279:Whoa! Safe Mode is enabled! [90] HookLoader::load:279:Whoa! Safe Mode is enabled! [91] HookLoader::load:279:Whoa! Safe Mode is enabled! [92] HookLoader::load:279:Whoa! Safe Mode is enabled! Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2023 Share Posted March 3, 2023 The safe mode is still true? Have CubeCart clear it's internal cache. (Although needing to do that, if that fixes it, is very strange.) This says the "Encoder" is now available to process PHP8.1 source code. https://blog.ioncube.com/2022/08/15/new-ioncube-encoder-12-release-php-8-1-support/ There must, therefore, be a loader (decoder) for PHP8.1. The Wizard can confirm it: https://www.ioncube.com/loaders.php Quote Link to comment Share on other sites More sharing options...
RobinSomes Posted March 3, 2023 Share Posted March 3, 2023 (edited) 17 minutes ago, bsmither said: The safe mode is still true? Have CubeCart clear it's internal cache. (Although needing to do that, if that fixes it, is very strange.) Hmmm. Despite me uploading the *modified* version of global.inc.php, again, yes it *was* still true. How embarrassing. It looks like FileZilla reports a successful upload, even if the target file was set to 0444 and wasn't actually overwritten. So, now that $glob['safe_mode'] really does = false, suddenly things look a whole lot rosier. PayPal options appear all over the Checkout page, and (hopefully I haven't redacted too many bits): Debug Messages: [0] HookLoader::load:285:We found class.cubecart.display_gateways in the hook list. [1] HookLoader::load:291:The hook file exists and passed the security check: /[REDACTED]l/piscesconservation.com/cube/modules/plugins/paypal_commerce/hooks/class.cubecart.display_gateways.php [2] :15:PayPal Commerce:Array ( [status] => 1 [countries] => [client_id] => [READCTED] [client_secret] =>[REDACTED] [merchantIdInPayPal] => [REDACTED] [merchantId] => [REDACTED] [status_change_time] => capture [settlement] => capture [smart_layout] => horizontal [smart_color] => gold [smart_shape] => rect [smart_label] => checkout [smart_tagline] => true [smart_height] => 40 [ccf] => 1 [3ds] => 1 [install_time] => 1677101689 [pay_later_button] => 1 [venmo_button] => 0 [pay_later_messaging] => 1 [plm_home] => 1 [plm_category] => 1 [plm_product] => 1 [plm_cart] => 1 [plm_payment] => 1 [display_pdp] => 1 [primary_email] =>[REDACTED] [webhook_id] => [REDACTED] ) [3] Cubecart::_listPaymentOptions:2319:Gateways? Yes:How many? 2 [4] Cubecart::_listPaymentOptions:2322:Gateway => Array ( [module_id] => 1584 [module] => gateway [folder] => SagePay [status] => 1 [default] => 1 [countries] => [position] => 0 ) [5] Cubecart::_listPaymentOptions:2322:Gateway => Array ( [plugin] => 1 [base_folder] => paypal_commerce [folder] => paypal_commerce [desc] => /cube/modules/plugins/paypal_commerce/images/gb.jpg [default] => 1 ) Edited March 3, 2023 by RobinSomes Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 3, 2023 Share Posted March 3, 2023 I added more to my post above. Please reload this forum page. There is no urgency in removing the debugging code. It does not affect how CubeCart runs. 1 Quote Link to comment Share on other sites More sharing options...
RobinSomes Posted March 3, 2023 Share Posted March 3, 2023 7 minutes ago, bsmither said: I added more to my post above. Please reload this forum page. There is no urgency in removing the debugging code. It does not affect how CubeCart runs. Many thanks indeed. It's very much appreciated. I have the original versions of all the edited files; I'll restore them in a couple of days if things are all still in order. Will now set about the hosting providers and see what they can do about ionCube. Thanks again. 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.