| |
Forum PHP IndonesiaDapatkan pertolongan pertama pada kebingungan PHP dan sekitarnya |
|
|
|
|
|
| |
|
|
All times are GMT + 7 Hours
|
|
Tolong Banget : Cannot modify header information
 |
Mon Aug 11, 2008 15:08 |
 |
Author |
Message |
adith.ind PHP Programmer

Joined: 13 Mar 2008 Posts: 60
|
| Post subject: Tolong Banget : Cannot modify header information |
|
|
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"); } ?> ?> |
|
|
| |
|
|
 |
Mon Aug 11, 2008 15:19 |
 |
Author |
Message |
hlie I am PHP


Joined: 10 Apr 2008 Posts: 3050 Location: Singapore
|
| Post subject: |
|
|
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 |
|
| |
|
|
 |
Mon Aug 11, 2008 16:18 |
 |
Author |
Message |
fidrian Jagoan PHP


Joined: 25 Feb 2008 Posts: 690 Location: Jakarta
|
| Post subject: |
|
|
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 |
|
| |
|
|
 |
Tue Aug 12, 2008 16:54 |
 |
Author |
Message |
clipper PHPuser

Joined: 07 Aug 2008 Posts: 46
|
| Post subject: |
|
|
| Peringatan seperti itu biasanya adalah ada output sebelum fungsi header |
|
| |
|
|
 |
Fri Sep 19, 2008 11:00 |
 |
Author |
Message |
aDONZ PHPuser


Joined: 10 Sep 2008 Posts: 27 Location: Pekanbaru
|
| Post subject: |
|
|
coba aja buka file" php.ini"
cari
"output buffering"
kamu atur menjadi "ON"
 _________________ Programming is an ART...
I hope my idea usefull for you
visit my blog : http://ramadonae2rd.multiply.com |
|
| |
|
|
 |
Fri Sep 19, 2008 11:17 |
 |
Author |
Message |
xibnoe Site Admin


Joined: 05 Aug 2007 Posts: 921
|
| Post subject: |
|
|
@aDONZ: Tolong avatarnya
<?Php if(($Save)&&(!$error)&&(!$error2)){ header("location:../m_owner.php"); } ?> ?>
dipindah diatas <html> _________________ Kumpulan Tutorial Web Berkualitas |
|
| |
|
|
 |
Fri Sep 19, 2008 11:23 |
 |
Author |
Message |
aDONZ PHPuser


Joined: 10 Sep 2008 Posts: 27 Location: Pekanbaru
|
| Post subject: |
|
|
maksud nya diapainn tuh mas../om... _________________ Programming is an ART...
I hope my idea usefull for you
visit my blog : http://ramadonae2rd.multiply.com |
|
| |
|
|
 |
Fri Sep 19, 2008 11:54 |
 |
Author |
Message |
. Super Master PHP


Joined: 05 Apr 2008 Posts: 2225
|
| Post subject: |
|
|
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 - |
|
| |
|
|
 |
Fri Sep 19, 2008 16:00 |
 |
Author |
Message |
aigis PHP Master

Joined: 31 May 2008 Posts: 264 Location: Bandung
|
| Post subject: |
|
|
| aDONZ wrote: | coba aja buka file" php.ini"
cari
"output buffering"
kamu atur menjadi "ON"
 |
kk saya nanya dong sudah lama neh tidak nanya nanya
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 |
|
| |
|
|
 |
Fri Sep 19, 2008 16:25 |
 |
Author |
Message |
. Super Master PHP


Joined: 05 Apr 2008 Posts: 2225
|
| Post subject: |
|
|
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 - |
|
| |
|
|
 |
Tue Jan 06, 2009 10:50 |
 |
Author |
Message |
ymardianto PHP Programmer

Joined: 05 Jan 2009 Posts: 98 Location: Jakarta
|
| Post subject: |
|
|
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 |
|
| |
|
|
 |
Thu Jan 29, 2009 18:22 |
 |
Author |
Message |
wisnuwidi PHPnewbie


Joined: 29 Jan 2009 Posts: 6 Location: Jakarta Selatan
|
| Post subject: |
|
|
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  _________________ wisnuwidi |
|
| |
|
|
 |
Thu Jan 29, 2009 18:26 |
 |
Author |
Message |
wisnuwidi PHPnewbie


Joined: 29 Jan 2009 Posts: 6 Location: Jakarta Selatan
|
| Post subject: |
|
|
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  _________________ wisnuwidi |
|
| |
|
|
 |
Sun Aug 30, 2009 12:53 |
 |
Author |
Message |
nunugenius Anak Baru

Joined: 30 Aug 2009 Posts: 1
|
| Post subject: |
|
|
| kenapa emang min ? |
|
| |
|
|
 |
Fri Jan 07, 2011 12:55 |
 |
Author |
Message |
MvZ Anak Baru

Joined: 07 Jan 2011 Posts: 4 Location: Jakarta
|
| Post subject: |
|
|
Waduh saya baru pertama kali liat ada tag php di dalam tag php seperti itu...
Biasanya sih yang saya tahu error header seperti itu karena ada output seperti "echo" sebelum fungsi header dijalankan seperti kata mas clipper.  |
|
| |
|
|
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
|
|
Page 1 of 2 Goto page 1, 2 Next |
|
|
|
|
|
|
|
Powered by phpBB © 2001, 2002 phpBB Group
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|