HanuAncutei.com - ARTA de a conversa!
Haine Dama designer roman

Bine ati venit ca musafir! ( Logare | Inregistrare )

 
Reply to this topicStart new topic
> Ajutor Php, problema cu sesiunile
cornuletz
mesaj 24 Aug 2004, 10:52 PM
Mesaj #1


Musteriu
*

Grup: Musterii
Mesaje: 34
Inscris: 25 December 03
Forumist Nr.: 1.611



Am o problema cu modul in care functioneaza sau mai bine zis nu functioneaza sesiunile la mine in computer atunci cand rulez urmatorul script:
CODE

<?php
session_start();
$HTTP_SESSION_VARS['a']="yyy";

echo  $HTTP_SESSION_VARS['a'];
?>
<a href="3.php">click</a>  

si 3.php
CODE

<?php
session_start();
echo $HTTP_SESSION_VARS['a'];

?>  



Atunci cand dau click pe link-ul de pe prima pagina trece la "3.php" dar nu se intampla nimic. Ce pot sa fac?


--------------------
Go to the top of the page
 
+Quote Post
E.B.E.
mesaj 24 Aug 2004, 11:43 PM
Mesaj #2


Domnitor
******

Grup: Membri
Mesaje: 1.292
Inscris: 20 November 03
Din: Delft, NL
Forumist Nr.: 1.248



Incearca sa folosesti variabila superglobala $_SESSION in loc de $HTTP_SESSION_VARS, varianta recomandata in versiunile de PHP actuale.

Vezi daca problema persista. In rest, la prima vedere codul pare corect. S-ar putea ca $HTTP_SESSION_VARS sa nu se comporte bine in noile versiuni, nu stiu, nu am folosit niciodata...


--------------------

I spend my time thinking of Angel... praying she ain't thinking of me...

Go to the top of the page
 
+Quote Post
Nightwind
mesaj 25 Aug 2004, 01:47 AM
Mesaj #3


Vornic
****

Grup: Membri
Mesaje: 301
Inscris: 8 July 04
Din: Above and Beyond the Stars
Forumist Nr.: 4.031



ca sa folosesti HTTP_SESSION_VARS trebuie sa ai register_globals setat pe 'on' din fisierul de configurare al php-ului. Pe de alta parte array-ul $_SESSION e mereu global si in consecinta accesibil, plus ca HTTP_SESSION_VARS e marcat ca obsolete de ceva vreme.


--------------------
***********************************************
Embrace death as a lover for she alone shall be your eternal bride
***
Transcript from 'Nightwind's Younger Days'
***********************************************
Go to the top of the page
 
+Quote Post
Promo Contextual
mesaj 25 Aug 2004, 01:47 AM
Mesaj #


ContextuALL









Go to the top of the page
 
Quote Post
cornuletz
mesaj 25 Aug 2004, 08:34 AM
Mesaj #4


Musteriu
*

Grup: Musterii
Mesaje: 34
Inscris: 25 December 03
Forumist Nr.: 1.611



Am schimbat HTTP_SESSION_VARS cu $_SESSION, dar tot nu merge. Directorul temporar e bine setat.


--------------------
Go to the top of the page
 
+Quote Post
Nightwind
mesaj 25 Aug 2004, 10:45 AM
Mesaj #5


Vornic
****

Grup: Membri
Mesaje: 301
Inscris: 8 July 04
Din: Above and Beyond the Stars
Forumist Nr.: 4.031



Ce versiune de php folosesti?
Incearca sa setezi register_globals din php.ini pe on.


--------------------
***********************************************
Embrace death as a lover for she alone shall be your eternal bride
***
Transcript from 'Nightwind's Younger Days'
***********************************************
Go to the top of the page
 
+Quote Post
E.B.E.
mesaj 25 Aug 2004, 08:58 PM
Mesaj #6


Domnitor
******

Grup: Membri
Mesaje: 1.292
Inscris: 20 November 03
Din: Delft, NL
Forumist Nr.: 1.248



QUOTE
ca sa folosesti HTTP_SESSION_VARS trebuie sa ai register_globals setat pe 'on' din fisierul de configurare al php-ului. Pe de alta parte array-ul $_SESSION e mereu global si in consecinta accesibil, plus ca HTTP_SESSION_VARS e marcat ca obsolete de ceva vreme.


Esti sigur? Eu stiam ca $HTTP_... este un alias pentru $_SESSION, asadar nu depinde de register globals. Tot ce se poate sa gresesc.

cornuletzule, cred ca broblema e un pic mai subtila decat pare la prima vedere wink.gif Trebuie sa mai dai detalii. Ar trebui sa mearga asa cum e.

Si spune-ne intr-adevar ce versiune de PHP folosesti.

Later edit: Intr-adevar este nevoie de register_globals, tocmai m-am documentat. biggrin.gif Mai mult decat atat, scrie acolo ca $HTTP_SESSION_VARS trebuie declarata global anterior folosirii.

Dar incepand cu versiunea 4.1.0, $_SESSION ar trebui sa fie OK.

Acest topic a fost editat de E.B.E.: 25 Aug 2004, 09:02 PM


--------------------

I spend my time thinking of Angel... praying she ain't thinking of me...

Go to the top of the page
 
+Quote Post
cornuletz
mesaj 26 Aug 2004, 04:57 PM
Mesaj #7


Musteriu
*

Grup: Musterii
Mesaje: 34
Inscris: 25 December 03
Forumist Nr.: 1.611



PHP 4.3.1


--------------------
Go to the top of the page
 
