Zen Cart Logo
Forums / Upgrading to 1.5.x / PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

Views: 10,884

Results 1 to 14 of 14
11 Apr 2023, 7:22 AM
#1
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

I just upgraded to the newest version 1.5.7f.
I'm using the German version (zen-cart-pro.at).

  1. Various items e.g. "stats_products_lowstock" in the admin don't work and show up a simple white HTML error page and an additional warning log (see below):
[11-Apr-2023 09:02:32 Europe/Berlin] PHP Fatal error: Uncaught Error: Call to undefined function error_log() in /includes/extra_configures/enable_error_logging.php:91
Stack trace:
#0 /admin/stats_products_lowstock.php(16): zen_debug_error_handler()
#1 /admin/index.php(18): require('...')
#2 {main}
thrown in /includes/extra_configures/enable_error_logging.php on line 91
[11-Apr-2023 09:02:32 Europe/Berlin] PHP Fatal error: Uncaught Error: Call to undefined function error_log() in /includes/extra_configures/enable_error_logging.php:104
Stack trace:
#0 [internal function]: zen_fatal_error_handler()
#1 {main}
thrown in /includes/extra_configures/enable_error_logging.php on line 104
[11-Apr-2023 09:02:32 Europe/Berlin] PHP Fatal error: Uncaught Error: Call to undefined function error_log() in /includes/extra_configures/enable_error_logging.php:91
Stack trace:
#0 /includes/classes/db/mysql/query_factory.php(123): zen_debug_error_handler()
#1 /includes/classes/db/mysql/query_factory.php(477): queryFactory->prepare_input()
#2 /includes/classes/db/mysql/query_factory.php(511): queryFactory->getBindVarValue()
#3 /includes/functions/sessions.php(75): queryFactory->bindVars()
#4 [internal function]: _sess_write()
#5 {main}
thrown in /includes/extra_configures/enable_error_logging.php on line 91
[11-Apr-2023 09:02:32 Europe/Berlin] PHP Fatal error: Uncaught Error: Call to undefined function error_log() in /includes/extra_configures/enable_error_logging.php:91
Stack trace:
#0 [internal function]: zen_debug_error_handler()
#1 {main}
thrown in /includes/extra_configures/enable_error_logging.php on line 91
  1. On a test subdomain I installed a fresh installation which also shows the following error:

  2. Installation with 8.0.27 finishes well

  3. Loading Frontend and Backend shows only white page / HTML error

  4. Switching to PHP 7.4.33 and reloading works

  5. Switching then back again to 8.0.27 and reloading also works !!! for Frontend and Backend, but with the above problems and error logs.

The maintainer of the German version says I haven't uploaded all files. But I compared the downloaded file and I unzipped the full file directly on the server via SSH.

  1. Another curiosity is that the module for showing "price per unit" disappears in the Fronend when switching to PHP 7.4.33

Any help is very appreciated.

Information about my system

zc German version (zen-cart-pro.at) 1.5.7f
debian stable
Linux 5.10.0-21-amd64
PHP 8.0.27
PHP Memory Limit: 256M
Datenbank Engine: MySQL 10.5.18-MariaDB-0+deb11u1
MySQL Slow Query Log Status: Off
MySQL Modus: (None set)

14 Apr 2023, 7:54 AM
#2
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Re: PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

I tested another hosting which runs Ubuntu and PHP 8.0.28.
There don't appear these kind of problems.
Though there are warning logs too (but different kind of)

[14-Apr-2023 09:55:36 Europe/Berlin] Request URI: /admin/stats_products_lowstock.php?page=all&sort=products_name&dir=ASC&cat=, IP address: 31.18.248.9, Language id 43
--> PHP Warning: Undefined array key "mfg" in /admin/stats_products_lowstock.php on line 20.

[14-Apr-2023 09:55:36 Europe/Berlin] Request URI: /admin/stats_products_lowstock.php?page=all&sort=products_name&dir=ASC&cat=, IP address: 31.18.248.9, Language id 43
--> PHP Warning: Undefined array key "status" in /admin/stats_products_lowstock.php on line 21.

[14-Apr-2023 09:55:36 Europe/Berlin] Request URI: /admin/stats_products_lowstock.php?page=all&sort=products_name&dir=ASC&cat=, IP address: 31.18.248.9, Language id 43
--> PHP Warning: Undefined array key "csv" in /admin/stats_products_lowstock.php on line 22.

