Re: Upgrade Zencart version 1.5.6
These warnings are coming from my mods. You need the updates to my mods to get the PHP7 changes. Go to my store and get them.
Re: Upgrade Zencart version 1.5.6
v156a and php 7.2
I get these:
Quote:
PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../admin/includes/functions/extra_functions/edit_orders_functions.php on line 662.
Quote:
PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPAL_TESTING - assumed 'MODULE_PAYMENT_PAYPAL_TESTING' (this will throw an Error in a future version of PHP) in .../includes/init_includes/init_header.php on line 27.
Quote:
PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in .../includes/templates/template_default/templates/tpl_modules_shipping_estimator.php on line 134.
Are they all related to the same issue and is it bad for shopping cart for me to change to php 7.1 and avoid all that?
Re: Upgrade Zencart version 1.5.6
This one
Code:
PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../admin/includes/functions/extra_functions/edit_orders_functions.php on line 662.
is coming from Edit Orders, but line 662 of the current version of the file does not reference the count function.
I'll suggest that you take that discussion to the plugin's support thread (https://www.zen-cart.com/showthread.php?200407), with the identification of the version of EO that you are currently using.
Re: Upgrade Zencart version 1.5.6
I am using 1.5.6b
php version 7.2.24
My log files are filled with the following. And this is being recorded about every 2 to 3 minutes.
[24-Jan-2020 21:03:06 UTC] Request URI: /index.php?main_page=cookie_usage, IP address: 46.229.168.139
#1 require(/home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php) called at [/home/uni48fg5k150/public_html/includes/modules/column_left.php:31]
#2 require(/home/uni48fg5k150/public_html/includes/modules/column_left.php) called at [/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#3 require(/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/uni48fg5k150/public_html/index.php:97]
--> PHP Warning: Use of undefined constant DEFINE_SHIPPINGINFO_STATUS - assumed 'DEFINE_SHIPPINGINFO_STATUS' (this will throw an Error in a future version of PHP) in /home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php on line 14.
[24-Jan-2020 21:03:06 UTC] Request URI: /index.php?main_page=cookie_usage, IP address: 46.229.168.139
#1 require(/home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php) called at [/home/uni48fg5k150/public_html/includes/modules/column_left.php:31]
#2 require(/home/uni48fg5k150/public_html/includes/modules/column_left.php) called at [/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#3 require(/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/uni48fg5k150/public_html/index.php:97]
--> PHP Warning: Use of undefined constant DEFINE_PRIVACY_STATUS - assumed 'DEFINE_PRIVACY_STATUS' (this will throw an Error in a future version of PHP) in /home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php on line 17.
[24-Jan-2020 21:03:06 UTC] Request URI: /index.php?main_page=cookie_usage, IP address: 46.229.168.139
#1 require(/home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php) called at [/home/uni48fg5k150/public_html/includes/modules/column_left.php:31]
#2 require(/home/uni48fg5k150/public_html/includes/modules/column_left.php) called at [/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#3 require(/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/uni48fg5k150/public_html/index.php:97]
--> PHP Warning: Use of undefined constant DEFINE_CONDITIONS_STATUS - assumed 'DEFINE_CONDITIONS_STATUS' (this will throw an Error in a future version of PHP) in /home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php on line 20.
[24-Jan-2020 21:03:06 UTC] Request URI: /index.php?main_page=cookie_usage, IP address: 46.229.168.139
#1 require(/home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php) called at [/home/uni48fg5k150/public_html/includes/modules/column_left.php:31]
#2 require(/home/uni48fg5k150/public_html/includes/modules/column_left.php) called at [/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#3 require(/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/uni48fg5k150/public_html/index.php:97]
--> PHP Warning: Use of undefined constant DEFINE_CONTACT_US_STATUS - assumed 'DEFINE_CONTACT_US_STATUS' (this will throw an Error in a future version of PHP) in /home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php on line 23.
[24-Jan-2020 21:03:06 UTC] Request URI: /index.php?main_page=cookie_usage, IP address: 46.229.168.139
#1 require(/home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php) called at [/home/uni48fg5k150/public_html/includes/modules/column_left.php:31]
#2 require(/home/uni48fg5k150/public_html/includes/modules/column_left.php) called at [/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#3 require(/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/uni48fg5k150/public_html/index.php:97]
--> PHP Warning: Use of undefined constant DEFINE_SITE_MAP_STATUS - assumed 'DEFINE_SITE_MAP_STATUS' (this will throw an Error in a future version of PHP) in /home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php on line 32.
[24-Jan-2020 21:03:06 UTC] Request URI: /index.php?main_page=cookie_usage, IP address: 46.229.168.139
#1 require(/home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php) called at [/home/uni48fg5k150/public_html/includes/modules/column_left.php:31]
#2 require(/home/uni48fg5k150/public_html/includes/modules/column_left.php) called at [/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#3 require(/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/uni48fg5k150/public_html/index.php:97]
--> PHP Warning: Use of undefined constant DEFINE_DISCOUNT_COUPON_STATUS - assumed 'DEFINE_DISCOUNT_COUPON_STATUS' (this will throw an Error in a future version of PHP) in /home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php on line 41.
Re: Upgrade Zencart version 1.5.6
This is the /includes/modules/sideboxes/information.php
<?php
/**
* information sidebox - displays list of general info links, as defined in this file
*
* @package templateSystem
* @copyright Copyright 2003-2019 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: DrByte 2019 Jan 04 Modified in v1.5.6a $
*/
unset($information);
if (DEFINE_SHIPPINGINFO_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a>';
}
if (DEFINE_PRIVACY_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a>';
}
if (DEFINE_CONDITIONS_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a>';
}
if (DEFINE_CONTACT_US_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_CONTACT_US, '', 'SSL') . '">' . BOX_INFORMATION_CONTACT . '</a>';
}
// forum/bb link:
if (!empty($external_bb_url) && !empty($external_bb_text)) {
$information[] = '<a href="' . $external_bb_url . '" target="_blank">' . $external_bb_text . '</a>';
}
if (DEFINE_SITE_MAP_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_SITE_MAP) . '">' . BOX_INFORMATION_SITE_MAP . '</a>';
}
// only show GV FAQ when installed
if (defined('MODULE_ORDER_TOTAL_GV_STATUS') && MODULE_ORDER_TOTAL_GV_STATUS == 'true') {
$information[] = '<a href="' . zen_href_link(FILENAME_GV_FAQ) . '">' . BOX_INFORMATION_GV . '</a>';
}
// only show Discount Coupon FAQ when installed
if (DEFINE_DISCOUNT_COUPON_STATUS <= 1 && defined('MODULE_ORDER_TOTAL_COUPON_STATUS') && MODULE_ORDER_TOTAL_COUPON_STATUS == 'true') {
$information[] = '<a href="' . zen_href_link(FILENAME_DISCOUNT_COUPON) . '">' . BOX_INFORMATION_DISCOUNT_COUPONS . '</a>';
}
if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK == 'true') {
$information[] = '<a href="' . zen_href_link(FILENAME_UNSUBSCRIBE) . '">' . BOX_INFORMATION_UNSUBSCRIBE . '</a>';
}
require($template->get_template_dir('tpl_information.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_information.php');
$title = BOX_HEADING_INFORMATION;
$title_link = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
Re: Upgrade Zencart version 1.5.6
I changed from php 7.2 to 7.1. Have not had an error in the last hour.
Re: Upgrade Zencart version 1.5.6
Quote:
Originally Posted by
Speak394
I changed from php 7.2 to 7.1. Have not had an error in the last hour.
The 'defines' that are (er) not defined should be present in your database's settings for Configuration->Define Page Settings.
What's the history of the site, i.e. did it start out as zc156b or was it upgraded?
If you navigate to your admin's Tools->Developers Tool Kit and enter DEFINE_SHIPPINGINFO_STATUS into the top search form (Look up CONSTANT or language defines), what are the results when you click the Execute Search button?
Re: Upgrade Zencart version 1.5.6
Quote:
Originally Posted by
lat9
The 'defines' that are (er) not defined should be present in your database's settings for Configuration->Define Page Settings.
What's the history of the site, i.e. did it start out as zc156b or was it upgraded?
If you navigate to your admin's Tools->Developers Tool Kit and enter DEFINE_SHIPPINGINFO_STATUS into the top search form (Look up CONSTANT or language defines), what are the results when you click the Execute Search button?
It started as a fresh install.
Re: Upgrade Zencart version 1.5.6
your install failed... look at the install logs. those undefined constants should be in your database. they are not. that's why the error/warning is being reported.
downgrading the version of php is not a solution. it is a temporary bandaid. php 7.1 does NOT report those errors. that's why the log files stopped.
Re: Upgrade Zencart version 1.5.6
Quote:
Originally Posted by
swguy
The tpl_modules_mobile_menu.php fixes were not carried forward to 1.5.7.
Nor was the fix in 1936