3 March 2010 at 2:49pm
Okay, so I've been scratching my head over this one for the last couple of hours now and getting nowhere.
I've added a method to the Product_Image class to set the image sizes from an array in _config.php which works a treat using default values but as soon as I call the method from _config.php I get the _SESSION error.
It's nothing to do with the code within the function as I've removed it and it still generates the same error.
Here's the code in the hope someone can point out what is bound to be an obvious ommission
3 March 2010 at 4:44pm
Well, if I put the site into "Live" mode then the site displays and the function itself works but I can't log in - the _SESSION error is still present in the background.
I tried moving the code to the Product class making the static pulic and referencing it directly from the image class but that made no difference.
I have now moved the code to a new class (and .php file in mysite/code) and that's working now but, I wanted to get it working in the Procuct_Image class with the hope that it would make it in there officially.
Is this error caused by some formatting problem with the file itself perhaps? Maybe PhpED has screwed up the encoding or something?
4 March 2010 at 4:20pm
This is often caused by whitespace after a closing PHP tag. Do you have a closing PHP tag in Product.php, and does it have whitespace after it? If so, that could cause the issue. I would reccomend removing all closing tags from your site code since they're optional anyway and can cause issues like this which are hard to diagnose.
4 March 2010 at 4:29pm
Thanks for the reply, I'd read that in one of the other threads about this error and have checked where ever I could.
It's now fixed though, for now ;)
I comapred with an environment that worked and it seems there was something about my page.php it didn't like, no idea what but it's behaving properly now so I'm happy.