AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters > Web Development
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Web Development Java/PHP/Perl/ASP and more

Troubles when posting message? Click here! :: Ïðîáëåìû ñ îòïðàâëåíèåì ñîîáùåíèÿ? Íàæìèòå ñþäà!

Reply
 
LinkBack Thread Tools Display Modes
Old Jun 12, 2003, 12:42   #1
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: Sep 2002
Location: Yerevan
Posts: 892
Rep Power: 7
Reputation: 14
Send a message via ICQ to Aram Ghazanchyan Send a message via MSN to Aram Ghazanchyan
PHP: Header and Cookies problem

I have such problem:
If I use header("Location... for redirection, the system doesn't write Cookies, but if I use standart HTML redirection through META tags, all goes normal.
Aram Ghazanchyan is offline   Reply With Quote Quote selected
Old Jun 13, 2003, 05:11   #2
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: Sep 2002
Location: Yerevan
Posts: 892
Rep Power: 7
Reputation: 14
Send a message via ICQ to Aram Ghazanchyan Send a message via MSN to Aram Ghazanchyan
Warning: Cannot modify header information - headers already sent by
Aram Ghazanchyan is offline   Reply With Quote Quote selected
Old Jun 13, 2003, 05:36   #3
Ìàãèñòð
 
Join Date: Feb 2002
Location: Am
Posts: 952
Rep Power: 7
Reputation: 36
Send a message via Skype™ to Arik
Quote:
Originally posted by Aram Ghazanchyan
Warning: Cannot modify header information - headers already sent by
esli ya pravil'no ponyal to etogo ti uje 4toto na ekran vivodi...

toest' do togo kak ti vizivaesh funkciyu header() nikakix vivodov ne dolno bit' do nego...

naprimer:

if(4toto){
echo( "vse ok");
header("poshel tuda to");
}
else{
echo("vse error");
header("poshel tuda to");
}

// Eto nepravil'nij kode..
__________________
talent agency casting.am
Center of Internet Projects Support http://www.online.am
Armenian newspapers digest http://www.armpress.com
_ _ _ _ _ _ _
Bud'te proshe i narod k vam potyanetca
Arik is offline   Reply With Quote Quote selected
Old Jun 13, 2003, 05:38   #4
»
 
z0mbie's Avatar
 
Join Date: Jan 2002
Posts: 776
Rep Power: 7
Reputation: 10
Send a message via ICQ to z0mbie
äî âûçîâà header-à íå äîëæíî áûòü íèêàêîãî outputa(echo è ò.ï.)
z0mbie is offline   Reply With Quote Quote selected
Old Jun 13, 2003, 05:39   #5
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: Sep 2002
Location: Yerevan
Posts: 892
Rep Power: 7
Reputation: 14
Send a message via ICQ to Aram Ghazanchyan Send a message via MSN to Aram Ghazanchyan
setcookie(chto-to)
header(redirection)


V Cookie nichego ne pishetsya
Aram Ghazanchyan is offline   Reply With Quote Quote selected
Old Jun 13, 2003, 05:58   #6
»
 
z0mbie's Avatar
 
Join Date: Jan 2002
Posts: 776
Rep Power: 7
Reputation: 10
Send a message via ICQ to z0mbie
setcookie ýòî òîæå header, âñå-òàêè ïðîâåðü åù¸ ðàç åñòü ëè äî ýòîãî êàêîé-ëèáî output
z0mbie is offline   Reply With Quote Quote selected
Old Jun 13, 2003, 06:00   #7
»
 
z0mbie's Avatar
 
Join Date: Jan 2002
Posts: 776
Rep Power: 7
Reputation: 10
Send a message via ICQ to z0mbie
êñòàòè âî âðåìÿ "Warning: Cannot modify header information - headers already sent by" äîëæíî ïîêàçûâàòü â êîòîðîé ñòðîêå output
z0mbie is offline   Reply With Quote Quote selected
Old Jun 13, 2003, 06:11   #8
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: Sep 2002
Location: Yerevan
Posts: 892
Rep Power: 7
Reputation: 14
Send a message via ICQ to Aram Ghazanchyan Send a message via MSN to Aram Ghazanchyan
Sorry et Warning@ urish documenti mej er arajacel, vor@ vor dzer asacov chisht error er talis, hima mnac en harc@ vor Cookie-i mej chi grum, ete heto header em dnum.
Kstati, mi hat urish tegh em pordzrkel, UNIX-Apache er vren (im mot W2k/IIS-a), et tegh normal ashxatuma headernerov.
Im mot voch mi error chi talis, uxaki Cookie-i mej chi grum, indz tvuma et php.ini -i nastroykeqica
Aram Ghazanchyan is offline   Reply With Quote Quote selected
Old Jun 13, 2003, 06:42   #9
»
 
z0mbie's Avatar
 
Join Date: Jan 2002
Posts: 776
Rep Power: 7
Reputation: 10
Send a message via ICQ to z0mbie
ìîæåò ýòî ?

Code:
; Output buffering allows you to send header lines (including cookies) even
; after you send body content, at the price of slowing PHP's output layer a
; bit.  You can enable output buffering during runtime by calling the output
; buffering functions.  You can also enable output buffering for all files by
; setting this directive to On.  If you wish to limit the size of the buffer
; to a certain size - you can use a maximum number of bytes instead of 'On', as
; a value for this directive (e.g., output_buffering=4096).
output_buffering = Off
z0mbie is offline   Reply With Quote Quote selected
Old Jun 13, 2003, 06:48   #10
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: Sep 2002
Location: Yerevan
Posts: 892
Rep Power: 7
Reputation: 14
Send a message via ICQ to Aram Ghazanchyan Send a message via MSN to Aram Ghazanchyan
Ha et porcel em, bayc de no effect, krome togo vor phpMyAdmin-@ sxal tvec inch vor
Aram Ghazanchyan is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:24.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link