Reseller Domain Murah dan termurah di Indonesia? ya di ResellerCamp.
         
 

Forum PHP Indonesia

 
Advanced Search
   
 
Home Register FAQ Memberlist Usergroups  
 
 

Forum PHP Indonesia Forum Index Session & Cookie Tolong Banget : Cannot modify header information
Display posts from previous:   
      All times are GMT + 7 Hours  

Tolong Banget : Cannot modify header information

Post new topic  Reply to topic Goto page 1, 2  Next

Mon Aug 11, 2008 15:08
Author Message
adith.ind
PHP Programmer
PHP Programmer


Joined: 13 Mar 2008
Posts: 60

Post subject: Tolong Banget : Cannot modify header information Reply with quote

Tolong banget. sya udah baca bnyak dan mencoba mneghilangkan error ini, tapi tetap ajah.. Saya bingung gimana. Tolong bnget Yah...

Warning: Cannot modify header information - headers already sent by (output started at C:\apache2triad\htdocs\Ref 11-08-08\Aplikasi WMS\WMS\main\Master\Add\m_own_add.php:14) in C:\apache2triad\htdocs\Ref 11-08-08\Aplikasi WMS\WMS\main\Master\Add\m_own_add.php on line 67

Nih Codingannya. saya bingung whitespaces nya yg mana yah? kalo emang gak ada, penyebab Header nya gak bisa jlan kenapa??
Tolong Yah para pembagi ilmu yg baik..

