gene4848 Posted November 29, 2008 Share Posted November 29, 2008 Hi I installed a classified ads software in my godaddy space and when I click ad listing I get this erro message : machine-post/addlisting.php Warning: Cannot modify header information - headers already sent by (output started at /home/content/g/m/d/gmdistributors/html/machine-post/addlisting.php:12) in /home/content/g/m/d/gmdistributors/html/machine-post/addlisting.php on line 118 Itlooks to me like a path problem but not sure where to look ?? if any one can drect me how to fix it that would be great iv been at it for 8hrs now. this is the file im having problems with : <?php require_once("conn.php"); require_once("access.php"); require_once("includes.php"); $cryptinstall="captcha/cryptographp.fct.php"; include_once $cryptinstall; //get the info echo $PATH_INFO; if(isset($_POST[s1]) and chk_crypt($_POST['code']) ) { $LogoImage = $_FILES[logo][name]; if(!empty($LogoImage)) { $MyLogo = $t."_logo_".$LogoImage; copy($_FILES[logo][tmp_name], "yellow_images/".$MyLogo); } else { $MyLogo = ""; } //manage files $MyImages = array(); if(!empty($_FILES[ResumeImages][name][0])) { while(list($key,$value) = each($_FILES[ResumeImages][name])) { if(!empty($value)) { $NewImageName = $t."_resume_".$value; copy($_FILES[ResumeImages][tmp_name][$key], "yellow_images/".$NewImageName); $MyImages[] = $NewImageName; } } if(!empty($MyImages)) { if(empty($_POST[OldImages])) { $ImageStr = implode("|", $MyImages); } else { $ImageStr = ""; } } } else { $ImageStr = ""; } $qu = " select * from yellow_settings "; $msql = mysql_query($qu); $fet = mysql_fetch_array($msql); if ($fet[approve_free] == 'yese') { $status = "active"; $expd = date('Y-m-d' , mktime(0,0,0,date(m) , date(d) + $fet[freelex], date(Y))); } else { $status = "notconf"; $expd = "Pending"; } if ($fet[freelex] == 0) { $expd = 'Never'; } $notpq = "select * from yellow_subcat where subcatid = '$_POST[subCategoryID]'"; $mynotpq = mysql_query($notpq); $fetch = mysql_fetch_array($mynotpq); if($fetch[O1] != '0' || $fetch[O2] != '0' || $fetch[O3] != '0') { $status = "notpaid"; $expd = "Pending"; } function sec(&$arr){ foreach($arr as $n=>$v) $arr[$n] = addslashes($v); } sec($_POST); $q1 = "insert into yellow_posts set CompanyName = '$_POST[CompanyName]', CategoryID = '$_POST[CategoryID]', SubCategoryID = '$_POST[subCategoryID]', resume = '$_POST[resume]', logo = '$MyLogo', ResumeImages = '$ImageStr', PostDate = '$t', AgentID = '$_SESSION[AgentID]', status = '$status', expd = '$expd' "; mysql_query($q1); header("location:managelisting.php"); exit(); } for($z = '1'; $z <= (5 - $i); $z++) { $ImageBlock .= "<input type=file name=\"ResumeImages[]\"><br>\n"; } if (!chk_crypt($_POST['code']) and !empty($_POST[resume]) and !empty($_POST[CompanyName]) ) {$error="Wrong Confirmation Code!"; } //get the templates require_once("templates/HeaderTemplate.php"); require_once("templates/AddListTemplate.php"); require_once("templates/FooterTemplate.php"); ?> (Edited by kenrbnsn to add tags) Quote Link to comment https://forums.phpfreaks.com/topic/134718-need-urgent-help-with-erro-message-on-php-software/ Share on other sites More sharing options...
sasa Posted November 29, 2008 Share Posted November 29, 2008 remove any echo before header function Quote Link to comment https://forums.phpfreaks.com/topic/134718-need-urgent-help-with-erro-message-on-php-software/#findComment-701491 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.