edg3
Well-Known Member
Hi there,
I have been playing around in php for a few weeks now on my local web server and decided it would be a great idea to write a php post management system for myself (previously I was using Drupal). It works perfectly fine on my webserver here at home, but once uploaded it work, but I cant set cookies. It gives me the error:
Source (Without any linking to login databases till I can set the cookie)
After reading around I saw that its more commonly called a "whitespace" error, although I have checked a few times and cant find any place where there is an extra space that could cause it. A friend of mine suggested that it could be to do with not running session_start() on one of my pages, so I tried adding it onto my index like he suggested, and it gives this error:
I also read that there was an issue when using session related variables and it overwriting cookies on hetzner which was posted in offtopic, but even with the change of the variable "register_globals" to 0 in a htaccess file there is no change.
Any help would be greatly appreciated.
I have been playing around in php for a few weeks now on my local web server and decided it would be a great idea to write a php post management system for myself (previously I was using Drupal). It works perfectly fine on my webserver here at home, but once uploaded it work, but I cant set cookies. It gives me the error:
Code:
Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/realdq/dologin.php:1) in /usr/www/users/realdq/dologin.php on line 6
Source (Without any linking to login databases till I can set the cookie)
After reading around I saw that its more commonly called a "whitespace" error, although I have checked a few times and cant find any place where there is an extra space that could cause it. A friend of mine suggested that it could be to do with not running session_start() on one of my pages, so I tried adding it onto my index like he suggested, and it gives this error:
Code:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /usr/www/users/realdq/index.php:1) in /usr/www/users/realdq/index.php on line 1
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/www/users/realdq/index.php:1) in /usr/www/users/realdq/index.php on line 1
I also read that there was an issue when using session related variables and it overwriting cookies on hetzner which was posted in offtopic, but even with the change of the variable "register_globals" to 0 in a htaccess file there is no change.
Any help would be greatly appreciated.