Forums / Installing on a Windows Server / Session Start errors, no CSS

Session Start errors, no CSS

Locked
Results 1 to 9 of 9
This thread is locked. New replies are disabled.
14 Jul 2009, 02:00
#1
newbeeman avatar

newbeeman

New Zenner

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

Session Start errors, no CSS

I recently downloaded my complete site so that I could work locally, after many headaches I can now access my front page, with errors.
I have two session start errors, plus a 'cannot modify header information'. The page looks as if the CSS is missing as the page is huge, no colours. So I suspect the link to the CSS has failed.
Finally there is no 'Admin' access.
The info on products etc is all showing, so the data is flowing from the database.
I have looked over the pages suggested in the error and cannot see a problem.
I have searched the 'Troubleshoot Tuts' but the information on these errors is vague.
Where would I start to correct these, or should I try another download? Are these errors linked in some way?
Would appreciate some guidance.
14 Jul 2009, 02:02
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Session Start errors, no CSS

What are the exact errors?
14 Jul 2009, 03:34
#3
newbeeman avatar

newbeeman

New Zenner

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

Re: Session Start errors, no CSS

DrByte:

What are the exact errors?

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\catalog\includes\classes\class.smtp.php:2010) in C:\xampp\htdocs\catalog\includes\functions\sessions.php on line 214

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\catalog\includes\classes\class.smtp.php:2010) in C:\xampp\htdocs\catalog\includes\functions\sessions.php on line 214

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\catalog\includes\classes\class.smtp.php:2010) in C:\xampp\htdocs\catalog\includes\init_includes\init_templates.php on line 149

Well, you did ask!

As I said, I have looked over the files mentioned and as I can't write .php can't 'see' a problem?
Can't understand why these errors show, the site is clean when remote.
14 Jul 2009, 13:19
#5
newbeeman avatar

newbeeman

New Zenner

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

Re: Session Start errors, no CSS

DrByte:

It seems there may be an error in your class.smtp.php file on line 2010.
Related FAQ: https://www.zen-cart.com/tutorials/index.php?article=87


I am not in a position to argue, but what has smtp to do with my problem?
Here are the lines of code around line 2010 in the file mentioned.

2009 if($code != 250 && $code != 251) {
2010
2011 $this->error =
2012
2013 array("error" => "VRFY failed on name '$name'",
2014
2015 "smtp_code" => $code,
2016
2017 "smtp_msg" => substr($rply,4));
2018
2019 if($this->do_debug >= 1) {
2020
2021 echo "SMTP -> ERROR: " . $this->error["error"] .
2022
2023 ": " . $rply . $this->CRLF;

As you can see no empty lines as mentioned in the Tut?
This is even more strange, when I first encountered the error it referred to these lines
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\catalog\admin\includes\classes\logger.php:106) in C:\xampp\htdocs\catalog\includes\functions\sessions.php on line 214
Then after fiddling around, as you can see I have a totally different error listed?
Comments appreciated.
14 Jul 2009, 17:41
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Session Start errors, no CSS

It's odd that your file appears to be double-spaced. It seems maybe your FTP program didn't handle line-endings properly when downloading. That can often cause confusion especially if the conversion ends up adding a blank line after the closing ?> in a php file (which is one reason why you'll see that many Zen Cart files, especially in the upcoming 1.3.9 and 2.0 and newer versions, don't include a closing ?> tag at the end of php files.)

If you have many files that are undesirably double-spaced it might be worth unzipping the original versions of those files for use on your local computer.

I always find it better to make all my customizations locally and then upload them to the server when ready to go live ... rather than working in the opposite direction (granted, I realize you're trying to set up a local install for the first time ... and hopefully you'll use that as a base from which you will upload changes to the live server).
Unzipping a clean set of files is often a good starting point. Then merge your customizations into those files so you have a full working set. Then you have a test site for doing development/testing on before going to the live store.
15 Jul 2009, 01:20
#7
newbeeman avatar

newbeeman

New Zenner

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

Re: Session Start errors, no CSS

DrByte:

Unzipping a clean set of files is often a good starting point. Then merge your customizations into those files so you have a full working set. Then you have a test site for doing development/testing on before going to the live store.


OK, but it's not going to achieve what I need to do. I originally loaded the ZC on my local machine, then my ISP made me work online rather than upload a developed site. This caused me to work very quickly and I failed to use the Overrides. Now I want to correct the errors on my machine, upload, then upgrade. I cannot risk screwing up a valuable busy web site.
Incidently I used Filezilla to download the catalog site!!
So the question now is. How can I get my remote site down to my machine so that it works correctly?
Could I install a new copy, then copy over the necessary files to overwrite with my working files? But if I did, then I might still get double spaced files again!
I really need some help here as I'm getting out of my depth.
15 Jul 2009, 02:05
#8
newbeeman avatar

newbeeman

New Zenner

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

Re: Session Start errors, no CSS

newbeeman:

I really need some help here as I'm getting out of my depth.


:clap::clap::clap::clap::clap::clap:
Hey I'm not such a clutz as I thought, I've fixed it.
Not sure if it will apply to the whole site as it's quite extensive.
I checked each error, copied and pasted a 'new' copy of each file and refreshed each time. There were a number of files, but eventually I got out to the log out page.
Further testing might reveal more errors, will keep you posted.
Many thanks for the help and support.
24 Jul 2009, 14:18
#9
newbeeman avatar

newbeeman

New Zenner

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

Re: Session Start errors, no CSS

Just an update. The above methods worked. I now have a copy of my remote site running successfully on localhost, allowing me to correct the errors I made years ago.
Thanks to all who helped.