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
sessions

 
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
_butch



Joined: 10 Sep 2003
Posts: 870
Location: Maichno, Krlovc

PostPosted: 11.10.2003 11:45    Post subject: sessions Add user to your forum ignore list Reply with quote

imam mali problem kada radim sa sessionima - izbacuje mi ovo
Code:

Warning: session_start(): open(/tmp\sess_3cc08b59c8cbd4afe9073b02a487bdce, O_RDWR) failed: No such file or directory (2) in c:\apache\htdocs\6\t\login.php on line 4

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\apache\htdocs\6\t\login.php:2) in c:\apache\htdocs\6\t\login.php on line 4

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\apache\htdocs\6\t\login.php:2) in c:\apache\htdocs\6\t\login.php on line 4

Warning: Unknown(): open(/tmp\sess_3cc08b59c8cbd4afe9073b02a487bdce, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0


sredio sam u php.ini -->
; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored.
session.save_path = c:\apache\htdocs\php\tmp\
__
jjesam dobro napravio ili sto bi trebalo staviti da to proradi..

source fajla.
Code:

<?php
if ($Submit) {
session_start();
mysql_connect("localhost", "antun", "a") or die ("nesto ne stima");
mysql_select_db("antun");
$query = "select password from user where name='$name'";
$result = mysql_query($query);
while ($r = mysql_fetch_array($result)) {
$password = $r[password];
}
if ( $pass == $password) {
$_SESSION['name'] = $name ;
echo "welcome $name<br>
<a href='2.php'>kontinju</a>";

}
} else {
echo "
<form name='form1' method='post' action='login.php'>
  name<br>
  <input name='name' type='text' id='name'>
  <br>
  pass<br>
  <input name='pass' type='text' id='pass'>
  <br>
  <input type='submit' name='Submit' value='Submit'>
</form>
";
}
?>

_________________
FRENCH GUARD: No chance, English bed-wetting types.
I burst my pimples at you and call your door-opening request a silly thing, you tiny-brained wipers of other people's bottoms!
Flikrac
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
maxy



Joined: 07 Sep 2003
Posts: 894
Location: Zagreb

PostPosted: 11.10.2003 13:03    Post subject: Add user to your forum ignore list Reply with quote

kolko se ja sjecam, kukije, sesione i headere moras slat prije <HEAD> taga...
ti ocito imas form unutar nekog htmla vec pa ti je to mozda problem (to je za error za cannot send session...blabla).
sto se tice session save patha, to ne znam (sram me bilo), al falabogu da ima pametnijih ovdje pa ce ti pomoc dalje Smile
Back to top
View user's profile Send private message
zytzagoo
mi3.crew


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

PostPosted: 11.10.2003 17:27    Post subject: Add user to your forum ignore list Reply with quote

jel postoji taj direktorij koji si naveo u session_save_path? Probaj ga postaviti na c:\windows\temp recimo...

Ove kasnije greske su zbog toga jer je onaj prvi warning izletio van, pa su otisli i headeri... I maxyev remark za slanje prije head taga nije bas skroz tocan, naime mora ici prije _icega_ (whitespace, blanks, html header, blabla)...
A i to se inace moze quickhacknut sa output buffering funkcijama... Kog zanima vise, bit ce tutor, a moze i na php manual skocit procitat output buffering functions...

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



Joined: 10 Sep 2003
Posts: 870
Location: Maichno, Krlovc

PostPosted: 11.10.2003 18:12    Post subject: Add user to your forum ignore list Reply with quote

napravio sam folder..
editiro sam php.ini i php.ini-optimised i stavio na c:\windows\temp\ posto taj foler postoji, opet mi ne sljaka..
+++++++++++++++++++++++++++
Warning: Unknown(): open(/tmp\sess_3cc08b59c8cbd4afe9073b02a487bdce, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
++++++++++++++++++++++++++++

ovo mi cudno - > in Unknow on line 0. to mi nije jasno.
znaci da zapravo nezna odkuda izvadit session.save_path da to proradi..
go figure..

_________________
FRENCH GUARD: No chance, English bed-wetting types.
I burst my pimples at you and call your door-opening request a silly thing, you tiny-brained wipers of other people's bottoms!
Flikrac
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
maxy



Joined: 07 Sep 2003
Posts: 894
Location: Zagreb

PostPosted: 11.10.2003 18:35    Post subject: Add user to your forum ignore list Reply with quote

session.save_handler = files
session.save_path = C:/phpdev\php\temp;

sto se tice outputa, mislio sam da covjek ipak nema whitespace ili something prije php koda, neg je vjerovatno pejsto kod unutar html-a vec.
uglavnom, probaj s ovim pa javi, mozda pomogne Smile
Back to top
View user's profile Send private message
_butch



Joined: 10 Sep 2003
Posts: 870
Location: Maichno, Krlovc

PostPosted: 11.10.2003 18:42    Post subject: Add user to your forum ignore list Reply with quote

thnx maxy.. ipak je postojao faljic kojeg nisam vidio, pa editiro, pa sljaka..
editori sam one u folderu od php-am, onaj u pod windows folderom i onda idem searchat i nadjem u folderu gdje mi je server smjesten.. u rootu.. isss. za ubti se. .
inace, hvala svima napomoci..
i jos jedno pitanje, malo vise ot -
sto treba u linuxu upisati u cmmand line da mogu imat svoj web folder pod /home/user?
probao sam mkdir ~nesto, napravi mi ga , odem u mozillu i upisem loclhost/~nesto/ i kaze mi da nemoze naci folder..
hvala !

_________________
FRENCH GUARD: No chance, English bed-wetting types.
I burst my pimples at you and call your door-opening request a silly thing, you tiny-brained wipers of other people's bottoms!
Flikrac
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
zytzagoo
mi3.crew


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

PostPosted: 11.10.2003 22:00    Post subject: Add user to your forum ignore list Reply with quote

maxy wrote:
sto se tice outputa, mislio sam da covjek ipak nema whitespace ili something prije php koda, neg je vjerovatno pejsto kod unutar html-a vec.

Ma sve 5, nisam mislio reci da nemas pojma ili da krivo govoris, nego si napisao "head" taga, a prije njega jos mora ici i html tag i doctype specifikacija, pa cisto da netko ne shvati doslovno sam napisao da session mora ici prije svega...

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



Joined: 15 Sep 2003
Posts: 7

PostPosted: 29.10.2003 14:45    Post subject: Add user to your forum ignore list Reply with quote

U linuxu trebash napisati mkdir public_html i dati mu mod 666 da ga mozesh readati.....i to je to......a unutar njega mozesh kreirati one druge foldere

jer onaj ~ znakic ti je zapravo path do tvog kucnog direktorija

znaci adresa/~user_directory/pa_tvoje_stvari


....nadam se da sam ti pomogao.


0x90
Back to top
View user's profile Send private message
_butch



Joined: 10 Sep 2003
Posts: 870
Location: Maichno, Krlovc

PostPosted: 29.10.2003 20:44    Post subject: Add user to your forum ignore list Reply with quote

tnx, iako sam drugi dan se sjetil kak se radi Smile
thnx on tha tip !

_________________
FRENCH GUARD: No chance, English bed-wetting types.
I burst my pimples at you and call your door-opening request a silly thing, you tiny-brained wipers of other people's bottoms!
Flikrac
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
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