Zen Cart Logo
Forums / Upgrading to 1.5.x / mysterious log files keep appearing

mysterious log files keep appearing

Views: 2,061

Results 1 to 8 of 8
16 Mar 2022, 10:39
#1
kjell_aa avatar

kjell_aa

New Zenner

Join Date:
Jun 2009
Posts:
33
Plugin Contributions:
0

mysterious log files keep appearing

Why do I get these log files?
[16-Mar-2022 11:19:22 Europe/Oslo] Request URI: /, IP address: 212.115.42.249
#1 session_set_save_handler() called at [/home/3/e/eureka-rc/www/includes/functions/sessions.php:102]
#2 require(/home/3/e/eureka-rc/www/includes/functions/sessions.php) called at [/home/3/e/eureka-rc/www/includes/init_includes/init_sessions.php:28]
#3 require(/home/3/e/eureka-rc/www/includes/init_includes/init_sessions.php) called at [/home/3/e/eureka-rc/www/includes/autoload_func.php:48]
#4 require(/home/3/e/eureka-rc/www/includes/autoload_func.php) called at [/home/3/e/eureka-rc/www/includes/application_top.php:170]
#5 require(/home/3/e/eureka-rc/www/includes/application_top.php) called at [/home/3/e/eureka-rc/www/index.php:26]
[16-Mar-2022 11:19:22 Europe/Oslo] PHP Warning: session_set_save_handler(): Cannot change save handler when headers already sent in /home/3/e/eureka-rc/www/includes/functions/sessions.php on line 102

Kjell

16 Mar 2022, 23:05
#2
lat9 avatar

lat9

Administrator

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

Re: mysterious log files keep appearing

You've got one (or more) added (or not updated) files that load before the session is established and contain constructs like

<?php
// a bunch of stuff
?>

i.e. containing one or more blank lines after the trailing ?>. I'd start looking in /includes/extra_configures and /includes/extra_datafiles for a start and then progress into any added files in /includes/functions or /includes/functions/extra_functions.

13 Mar 2023, 23:37
#3
johns4y avatar

johns4y

New Zenner

Join Date:
Jan 2009
Posts:
93
Plugin Contributions:
0

Re: mysterious log files keep appearing

Hi lat9.
I am experiencing the same problem as Kjell and have followed your instructions. I have found that the majority of the PHP files located in the directories you mentioned don't have a ?> as it's last line of code. Is this normal?
Many thanks, John.

13 Mar 2023, 23:40
#4
swguy avatar

swguy

Administrator

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

Re: mysterious log files keep appearing

majority of the PHP files ... don't have a ?> as it's last line of code.

Yes, this is fine. It actually helps prevent the issue @lat9 is describing.

13 Mar 2023, 23:50
#5
johns4y avatar

johns4y

New Zenner

Join Date:
Jan 2009
Posts:
93
Plugin Contributions:
0

Re: mysterious log files keep appearing

Thank you swguy. Should I remove the ?> from those that do? Will this solve the issue?

14 Mar 2023, 09:57
#6
swguy avatar

swguy

Administrator

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

Re: mysterious log files keep appearing

The trouble comes when files (generally plugins or other modifications) have a trailing

?>

with characters after it. See @lat9's guidance above:

"I'd start looking in /includes/extra_configures and /includes/extra_datafiles for a start and then progress into any added files in /includes/functions or /includes/functions/extra_functions."

14 Mar 2023, 10:50
#7
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: mysterious log files keep appearing

Once upon a time, somewhere, there was a tool floating about that checked for such things...I found it in my archive and have cleaned and posted it here:
https://github.com/torvista/Zen_Cart-Find_Extra_Spaces

it may give you the pointers you need but heed the readme....