[14-Apr-2023 09:55:36 Europe/Berlin] Request URI: /admin/stats_products_lowstock.php?page=all&sort=products_name&dir=ASC&cat=, IP address: 31.18.248.9, Language id 43
--> PHP Warning: Undefined variable $replace_dir in /admin/stats_products_lowstock.php on line 149.

[14-Apr-2023 09:55:36 Europe/Berlin] Request URI: /admin/stats_products_lowstock.php?page=all&sort=products_name&dir=ASC&cat=, IP address: 31.18.248.9, Language id 43
--> PHP Warning: Undefined variable $dir_model in /admin/stats_products_lowstock.php on line 162.

[14-Apr-2023 09:55:36 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * string in /admin/stats_products_lowstock.php:173
Stack trace:
#0 {main}
thrown in /admin/stats_products_lowstock.php on line 173

[14-Apr-2023 09:55:36 Europe/Berlin] Request URI: /admin/stats_products_lowstock.php?page=all&sort=products_name&dir=ASC&cat=, IP address: 31.18.248.9
--> PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * string in /admin/stats_products_lowstock.php:173
Stack trace:
#0 {main}
thrown in /admin/stats_products_lowstock.php on line 173.

Linux dd6006 5.15.0-60-generic #66-Ubuntu
PHP Version: 8.0.28 (Zend: 4.0.28)
PHP Memory Limit: 256M
Datenbank Engine: MySQL 10.6.12-MariaDB-0ubuntu0.22.04.1-log
MySQL Slow Query Log Status: On
MySQL Modus: NO_ENGINE_SUBSTITUTION

18 Apr 2023, 9:42 AM
#3
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Re: PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

no chance to have running it with PHP 8.0
Create Account resulted in an Error Page :(

So switched down to 7.4.33 meanwhile.

Here another error message at admin -> database-backup (translated)

ERROR: This Backup-Skript seldom works, if safe_mode is activated or if there are open_basedir restrictions.
MySQL Tools (mysql, mysqldump) not found.
18 Apr 2023, 10:02 AM
#4
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Re: PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

Just tried to install the US version 1.5..8a.
Installer runs perfect, but then HTML error with PHP 8.0

18 Apr 2023, 10:10 AM
#5
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

Shop Suey:

Just tried to install the US version 1.5..8a.
Installer runs perfect, but then HTML error with PHP 8.0

Are there any error logs in the /logs folder?

18 Apr 2023, 11:30 AM
#6
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Re: PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

yes, these Attachment 20263 ones

18 Apr 2023, 11:50 AM
#7
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Re: PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

at Install everything "PASSED"

Firtst access to frontend:

[18-Apr-2023 13:45:30 Europe/Berlin] PHP Warning:  Undefined variable $_SESSION in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 84
[18-Apr-2023 13:45:30 Europe/Berlin] PHP Warning:  Trying to access array offset on value of type null in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 84
[18-Apr-2023 13:45:30 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function error_log() in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php:89
Stack trace:
#0 [internal function]: zen_debug_error_handler()
#1 /home/users/roller/www/usa-158a/includes/functions/sessions.php(164): session_save_path()
#2 /home/users/roller/www/usa-158a/includes/init_includes/init_sessions.php(29): zen_session_save_path()
#3 /home/users/roller/www/usa-158a/includes/autoload_func.php(40): require_once('...')
#4 /home/users/roller/www/usa-158a/includes/application_top.php(237): require('...')
#5 /home/users/roller/www/usa-158a/index.php(25): require('...')
#6 {main}
  thrown in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 89
[18-Apr-2023 13:45:30 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function error_log() in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php:102
Stack trace:
#0 [internal function]: zen_fatal_error_handler()
#1 {main}
  thrown in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 102

Firtst access to admin:

[18-Apr-2023 11:59:40 Europe/Berlin] PHP Warning:  Undefined variable $_SESSION in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 84
[18-Apr-2023 11:59:40 Europe/Berlin] PHP Warning:  Trying to access array offset on value of type null in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 84
[18-Apr-2023 11:59:40 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function error_log() in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php:89
Stack trace:
#0 [internal function]: zen_debug_error_handler()
#1 /home/users/roller/www/usa-158a/sHell-ziM-stIll/includes/init_includes/init_cache_key_check.php(14): file_exists()
#2 /home/users/roller/www/usa-158a/includes/autoload_func.php(40): require_once('...')
#3 /home/users/roller/www/usa-158a/sHell-ziM-stIll/includes/application_top.php(42): require('...')
#4 /home/users/roller/www/usa-158a/sHell-ziM-stIll/home.php(9): require('...')
#5 /home/users/roller/www/usa-158a/sHell-ziM-stIll/index.php(11): require('...')
#6 {main}
  thrown in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 89
[18-Apr-2023 11:59:40 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function error_log() in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php:102
Stack trace:
#0 [internal function]: zen_fatal_error_handler()
#1 {main}
  thrown in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 102
18 Apr 2023, 12:23 PM
#8
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

Shop Suey:

yes, these Attachment 20263 ones

Shop Suey:

Just tried to install the US version 1.5..8a.
Installer runs perfect, but then HTML error with PHP 8.0

Open the log file that is generated by "but then HTML error with PHP 8.0" and post its contents here.

18 Apr 2023, 12:34 PM
#9
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Re: PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

Fro admin it is:

[[18-Apr-2023 13:45:30 Europe/Berlin] PHP Warning:  Undefined variable $_SESSION in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 84
[18-Apr-2023 13:45:30 Europe/Berlin] PHP Warning:  Trying to access array offset on value of type null in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 84
[18-Apr-2023 13:45:30 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function error_log() in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php:89
Stack trace:
#0 [internal function]: zen_debug_error_handler()
#1 /home/users/roller/www/usa-158a/includes/functions/sessions.php(164): session_save_path()
#2 /home/users/roller/www/usa-158a/includes/init_includes/init_sessions.php(29): zen_session_save_path()
#3 /home/users/roller/www/usa-158a/includes/autoload_func.php(40): require_once('...')
#4 /home/users/roller/www/usa-158a/includes/application_top.php(237): require('...')
#5 /home/users/roller/www/usa-158a/index.php(25): require('...')
#6 {main}
  thrown in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 89
[18-Apr-2023 13:45:30 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function error_log() in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php:102
Stack trace:
#0 [internal function]: zen_fatal_error_handler()
#1 {main}
  thrown in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 102

For Frontend is is:

[18-Apr-2023 13:45:30 Europe/Berlin] PHP Warning:  Undefined variable $_SESSION in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 84
[18-Apr-2023 13:45:30 Europe/Berlin] PHP Warning:  Trying to access array offset on value of type null in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 84
[18-Apr-2023 13:45:30 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function error_log() in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php:89
Stack trace:
#0 [internal function]: zen_debug_error_handler()
#1 /home/users/roller/www/usa-158a/includes/functions/sessions.php(164): session_save_path()
#2 /home/users/roller/www/usa-158a/includes/init_includes/init_sessions.php(29): zen_session_save_path()
#3 /home/users/roller/www/usa-158a/includes/autoload_func.php(40): require_once('...')
#4 /home/users/roller/www/usa-158a/includes/application_top.php(237): require('...')
#5 /home/users/roller/www/usa-158a/index.php(25): require('...')
#6 {main}
  thrown in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 89
[18-Apr-2023 13:45:30 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function error_log() in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php:102
Stack trace:
#0 [internal function]: zen_fatal_error_handler()
#1 {main}
  thrown in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 102
18 Apr 2023, 7:09 PM
#10
lat9 avatar

lat9

Administrator

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

Re: PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

Go to your admin's Tools :: Server/Version Info and find occurrences of error_log on the screen. It 'looks like' your webhost (for whatever reason) has added the base PHP error_log function to your site's disabled_functions list.

You'll need to contact your webhost to get that corrected.

19 Apr 2023, 5:45 AM
#11
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Re: PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

For admin it is:

[zsa/CODE][18-Apr-2023 11:59:40 Europe/Berlin] PHP Warning:  Undefined variable $_SESSION in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 84
[18-Apr-2023 11:59:40 Europe/Berlin] PHP Warning:  Trying to access array offset on value of type null in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 84
[18-Apr-2023 11:59:40 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function error_log() in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php:89
Stack trace:
#0 [internal function]: zen_debug_error_handler()
#1 /home/users/roller/www/usa-158a/sHell-ziM-stIll/includes/init_includes/init_cache_key_check.php(14): file_exists()
#2 /home/users/roller/www/usa-158a/includes/autoload_func.php(40): require_once('...')
#3 /home/users/roller/www/usa-158a/sHell-ziM-stIll/includes/application_top.php(42): require('...')
#4 /home/users/roller/www/usa-158a/sHell-ziM-stIll/home.php(9): require('...')
#5 /home/users/roller/www/usa-158a/sHell-ziM-stIll/index.php(11): require('...')
#6 {main}
  thrown in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 89
[18-Apr-2023 11:59:40 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function error_log() in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php:102
Stack trace:
#0 [internal function]: zen_fatal_error_handler()
#1 {main}
  thrown in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 102

For Frontend it is:

[CODE]
```[19-Apr-2023 07:42:46 Europe/Berlin] PHP Warning:  Undefined variable $_SESSION in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 84
[19-Apr-2023 07:42:46 Europe/Berlin] PHP Warning:  Trying to access array offset on value of type null in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 84
[19-Apr-2023 07:42:46 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function error_log() in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php:89
Stack trace:
#0 [internal function]: zen_debug_error_handler()
#1 /home/users/roller/www/usa-158a/includes/functions/sessions.php(164): session_save_path()
#2 /home/users/roller/www/usa-158a/includes/init_includes/init_sessions.php(29): zen_session_save_path()
#3 /home/users/roller/www/usa-158a/includes/autoload_func.php(40): require_once('...')
#4 /home/users/roller/www/usa-158a/includes/application_top.php(237): require('...')
#5 /home/users/roller/www/usa-158a/index.php(25): require('...')
#6 {main}
  thrown in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 89
[19-Apr-2023 07:42:46 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function error_log() in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php:102
Stack trace:
#0 [internal function]: zen_fatal_error_handler()
#1 {main}
  thrown in /home/users/roller/www/usa-158a/includes/extra_configures/enable_error_logging.php on line 102
20 Apr 2023, 6:37 AM
#12
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Re: PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

Thank you!
That now let start the fresh installation of 1.5.8a perfectly with PHP 8.0.27
I will check whether other functions also do work now e.g. create account.

20 Apr 2023, 7:11 AM
#13
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Re: PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

The critical error at "create account" (Frontend) now is solved.

Some minor problems still remain e.g. at "database backup" (s. previous page for error) or at lowstock. I see the German version has an additional function to show all items at one page. Only there appears the following PHP error:

[20-Apr-2023 09:10:39 Europe/Berlin] Request URI: /admin/stats_products_lowstock.php?page=all&sort=products_name&dir=ASC&cat=, IP address: 2a02:8108:94c0:27a0:8ad4:cedd:7f7d:818d, Language id 43
--> PHP Warning: Undefined array key "mfg" in /admin/stats_products_lowstock.php on line 20.

[20-Apr-2023 09:10:39 Europe/Berlin] Request URI: /admin/stats_products_lowstock.php?page=all&sort=products_name&dir=ASC&cat=, IP address: 2a02:8108:94c0:27a0:8ad4:cedd:7f7d:818d, Language id 43
--> PHP Warning: Undefined array key "status" in /admin/stats_products_lowstock.php on line 21.

[20-Apr-2023 09:10:39 Europe/Berlin] Request URI: /admin/stats_products_lowstock.php?page=all&sort=products_name&dir=ASC&cat=, IP address: 2a02:8108:94c0:27a0:8ad4:cedd:7f7d:818d, Language id 43
--> PHP Warning: Undefined array key "csv" in /admin/stats_products_lowstock.php on line 22.

[20-Apr-2023 09:10:39 Europe/Berlin] Request URI: /admin/stats_products_lowstock.php?page=all&sort=products_name&dir=ASC&cat=, IP address: 2a02:8108:94c0:27a0:8ad4:cedd:7f7d:818d, Language id 43
--> PHP Warning: Undefined variable $replace_dir in /admin/stats_products_lowstock.php on line 149.

[20-Apr-2023 09:10:39 Europe/Berlin] Request URI: /admin/stats_products_lowstock.php?page=all&sort=products_name&dir=ASC&cat=, IP address: 2a02:8108:94c0:27a0:8ad4:cedd:7f7d:818d, Language id 43
--> PHP Warning: Undefined variable $dir_model in /admin/stats_products_lowstock.php on line 162.

[20-Apr-2023 09:10:39 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * string in /admin/stats_products_lowstock.php:173
Stack trace:
#0 {main}
thrown in /admin/stats_products_lowstock.php on line 173

[20-Apr-2023 09:10:39 Europe/Berlin] Request URI: /admin/stats_products_lowstock.php?page=all&sort=products_name&dir=ASC&cat=, IP address: 2a02:8108:94c0:27a0:8ad4:cedd:7f7d:818d
--> PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * string in /admin/stats_products_lowstock.php:173
Stack trace:
#0 {main}
thrown in /admin/stats_products_lowstock.php on line 173.
27 Apr 2023, 10:25 AM
#14
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Re: PHP Problems after Upgrading (production sys) but also on Fresh install (test sys)

The error at "show all" for the low stock function has been fixed by webchills and will be available at the next release.