» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > PHP Programming and Tips

PHP Programming and Tips Discuss about PHP programming and Share Tips. Ask questions about Scripting and Errors.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-18-2006, 02:21 PM
tomothy tomothy is offline
Junior Member
 
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
tomothy is on a distinguished road
Default need help cant login into my site admin panel

Not sure if this is in the right forum?

Anyway Im not sure what happened but when I try to login into one of sites I get this error:


Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/myspace2/public_html/index.php:2) in /home/myspace2/public_html/plugins/admin/admin_entrance.php on line 4

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/myspace2/public_html/index.php:2) in /home/myspace2/public_html/plugins/admin/admin_entrance.php on line 4

Warning: Cannot modify header information - headers already sent by (output started at /home/myspace2/public_html/index.php:2) in /home/myspace2/public_html/plugins/admin/admin_entrance.php on line 17


Any suggestions? -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-18-2006, 02:23 PM
prestor prestor is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
prestor is on a distinguished road
Default

i'm guessing that u haven't made sure the very first thing is the session start...

<?
session_Start();

....rest of code....
?>

And if you are using a header file, make sure it comes before the header file.

<?
session_start();
include("header.php");

....rest of code....
?>

hope this helps!!! -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  #3  
Old 08-18-2006, 02:25 PM
lazer lazer is offline
OSP Starters
 
Join Date: Mar 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
lazer is on a distinguished road
Default

Another thing with this error is avoid calling session_start() after something has been printed. If there is something printed means a header has been sent. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  #4  
Old 08-18-2006, 02:27 PM
yoyo yoyo is offline
OSP Starters
 
Join Date: Apr 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
yoyo is on a distinguished road
Default

Make sure your code appears right at the top of the page - no spaces, make sure it's at line 1 -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  #5  
Old 08-18-2006, 02:29 PM
capricorn capricorn is offline
OSP Starters
 
Join Date: Apr 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
capricorn is on a distinguished road
Default

Or, start off your code (very top of the file) with ob_start();

This starts output buffering and can often reduce these errors. The best recommendation is to follow the previous advice and clean up the code, but I wanted to throw in this little tip. If you use it, it's a best practice to finish up the file with ob_end_flush(); to clear the buffer. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ProvidentHost.com Adds Dutch to Control Panel outsourcingplans Web Hosting News 0 02-28-2007 03:24 AM
Web Site Success: What Works - Strategy or Blind Luck waqar Premium Webmaster Articles 0 10-30-2006 07:36 AM
blogspot, nothing else axis MSN 10 08-25-2006 08:31 PM
A question to site admin. rangan Suggestions & Feedback 3 08-08-2006 12:26 PM
Aplus.Net Offers Google Site Map Tool outsourcingplans Web Hosting News 0 12-08-2005 04:07 PM


All times are GMT. The time now is 07:00 PM.