Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Headers sent error msg on one server but not the other...
Hey Folks,
I have a script that times out the session if there is no activity in a
certain amount of time.  If there is no activity the HEADER()
redirects to the logout page and kills the session.  Everything works
fine on our test server, but when I test the script on the production
server, I get  an error "HEADERS ALREADY SENT..." after no activity.  I
know all this stuff needs to be on top, before any  XHTML.

The test server has reg globals = OFF and the production server has
them set to ON.  I can't change the any PHP.INI settings on the
production server. Both servers are running PHP 4.3.10.  Other than
that PHP installation is close to identical.   Any ideas / thoughts on
what's causing the production server to send this error out?  Something
to steer me in the right direction... I'm attaching a code snippet to
look at:

if (mysql_num_rows($result) > 0) {
$_SESSION["valid_user"] = $email;
}
elseif ($t_timestamp < $c_timestamp) {
HEADER("Location: logout.php");
exit;
}
Best,
CH
______________________________________
Craig Hoffman
ICQ / iChat: m0untaind0g
______________________________________

Report this thread to moderator Post Follow-up to this message
Old Post
Craig Hoffman
04-29-05 08:57 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP DB archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:12 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.