header (redirection) problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
adsegzy
Forum Contributor
Posts: 184
Joined: Tue Jul 28, 2009 9:26 am

header (redirection) problem

Post by adsegzy »

Hello There,

Am having problem with the header in my files. I have a login file which will direct members to their page using header() if their login info is correct. for my header() to function, i uploded

.htaccess

Code: Select all

<? PHP_FLAG output_buffering on ?>
but when it filed i uploded
php.ini

Code: Select all

<? output_buffering on ?>
but still my login file is still giving me
Warning: Cannot modify header information - headers already sent by (output started at /home/peoplefi/public_html/adminarea/login.php:9) in /home/peoplefi/public_html/adminarea/login.php on line 42
please what do i do?

regards
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: header (redirection) problem

Post by AbraCadaver »

You need to post your code. Starting output buffering may solve the problem (in some cases), but you shouldn't be outputting anything before the header call in the first place.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
adsegzy
Forum Contributor
Posts: 184
Joined: Tue Jul 28, 2009 9:26 am

Re: header (redirection) problem

Post by adsegzy »

do you mean i should just

Code: Select all

buffering on
?????????//
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: header (redirection) problem

Post by requinix »

I could swear I answered this output buffering thing already.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: header (redirection) problem

Post by daedalus__ »

my god its been cloned! shoot it!
Post Reply