Forums / Upgrading to 1.5.x / A few errors about defines: "PHP Warning: Use of undefined constant ..."

A few errors about defines: "PHP Warning: Use of undefined constant ..."

Views: 17,876

Results 21 to 33 of 33
1 May 2020, 7:46 PM
#21
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

A few errors about defines: "PHP Warning: Use of undefined constant ..."

I'll bet I removed the fix from #1936 when I cleaned out all the unused defines.

But includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php looks ok to me - can you check again or be explicit about what you think is wrong?

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

1 May 2020, 7:52 PM
#22
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

Yes, that was happened with #1936. I will add it back in.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

1 May 2020, 7:54 PM
#23
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

Created PR #3391.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

1 May 2020, 7:54 PM
#24
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,870
Plugin Contributions:
19

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

The fix for line 107 of tpl_modules_mobile_menu.php was not carried forward

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

1 May 2020, 7:59 PM
#25
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,870
Plugin Contributions:
19

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

strange that the line 107 fix shows on github for 1.5.7 but not in our test site. I update the test whenever a commit is done.:blink:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

1 May 2020, 8:00 PM
#26
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

Yep, you're out of sync. My repo looks fine and it's even with zencart:157.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

2 May 2020, 6:03 AM
#27
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,870
Plugin Contributions:
19

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

Couldn't manage to do a PR for includes/languages/english/products_all.php but left a comment on the commit that removed the```
define('TEXT_PRODUCTS_MODEL', 'Model: ');

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

5 Sep 2020, 4:56 PM
#28
kernheimer avatar

kernheimer

Zen Follower

Join Date:
Jul 2009
Posts:
126
Plugin Contributions:
0

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

Speak394:

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.

i have the same messages and still have no idea what to do.
fresh install Zen Cart 1.5.7
Database Patch Level: 1.5.7

PHP Version 7.3.19
and i'm clueless. a bit help is very much appreciated :D

5 Sep 2020, 6:15 PM
#29
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

Can you go to Admin > Configuration > Define Page Status and be sure you still have all these values? I wonder if they were removed from your database. You should have 13 rows on that page.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

6 Sep 2020, 3:55 PM
#30
kernheimer avatar

kernheimer

Zen Follower

Join Date:
Jul 2009
Posts:
126
Plugin Contributions:
0

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

swguy:

Can you go to Admin > Configuration > Define Page Status and be sure you still have all these values? I wonder if they were removed from your database. You should have 13 rows on that page.

it was a fresh install and i have no idea what happend :( ( or how to fix that)

wow... nothing! only oneAttachment 19179

6 Sep 2020, 6:33 PM
#31
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

kernheimer:

i have the same messages and still have no idea what to do.
fresh install Zen Cart 1.5.7
Database Patch Level: 1.5.7

kernheimer:

it was a fresh install and i have no idea what happend :( ( or how to fix that)

wow... nothing! only oneAttachment 19179

You said you have v1.5.7, so these are the SQL commands that would put them back:
https://github.com/zencart/zencart/blob/ac3be2402476ae89deea7bd4c8a70e96728376ef/zc_install/sql/install/mysql_zencart.sql#L2999-L3011

However, since you also said "fresh install", I'd be worried that dozens of other settings are missing too, which would leave me wondering: 1-how, 2-maybe a re-install would be wise, to start over with something reliable instead of guessing about patch-fixing a lot of unknowns.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

6 Sep 2020, 7:21 PM
#32
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

@kernheimer, how was the install performed? Did you follow the Zen Cart instructions (https://docs.zen-cart.com/user/first_steps/how_do_i_install/) or did you let an application provided by your webhost 'help'?

6 Sep 2020, 8:03 PM
#33
kernheimer avatar

kernheimer

Zen Follower

Join Date:
Jul 2009
Posts:
126
Plugin Contributions:
0

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

@drByte!
THANK YOU SO MUCH, it seemed to do the trick! I can not thank you enough. ( fingers crossed!)

@lat9, got me!!! I use zencart already such a long time that i installed it over instalatron, without knowing there was such a thing as the instructions as you pointed me to! i just went along with my old routine!
i will however ( now knowing where to go and what to read) install the whole thing again and now know what i need to take care of.

Thanks guys! i was getting so nervous about it. My skills are limited to talking and not good in reading im affraid. but i will change that :D