Hi,
I am having a major problem with my php coding on
my site. I'm trying to implement a multi language script. The script can be found and is explained
here.
Problem is that I get a "headers already sent error", caused by the setcookie and session_start(); function. I have tried everything by moving these functions to make sure they come first on the page. There's no whitespace before the functions and I'm left wondering why it doesn't work.
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /opt/www/mashamotoltd2/web/www.mashamoto-imports.com/index.php:1) in /opt/www/mashamotoltd2/web/www.mashamoto-imports.com/index.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /opt/www/mashamotoltd2/web/www.mashamoto-imports.com/index.php:1) in /opt/www/mashamotoltd2/web/www.mashamoto-imports.com/index.php on line 2
Warning: Cannot modify header information - headers already sent by (output started at /opt/www/mashamotoltd2/web/www.mashamoto-imports.com/index.php:1) in /opt/www/mashamotoltd2/web/www.mashamoto-imports.com/index.php on line 3Weird thing is that the script works perfectly on other pages. I copied the exact same code from index.php and created
index2.php Exactly the same scripting used as on index.php!! Why does it work here and not on on the normal index.php?
The script is also installed on
http://www.mashamoto-imports.com/cars-for-sale.php Here it also works fine and the setcookie also works as you can see.
I really hope someone can help me out as I need to get this to work asap.