Code:
<?php <?php
session_start
();
if (!isset(
$_SESSION['username'])){ header("location:../../../../index.php");    }
require 
"../../../function/WMSclass.php";
$dbo = new WMSClass();
$dbo->dbServer $dbServer;
$dbo->dbUser $dbUser;
$dbo->dbPass $dbPass;
$dbo->dbName $dbName;
$dbo->dbConnect();
$a=$_SESSION['username'];
?><html>
<head>
<style type="text/css">.style7 {
    font-size: 11px;
    font-weight: bold;
    font-family: Tahoma;
    color: #587891;
}
.style24 {font-size: 10px; font-family: Tahoma; color: #587891; }
.style25 {
    color: #FF0000;
    font-size: 10px;
    font-family: Tahoma;
    font-weight: bold;
}
</style>
</head>
<body topmargin="0">
<form name="forms" method="get" action="<?Php $php_self;?>">
<hr color="#D4E5F5" width="500">
<table width="400" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td width="145" class="style7" scope="col">C O D E</td>
    <td width="35" align="center" class="style7">:</td>
    <td width="155"><INPUT TYPE="text" NAME="owner" VALUE="<?= $owner;?>" class="style7" size="3" maxlength="5"></td>
  </tr>
  <tr>
    <td class="style7" scope="col">D E S C R I P T I O N</td>
    <td class="style7" align="center">:</td>
    <td><INPUT TYPE="text" NAME="desc" VALUE="<?= $desc;?>" class="style7" size="25" maxlength="100"></td>
  </tr>
  <? if($Save)
  {
      if(
$owner==''){$error=1;}
    if(
$desc==''){$error=1;}
    
$sel mysql_query("SELECT * FROM owner WHERE owner_id='$owner'");
    
$obj mysql_fetch_object($sel);
    if(
$obj){$error2=1;}
  }
  
?>
  </table>
  <hr color="#D4E5F5" width="500">
  <table width="400" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td align="center"><input type="submit" name="Save" value="Process" class="style24"> <input type="submit" name="Cancel" value="Cancel" class="style24"></td>
  </tr>
  <tr>
      <td>
    <? if($error){ ?><span class="style25">* The Part You Insert is Not Complete</span>  <? 
        elseif(
$error2){ ?><span class="style25">* Code has been entire before</span>  <? ?> </td>
  </tr>
</table>
</form>
</body>
</html>
<?Php if(($Save)&&(!$error)&&(!$error2)){ header("location:../m_owner.php"); } ?> ?>
 
View user's profile Send private message Send e-mail
      Back To Top  

Mon Aug 11, 2008 15:19
Author Message
hlie
I am PHP
I am PHP


Joined: 10 Apr 2008
Posts: 3050
Location: Singapore

Post subject: Reply with quote

Peringatan 1 Buat lo ya adith.ind noted
posting udah 2x nga di tread yang tepat.. tuh cari solusinya di topik session dah banyak di bahas
_________________
Past is Experience,Present is Experiments,Future is Expectations,Use your Experience in your Experiments to achieve your Expectations...!!!
www.slackware.com
 
View user's profile Send private message Send e-mail Yahoo Messenger
      Back To Top  

Mon Aug 11, 2008 16:18
Author Message
fidrian
Jagoan PHP
Jagoan PHP


Joined: 25 Feb 2008
Posts: 690
Location: Jakarta

Post subject: Reply with quote

coba <html> seperti <body> masukin ke variable php aja, atau jangan di cetak langsung seperti itu......
_________________
"Everything should be made as simple as possible, but not one bit simpler." Albert Einstein (1879-1955)

http://www.fidrian.com
--
http://www.apakabardunia.com
 
View user's profile Send private message Visit poster's website Yahoo Messenger
      Back To Top  

Tue Aug 12, 2008 16:54
Author Message
clipper
PHPuser
PHPuser


Joined: 07 Aug 2008
Posts: 46

Post subject: Reply with quote

Peringatan seperti itu biasanya adalah ada output sebelum fungsi header
 
View user's profile Send private message
      Back To Top  

Fri Sep 19, 2008 11:00
Author Message
aDONZ
PHPuser
PHPuser


Joined: 10 Sep 2008
Posts: 27
Location: Pekanbaru

Post subject: Reply with quote

coba aja buka file" php.ini"

cari

"output buffering"

kamu atur menjadi "ON"


Salute!
_________________
Programming is an ART...

I hope my idea usefull for you


visit my blog : http://ramadonae2rd.multiply.com
 
View user's profile Send private message Send e-mail Yahoo Messenger
      Back To Top  

Fri Sep 19, 2008 11:17
Author Message
xibnoe
Site Admin
Site Admin


Joined: 05 Aug 2007
Posts: 921

Post subject: Reply with quote

@aDONZ: Tolong avatarnya

<?Php if(($Save)&&(!$error)&&(!$error2)){ header("location:../m_owner.php"); } ?> ?>

dipindah diatas <html>
_________________
Kumpulan Tutorial Web Berkualitas
 
View user's profile Send private message Visit poster's website Yahoo Messenger
      Back To Top  

Fri Sep 19, 2008 11:23
Author Message
aDONZ
PHPuser
PHPuser


Joined: 10 Sep 2008
Posts: 27
Location: Pekanbaru

Post subject: Reply with quote

maksud nya diapainn tuh mas../om...
_________________
Programming is an ART...

I hope my idea usefull for you


visit my blog : http://ramadonae2rd.multiply.com
 
View user's profile Send private message Send e-mail Yahoo Messenger
      Back To Top  

Fri Sep 19, 2008 11:54
Author Message
.
Super Master PHP
Super Master PHP


Joined: 05 Apr 2008
Posts: 2225

Post subject: Reply with quote

avatarnya kecilin doooooonnnggggg...
masa satu layar isinya avatar lo doang?
_________________
#ccdbea
Juliet: "What's in a name? That which we call a rose by any other name would smell as sweet."
Hamlet: "To be, or not to be: that is the question."
- William Shakespeare -
 
View user's profile Send private message
      Back To Top  

Fri Sep 19, 2008 16:00
Author Message
aigis
PHP Master
PHP Master


Joined: 31 May 2008
Posts: 264
Location: Bandung

Post subject: Reply with quote

aDONZ wrote:
coba aja buka file" php.ini"

cari

"output buffering"

kamu atur menjadi "ON"


Salute!

kk saya nanya dong sudah lama neh tidak nanya nanya Hammer
kk kalo output buffering di localhost bisa di on kan yah kan
yang saya mau tanyakan bagaimana dengan settingan di server apa settinganya on atau off trims
 
View user's profile Send private message
      Back To Top  

Fri Sep 19, 2008 16:25
Author Message
.
Super Master PHP
Super Master PHP


Joined: 05 Apr 2008
Posts: 2225

Post subject: Reply with quote

bisa di lihat pake phpinfo()

sudah dibilang itu bukan solusi yg terbaik,
gak semua server seting sama,
kalo mesti pindah server, dan kebetulan dapet yg output buffer off, apa ya mesti edit2 script lagi?

koding yg standar, jadi mau seting output buffer idup atau mati, script tetep jalan smooth

kalo output buffer di set via fungsi, bisa, tapi bikin tampilan spt nge-lag sedikit
_________________
#ccdbea
Juliet: "What's in a name? That which we call a rose by any other name would smell as sweet."
Hamlet: "To be, or not to be: that is the question."
- William Shakespeare -
 
View user's profile Send private message
      Back To Top  

Tue Jan 06, 2009 10:50
Author Message
ymardianto
PHP Programmer
PHP Programmer


Joined: 05 Jan 2009
Posts: 98
Location: Jakarta

Post subject: Reply with quote

iya biasanya masalah output buffering.
kasi aja fungsi ob_start(); di awal page.
and ob_end_flush();

<?
ob_start();

//Proses....


ob_end_flush();

?>


semoga membantu
 
View user's profile Send private message
      Back To Top  

Thu Jan 29, 2009 18:22
Author Message
wisnuwidi
PHPnewbie
PHPnewbie


Joined: 29 Jan 2009
Posts: 6
Location: Jakarta Selatan

Post subject: Reply with quote

gimana kalo make cara include ajah mungkin bisa. Jadi pastikan semua code phpnya ada sebelum tag html and code function phpnya gak langsung dibuat dalam satu file gitu. Buat fuctionnya di file lain and panggil dengan
Code:
<?php include("blable.php"); ?>


Boleh dicoba kok.
Gratis... wkwkwk
Gud Luk Horse Patrol
_________________
wisnuwidi
 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
      Back To Top  

Thu Jan 29, 2009 18:26
Author Message
wisnuwidi
PHPnewbie
PHPnewbie


Joined: 29 Jan 2009
Posts: 6
Location: Jakarta Selatan

Post subject: Reply with quote

Confuse
Gantian nanya tentang apakah itu ob_start() and ob_end_flush()...?
Trus anak baru juga maw tanya tentang output buffering...
Maaf kalo katro nanyanya...
hehehe Horse Patrol
_________________
wisnuwidi
 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
      Back To Top  

Sun Aug 30, 2009 12:53
Author Message
nunugenius
Anak Baru
Anak Baru


Joined: 30 Aug 2009
Posts: 1

Post subject: Reply with quote

kenapa emang min ?
 
View user's profile Send private message
      Back To Top  

Fri Jan 07, 2011 12:55
Author Message
MvZ
Anak Baru
Anak Baru


Joined: 07 Jan 2011
Posts: 4
Location: Jakarta

Post subject: Reply with quote

Waduh saya baru pertama kali liat ada tag php di dalam tag php seperti itu... Confuse

Biasanya sih yang saya tahu error header seperti itu karena ada output seperti "echo" sebelum fungsi header dijalankan seperti kata mas clipper. Big Smile
 
View user's profile Send private message Yahoo Messenger
      Back To Top  
Post new topic  Reply to topic Goto page 1, 2  Next

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


      Back To Top  

Page 1 of 2
Goto page 1, 2  Next
Jump to:  
Powered by phpBB © 2001, 2002 phpBB Group
Toko Kaos Couple | Avalanche style by What Is Real © 2004 | Toko Baju Butik Online | Cara Pedia | Busana Baju Muslim