happyboating Posted May 7, 2010 Share Posted May 7, 2010 Hey.. I keep getting this error: Warning: Header may not contain more than a single header, new line detected. in /hermes/bosweb/web011/b117/ipw.awdevore/public_html/vertical/guide.php on line 18 Here is first part of page code: <? $referrer = $_SERVER['HTTP_REFERER']; $referrer = str_replace("http://","", $referrer); $referrer = str_replace("https://","", $referrer); $referrer = urlencode($referrer); if(!$referrer) $referrer="Unknown"; $test = $_GET['test']; if(!$_GET['apflag'] & $test!=1) header("Location: http://downloadablemusicfree.net/AP/go.php?uid=1& cid=2& apflag=1& referrer=$referrer& ".$_SERVER['QUERY_STRING']); $trackingid = $_REQUEST["apid"]; if(!$v) $v = $_COOKIE["v"]; Link to comment https://forums.phpfreaks.com/topic/200975-warning-header-may-not-contain-more-than-a-single-header-new-line-detected/ Share on other sites More sharing options...
trq Posted May 7, 2010 Share Posted May 7, 2010 Look at where you call the header function. Your arguments span multiple lines, the string passed to header cannot contain newlines. Link to comment https://forums.phpfreaks.com/topic/200975-warning-header-may-not-contain-more-than-a-single-header-new-line-detected/#findComment-1054454 Share on other sites More sharing options...
happyboating Posted May 7, 2010 Author Share Posted May 7, 2010 To be honest, I really don't know php. I was just looking for some help on this one page. Anyway you could just tell me what to fix? Link to comment https://forums.phpfreaks.com/topic/200975-warning-header-may-not-contain-more-than-a-single-header-new-line-detected/#findComment-1054761 Share on other sites More sharing options...
tartou2 Posted May 7, 2010 Share Posted May 7, 2010 Try this <? $referrer = $_SERVER['HTTP_REFERER']; $referrer = str_replace("http://","", $referrer); $referrer = str_replace("https://","", $referrer); $referrer = urlencode($referrer); if(!$referrer) $referrer="Unknown"; $test = $_GET['test']; if((!$_GET['apflag'] & ($test!=1) ) { header("Location: http://downloadablemusicfree.net/AP/go.php?uid=1&cid=2&apflag=1&referrer=$referrer&".$_SERVER['QUERY_STRING']); } $trackingid = $_REQUEST["apid"]; if(!$v) $v = $_COOKIE["v"]; Link to comment https://forums.phpfreaks.com/topic/200975-warning-header-may-not-contain-more-than-a-single-header-new-line-detected/#findComment-1054765 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.