Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
error message

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
ghosap



Joined: 18 Sep 2003
Posts: 79

PostPosted: 18.10.2003 23:35    Post subject: error message Add user to your forum ignore list Reply with quote

kad pokusam stavit cookie javi mi ovaj error :
Warning: Cannot add header information - headers already sent by (output started at d:\opensa\apache\htdocs\site_1\index.php:9) in d:\opensa\apache\htdocs\site_1\index.php on line 203
Back to top
View user's profile Send private message
ivan



Joined: 08 Sep 2003
Posts: 320
Location: Zagreb

PostPosted: 19.10.2003 08:18    Post subject: Add user to your forum ignore list Reply with quote

hm, to ti je zato jer kukiji moraju biti poslani zajedno s ostalim headerima-a, znači trebaju biti definirani prije <head> tagova...
ne baš elegantno riješenje je, stavi
Code:
ob_start();

na početku koda i
Code:
ob_end_flush();

na kraju
znači prije i poslije setcookie()

_________________
no ojro
Back to top
View user's profile Send private message Visit poster's website
njava
mi3.crew


Joined: 25 Aug 2003
Posts: 624
Location: Zagreb

PostPosted: 19.10.2003 12:45    Post subject: Add user to your forum ignore list Reply with quote

zašto neelegantno rješenje? output buffering funkcije su vrlo moćne i iskoristive. više informacija na:
http://www.php.net/manual/en/ref.outcontrol.php
Back to top
View user's profile Send private message Visit poster's website
maxy



Joined: 07 Sep 2003
Posts: 894
Location: Zagreb

PostPosted: 19.10.2003 13:22    Post subject: Add user to your forum ignore list Reply with quote

ima jos bolje rjesenje Smile
stavis za target formulara neki drugi file, recimo login.php i u njega potrpas
Code:
setcookie("$ime", "$podaci", time()+3600)
(oke, ovo znas i sam);
ne stavljas nikakav head ili neki html tag unutra neg solo php kod. valjd ti je pomoglo :>
Back to top
View user's profile Send private message
ivan



Joined: 08 Sep 2003
Posts: 320
Location: Zagreb

PostPosted: 19.10.2003 13:24    Post subject: Add user to your forum ignore list Reply with quote

ne znam ni sam, to mi je ostalo od prvih početaka učenja php-a kad nisam razumio
za šta točno služe... ma duga priča, koja samo meni ima smisla Smile
kad sam postao, skužio sam da rješavaju problem u 2 linije Smile

_________________
no ojro
Back to top
View user's profile Send private message Visit poster's website
ghosap



Joined: 18 Sep 2003
Posts: 79

PostPosted: 23.10.2003 11:07    Post subject: Add user to your forum ignore list Reply with quote

nazalost ni jedan od vasih prjedloga nije radio...
dakle radi se o sajtu na adresi :
http://new-order.gamer.hr/
login scripta ...
znaci nemogu redirect na neki drugi formular ...
Back to top
View user's profile Send private message
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 23.10.2003 11:16    Post subject: Add user to your forum ignore list Reply with quote

form nema action... a i ne kuzim sto ne radi... nema error messagea nikakvog, a sto god upisem u login box i okinem enter, pise samo "login failure"...

Sto ce ti redirect na neki drugi formular? Trebas redirekt na neku skriptu koja ce procesirat upisane podatke pretpostavljam, ako je sve ok, setat neki cookie i vratit usera otkud je dosao, jel? Daj kod koji koristis, ovak je malo tesko pricat u prazno...

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
ghosap



Joined: 18 Sep 2003
Posts: 79

PostPosted: 23.10.2003 20:54    Post subject: Add user to your forum ignore list Reply with quote

hvala...slozio sam, a nije cudo da ti javlja login failure kad je pass protected ...
Back to top
View user's profile Send private message
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 24.10.2003 09:03    Post subject: Add user to your forum ignore list Reply with quote

Alpha_AP wrote:
hvala...slozio sam, a nije cudo da ti javlja login failure kad je pass protected ...

no shit sherlock Smile
htjedoh reci kako nema nigdje greske o kojoj pricas...

nego, kad si vec slozio, sto ne podijelis s ostalima kako si slozio i u cemu je bio problem? tako da mozda netko drugi tko ima isti ili slican problem, moze procitati u cemu je bila kvaka...

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group