Re: CGI::Session with MySQL Driver



Mark Clements a écrit :
Alexandre Jaquet wrote:


Mark Clements a écrit :

Alexandre Jaquet wrote:



A. Sinan Unur a écrit :


Alexandre Jaquet <alexj@xxxxxxxxxxx> wrote in
news:429af5eb$0$1145$5402220f@xxxxxxxxxxxxxxx:




I've read this doc, but it's doesn't seem to have example with
new defined field

I want to store user_name in session table


<url: http://search.cpan.org/~sherzodr/CGI-Session-3.95/Session/Tutori
al.p m#CREATING_NEW_SESSION>



nothing about storing data in database ...

$SESSION = new CGI::Session( "driver:MySQL", undef,  { Handle
=>$dbh}
); $SESSION->store($dbh,$SESSION->id,'',"user_name	=> $username");

store now return : Can't use string
("b7f26a2095fb2ff4e11e8ae1295d767e") as an ARRAY ref while "strict
refs" in use at ...

the string b7f26a2095fb2ff4e11e8ae1295d767e represent the
sessionid what's wrong ?


You really don't read the documentation do you?

From the tutorial that Sinan pointed you at:

@my_array = ("apple", "grapes", "melon", "casaba"); $session->param("fruits", \@my_array);

Don't use store, use param.

Don't make us read the docs for you.

Mark

That's what I've try first it's doesn't store value key pair user_name $username ...


Show us your code using param.

Does it work with the File driver?

Mark

With filedriver that's work .



Relevant Pages

  • Re: Morkie and VE Testing
    ... procode to schedlue a session here dispite having more poeple asking ... Dee was not validating Robesin's remarks. ... She was validating those of KH6HZ. ... being "pro code", and who, according to Mark, refused him a test session. ...
    (rec.radio.amateur.policy)
  • Re: "You" should expect to break even on the odds bets is false!
    ... >if I play a 20 decision session. ... No. Mark would answer, "the most likely outcome is for you to break ... you have one known outcome and a probability ... the "equal favorite" after the first decision, ...
    (rec.gambling.craps)
  • Re: Morkie and VE Testing
    ... procode to schedlue a session here dispite having more poeple asking ... She replied to Robesin. ... Deignan she wishe dto reply to. ... being "pro code", and who, according to Mark, refused him a test session. ...
    (rec.radio.amateur.policy)
  • Re: Win XP Back-up Utility "Q"
    ... Mark: Thank you very much, both for your time and recommendation. ... Mark L. Ferguson MS-MVP ... Then I could delete the oldest session or 2 when ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Redhat 8.0 VNC and KDE
    ... Mark C wrote: ... > possible, get a KDE session. ... | exec $HOME/.Xclients-$HOSTNAME$DISPLAY ...
    (alt.os.linux.redhat)