I am using AURORAGPT Script When i try to login that time i got warning message (Warning: Cannot modify header information - headers already sent by (output started at /home/dollar/public_html/index.php:7) in /home/dollar/public_html/members/login.php on line 138)

here my login.php 138 code line:

                header("Location: setcookies.php?".iif(isset($returnTo),"view=$returnTo","view=account&ac=main")."".iif("$id","&id=$id").iif($ptype,"&ptype=$ptype").iif($step,"&step=$step")."".iif(isset($ac),"&ac=$ac")."&sid=$sessid&sid2=$sessid2&siduid=$userid");

Anybody please help me to solved this problem.

Recommended Answers

All 3 Replies

the problem is not in line 138, the problem is before that, line 138 is where the redirect is attempted, and the error detected.
check also the script that calls the login function
anything that outputs, even a blank space or line return, in any included files or the script itself, will cause this error. check the script for output in the preceeding lines, or post the code and one of the gurus may be able to point it out quickly

while not as clean as refactoring your output, you can add ob_start(); to the top of your script.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.