+Quote Post
Nightwind
mesaj 27 Aug 2004, 03:04 PM
Mesaj #8


Vornic
****

Grup: Membri
Mesaje: 301
Inscris: 8 July 04
Din: Above and Beyond the Stars
Forumist Nr.: 4.031



cauta linia cu

register_globals = Off

si schimba in On, din php.ini
Altceva la care ma gandesc e cat directorul unde sunt stocate informatiile sesiunilor este inaccesibil, dar atunci ai fi primit mesaj de eroare.


--------------------
***********************************************
Embrace death as a lover for she alone shall be your eternal bride
***
Transcript from 'Nightwind's Younger Days'
***********************************************
Go to the top of the page
 
+Quote Post
cornuletz
mesaj 27 Aug 2004, 03:30 PM
Mesaj #9


Musteriu
*

Grup: Musterii
Mesaje: 34
Inscris: 25 December 03
Forumist Nr.: 1.611



Oameni buni, va multumesc pentru ajutor. In sfarsit am reusit sa gasesc solutia. Am formatat partitia cu windows-ul si totul merge perfect.


--------------------
Go to the top of the page
 
+Quote Post
Nightwind
mesaj 27 Aug 2004, 04:47 PM
Mesaj #10


Vornic
****

Grup: Membri
Mesaje: 301
Inscris: 8 July 04
Din: Above and Beyond the Stars
Forumist Nr.: 4.031



.... wow ....

well, solutia asta rezolva 99,9% din problemele de soft ...



--------------------
***********************************************
Embrace death as a lover for she alone shall be your eternal bride
***
Transcript from 'Nightwind's Younger Days'
***********************************************
Go to the top of the page
 
+Quote Post
actionmedia
mesaj 27 Aug 2004, 05:07 PM
Mesaj #11


Domnitor
******

Grup: Membri
Mesaje: 5.298
Inscris: 9 June 04
Forumist Nr.: 3.787



QUOTE (Nightwind @ 27 Aug 2004, 06:00 PM)
well, solutia asta rezolva 99,9% din problemele de soft ...

pentru restul de 0,1%, de obicei trebuie schimbat 'puterul cu totul. spoton.gif


--------------------
viata e simpla si misto!
Go to the top of the page
 
+Quote Post
algolmic
mesaj 15 Sep 2004, 03:20 PM
Mesaj #12


Musteriu
*

Grup: Musterii
Mesaje: 10
Inscris: 1 April 04
Forumist Nr.: 2.849



Salutare!

Uite, shi eu am inceput sa ma joc cu php-ul shi-mi cam da dureri de cap

incerc sa folosesc variabilele de sesiune, dar pauza, nimic

am modificat in php.ini acea linie cu session.save_path=/tmp
in session.save_path=c:\temp
shi cu session.save_path="c:\temp" ...shi multiple alte variante, dar
cand scriu scriptul

<?
session_start();
?>

shi-l rulez, imi apar o multime de erori

ce am greshit???
ps: eu configurez dupa un chip special mai vechi,
am php4, apache 3.1 shi mysql pe computer, iar acolo(in revista) imi spun
sa inlocuiesc linia asta shi sa verific daca pot folosi sesiunile cu scriptul de mai sus

am scris ce trebuie in php.ini, dar degeaba, iar alta informatie/varianta nu gasesc... sad.gif



--------------------
We are the dark inside the night
The ghosts about which the poets write
And the dreams that night's embrace
That slowly leave without a trace...


O, suflet sparge-odata, ingustati inchisoare
Si scutura-te-odata de-acest lut pamintesc!

Vreau sa m-agat de tine, spre cer navala dind
Cum viermii de-un cadavru s-agata misunind!

Go to the top of the page
 
+Quote Post
ione
mesaj 4 Nov 2004, 02:12 PM
Mesaj #13


Musteriu
*

Grup: Musterii
Mesaje: 4
Inscris: 20 July 04
Forumist Nr.: 4.106



sfatul meu???tongue.gif..simplu cauta pe net PHPTriad ....e un kit care instaleza php,apache si mysql...eu asa am facut..dupaia start apache si orice script cam merge fara sa imi prind urechile in configurari prin htdocs...ohmy.gif ....mia mi-a luat mai mult pana am aflat ca tre sa dau save in c://apache/htdocs decat pana am instalat+configurat tongue.gif


--------------------
O constiinta curata este de obicei rezultatul unei memorii proaste .
Go to the top of the page
 
+Quote Post
E.B.E.
mesaj 5 Nov 2004, 04:31 PM
Mesaj #14


Domnitor
******

Grup: Membri
Mesaje: 1.292
Inscris: 20 November 03
Din: Delft, NL
Forumist Nr.: 1.248



QUOTE
ps: eu configurez dupa un chip special mai vechi,
am php4, apache 3.1 shi mysql pe computer, iar acolo(in revista) imi spun
sa inlocuiesc linia asta shi sa verific daca pot folosi sesiunile cu scriptul de mai sus


Dar de ce nu folosesti versiunile mai noi? :-/ In genere sunt top-down compatible, cu mici exceptii care sunt semnalate cu bold in documentatie... (ca de ex. register_globals=off ca default in versiunile mai noi).

Cu sesiunile, intr-o prima aproximatie doar asta e diferenta: $HTTP_SESSION_VARS e inlocuit de $_SESSION.


--------------------

I spend my time thinking of Angel... praying she ain't thinking of me...

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 



RSS Versiune Text-Only Data este acum: 29 March 2024 - 03:43 AM
Ceaiuri Medicinale Haine Dama Designer Roman