Forums / Installing on a Linux/Unix Server / Installation Error - Cannot Modify Header Information

Installation Error - Cannot Modify Header Information

Locked

Started by jwbaker on 18 May 2006, 10:24 PM · Views: 3,630

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
18 May 2006, 10:24 PM
#1
jwbaker avatar

jwbaker

New Zenner

Join Date:
May 2006
Posts:
6
Plugin Contributions:
0

Installation Error - Cannot Modify Header Information

Here is the error I am receiving:

Warning: Invalid argument supplied for foreach() in /home/mymyster/public_html/shopping_cart/zc_install/includes/modules/pages/inspect/header_php.php on line 251

Warning: Cannot modify header information - headers already sent by (output started at /home/mymyster/public_html/shopping_cart/zc_install/includes/modules/pages/inspect/header_php.php:251) in /home/mymyster/public_html/shopping_cart/zc_install/includes/modules/pages/inspect/header_php.php on line 449

Any Ideas?

Thanks

18 May 2006, 10:36 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Installation Error - Cannot Modify Header Information

I would take a few minutes and get the Zen Cart v1.3.0.1 that was released and fixes this and a few other errors before going any further ... :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 May 2006, 10:40 PM
#3
jwbaker avatar

jwbaker

New Zenner

Join Date:
May 2006
Posts:
6
Plugin Contributions:
0

Re: Installation Error - Cannot Modify Header Information

Thanks for the reply but that is the version I am using.

18 May 2006, 10:43 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Installation Error - Cannot Modify Header Information

If you were ... you would not have that bug ...

Are you sure you uploaded all of the files?

Perhaps get the full Zen Cart v1.3.0.1 from here ... and reload all of your files ...

That was the first bug fixed ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 May 2006, 11:42 PM
#5
detroitonline avatar

detroitonline

New Zenner

Join Date:
May 2006
Posts:
8
Plugin Contributions:
0

Re: Installation Error - Cannot Modify Header Information

You have two problems here. One is the result of the other.

jwbaker:

Here is the error I am receiving:

Warning: Invalid argument supplied for foreach() in /home/mymyster/public_html/shopping_cart/zc_install/includes/modules/pages/inspect/header_php.php on line 251

This is the real problem. The foreach() statement has a bad arguement in it. Now is there any reason you're not using the zencart directory layout? Every version of Zencart that I've ever installed sets it up in /zencart/zc_install. Now I haven't really looked through the code but it could be it's looking for the /zencart path and it can't find it. You will need to check line 251

This is what you see:

if ($open_basedir=@ini_get('open_basedir')) {
if ($open_basedir) $this_class = 'WARN';
$basedir_check_array = explode(':',$open_basedir);
foreach($basedir_check_array as $basedir_check) { <--- THIS IS LINE 251
if (!strstr($dir_fs_www_root, $basedir_check)) $flag_basedir=true;
}
if ($flag_basedir) $this_class = 'FAIL';
}

Your $basedir_check_array is invalid. I suggest you just unzip and upload the /zencart directory and all it's files and go from there.

jwbaker:

Warning: Cannot modify header information - headers already sent by (output started at /home/mymyster/public_html/shopping_cart/zc_install/includes/modules/pages/inspect/header_php.php:251) in /home/mymyster/public_html/shopping_cart/zc_install/includes/modules/pages/inspect/header_php.php on line 449

PHP will not do anything with Header information if there is output before the Header commands. Since PHP is outputing the error of your foreach() statement, any Header information will not be modified. It even tells you where the output was started from (line 251 in the header_php.php file).

Correct the problem with the foreach() statement and the other problem will go away.

19 May 2006, 5:59 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: Installation Error - Cannot Modify Header Information

Please post a link to or the results of zc_install/techsupp.php here

.
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.