Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: DBI Problem

by tultalk (Monk)
on Sep 30, 2017 at 00:19 UTC ( [id://1200405]=note: print w/replies, xml ) Need Help??


in reply to Re^3: DBI Problem
in thread DBI Problem

That flush is before the next call to execute. That was the way it was in the examples at the links.

Why is it useless? It still flushes the session.

Replies are listed 'Best First'.
Re^5: DBI Problem
by huck (Prior) on Sep 30, 2017 at 00:29 UTC

      Yes I read it. Just tried it both ways as shown in code and corrected in text.

      Wit the flush before return, the fact that $session->flush() throws an error:

      Software error:

      Can't call method "flush" without a package or object reference at /home/jalamior/www/httpsdocs/cgi-bin/lib/perl/manageusers.pm line 198. localizes the problem to the executequery.

        Ever think of looking at what is in session when you call ExecuteQuery?

        see Re^8: DBI Problem, the problem is not in ExecuteQuery, the problem is where you try to do the $session->flush(); there is nothing to insure session has a valid value in ExecuteQuery.

Re^5: DBI Problem
by Anonymous Monk on Sep 30, 2017 at 00:27 UTC

    Have you read return? Everything after a call to return is useless

Re^5: DBI Problem
by tultalk (Monk) on Sep 30, 2017 at 00:25 UTC

    Guess it does not. When I moved it ahead of return, pops up error

    Can't call method "flush" without a package or object reference at /home/jalamior/www/httpsdocs/cgi-bin/lib/perl/manageusers.pm line 198.

      where in ExecuteQuery is session given a value? I think this also shows you have not included use strict; use warnings; in your code either, tisk tisk !!

        No tsk tsk

        package manageusers; use strict; use diagnostics -verbose; use warnings; use CGI; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use CGI qw(:standard escapeHTML); use CGI qw/:standard/; use Data::Dumper; use Digest::MD5 qw(md5_hex); use CGI::Session; use CGI::Cookie; use Mail::Sendmail; use Time::HiRes qw(usleep); use Time::Local;

        session is given a value when a user logs on. The user can do different things including changing password in the user table which is what this block of code is supposed to do..

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1200405]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (11)
As of 2024-03-28 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found