Unitialized value?

Ivan Kohler ivan at sisd.com
Thu Mar 26 22:07:24 PST 1998


-----BEGIN PGP SIGNED MESSAGE-----

On Thu, 26 Mar 1998, Jim Warren wrote:

> Ivan,
> This is the html result , even after adding that one  line you
> described.....next is the mysql log, and last is the web server log......it
> seems to be "losing" the custnum value in between scripts??  Let me know if
> more logs would help.....

No; unfortunately I don't know what else I can do to help you diagnose
this problem, as you said it seems to be "between scripts".  Perhaps you
could try removing the #cust_main from the end of the redirect and see if
that helps things at all.  I'm also told (but have no way to check) that
IE doesn't handle passing the QUERY_STRING bit in redirects and will cause
the behavior below.  I would be interested in knowing if that is your
problem, and if removing the #cust_main bit helps or not?

> 
> Customer View
> Main menu
> Content-type: text/html
> Software error:
> Customer not found! at /home/httpd/html/view/cust_main.cgi line 58.
> Please send mail to this site's webmaster for help.
> 
> mysql log:
>                    190 Query      SHOW FIELDS FROM cust_main
>                    190 Query      SELECT * FROM cust_main WHERE custnum = 7
>                    190 Query      SHOW FIELDS FROM cust_main
>                    190 Query      INSERT INTO cust_main ( custnum, agentnum,
> las
> t, first, ss, company, address1, address2, city, county, state, zip,
> country, da
> y, night, fax, payby, payinfo, paydate, payname, tax, otaker, refnum) VALUES
> (7,
>  5, 'Fidone', 'Sherry', '123-45-6789', '', '4040 Boulder Hwy #2048', '',
> 'Las Ve
> gas', '', 'NV', '89121', 'US', '702-641-5360', '', '', 'BILL', '', '',
> 'Sherry F
> idone', '', '', 1)
>                    190 Quit
> 980326 13:02:28    191 Connect    freeside at localhost
>                    191 Init DB    freeside
>                    191 Query      SHOW FIELDS FROM cust_main
>                    191 Query      SELECT * FROM cust_main WHERE custnum =
> NULL
>                    191 Quit
> 
> apache's access_log:
> webtech1.coam.net - - [26/Mar/1998:13:00:37 -0800] "GET /edit/cust_main.cgi
> HTTP
> /1.1" 200 2743
> webtech1.coam.net - - [26/Mar/1998:13:02:25 -0800] "POST
> /edit/process/cust_main
> .cgi HTTP/1.1" 302 -
> webtech1.coam.net - - [26/Mar/1998:13:02:28 -0800] "GET
> /view/cust_main.cgi?7#cu
> st_main HTTP/1.1" 200 366
> 
> apache's error_log:
> [Thu Mar 26 13:02:28 1998] cust_main.cgi: Use of uninitialized value at
> /usr/lib
> /perl5/site_perl/FS/Record.pm line 419.
> [Thu Mar 26 13:02:28 1998] cust_main.cgi: Customer not found! at
> /home/httpd/htm
> l/view/cust_main.cgi line 58.
> 
> 
> -----Original Message-----
> From: Ivan Kohler <ivan at sisd.com>
> To: Jim Warren <jim at coam.net>
> Cc: ivan-freeside at sisd.com <ivan-freeside at sisd.com>; Gary P.
> <firecat at coam.net>
> Date: Thursday, March 26, 1998 12:51 PM
> Subject: Re: Unitialized value?
> 
> 
> >-----BEGIN PGP SIGNED MESSAGE-----
> >
> >I can't reproduce your error so I'll need a little bit of help to track it
> >down.
> >
> >I'm assuming by "user" you mean a customer entry, not a service (such as
> >SLIP/PPP).
> >
> >After the script inserts the customer into the database (or after you edit
> >a customer), it redirects you to the "view" for that customer.  In your
> >case, for some reason this isn't working - it looks like it is trying to
> >send you to a null custnum.
> >
> >Check at the end of htdocs/edit/process/cust_main.cgi:
> >
> >}
> >
> >my($custnum)=$new->custnum;
> >$req->cgi->redirect("/view/cust_main.cgi?$custnum#cust_main");
> >
> >sub idiot {
> >
> >and put in the middle:
> >
> >my($custnum)=new->custnum;
> >warn "edit/process/cust_main.cgi: custnum $custnum";  #ADD THIS LINE
> >$req->cgi->redirect("/view/cust_main.cgi?$custnum#cust_main");
> >
> >Now check your web server's error log when this happens to see what
> >$custnum is, so we know where to look for the problem.
> >
> >Also, have you created /var/spool/freeside/counters?  That could be
> >interfering with the sequential number generation (since SQL doesn't seem
> >to provide a _portable_ method of specifying these).
> >
> >On Thu, 26 Mar 1998, Jim Warren wrote:
> >
> >>
> >> I am working on installing freeside and am getting this error when I try
> >> to add a user:
> >> use of unitialized value at .....site_perl/FS/Record.pm line 419
> >> and,
> >> ....view/cust_main.cgi line 58  Customer not found!
> >>
> >> Actually, the user is added to the mysql database (you can see the
> results
> >> if you go to "Browse ... by customer number"
> >>
> >>
> >> Does anyone have any ideas on how/where to correct this?
> >>
> >> Thanks for any pointers...........
> >>
> >>
> >> Jim Warren Connecting America
> >> jim at coam.net www.coam.net
> >>    Phone: 702-648-0390    Fax:  702-648-2712
> >>
> >>
> >
> >- --
> >Ivan Kohler <ivan at sisd.com> - finger for PGP key
> >Silicon Interactive Software Design - http://www.sisd.com/
> >"I want to go on a mountain-top / with a radio and good batteries
> > play a joyous tune / and free the whole human race from suffering" -Bjork
> >
> >-----BEGIN PGP SIGNATURE-----
> >Version: 2.6.2
> >
> >iQCVAwUBNRq/A77OPBeQJv09AQHDrgQAkFZRL3LDLMydAuWx2xfdiiJ34gdEamQi
> >MQchEZnLtr5YS8dHuxIBwlAaE2C0A50u6tLJMgIGG3k8DQykCV2h4ei66hdqhLuj
> >WWefYlLaFJ6Z7EKyfQ68ZcvMz2R7jSnoq/sYQ95w4PhQljba6KGK7uhAl1B4SMyV
> >91IS2We7zIA=
> >=uVl4
> >-----END PGP SIGNATURE-----
> 
> 

- -- 
Ivan Kohler <ivan at sisd.com> - finger for PGP key
Silicon Interactive Software Design - http://www.sisd.com/
"I want to go on a mountain-top / with a radio and good batteries
 play a joyous tune / and free the whole human race from suffering" -Bjork



-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNRtCG77OPBeQJv09AQHOsgP/aDFcYY0QWQpMFGxerfuG2+tu7/9B5Ms/
qKHNqaFpgB+NdZszlfNgSHQpv3TUlSJW8w1A7zcXqL62pPSXc9KcPz5Ey09DI/l/
i6Wj801q9FHyVgOgdYk5aA6gHJlcv4xgPZecFKlEJGF3k5bTZGgdvNs6VxYYqdxT
QaLJR81XuP4=
=yNCY
-----END PGP SIGNATURE-----




More information about the freeside-users mailing list