Re: cgi-lib.pl
Hi there, Thanks everyone for the great information you have provided. I have taken everyones advice and installed CGI.pm with the cgi-lib compat mode on. I am still having an issue that is only associated with the mod_perl version of the web server? I have two variables at initial login $userid and $password that are populated via the cgi-lib readparse. Upon initial login the variable will contain the correct information. If i would hit refresh they double and keep going everytime i hit refresh? Ex: $user = joe | Refresh - $user=joejoe | Refresh - $user=joejoejoe I dont get it, i went thru my code and cleaned it up to make sure the vairable were emptied on every execution by placing: $userid = ; $password = ; before the data assignments. And still get the same effect? Anyone have a clue, is it CGI.pm or mod_perl, the same source does not do it on a non-mod_perl server. Thanks, john John == John Buwa [EMAIL PROTECTED] writes: John I have a huge system i wrote using the cgi-lib.pl as its core. I John attempted to integrate mod-perl with my system and all my John cgi-lib.pl which are used via a require in all scripts returns John errors. My dont work, if they do the act very strange and John unacceptable. John My question is how do i use cgi-lib.pl and mod-perl together? Is John anyone doing this? How can it be done. John Here is a common error in my log: John [Mon Jul 23 05:38:06 2001] [error] Undefined subroutine John Apache::ROOTwww_2emy_2ddomain_2ecom::cgi_2dbin::pads::welcome_2epl::ReadPar John se called at /driveb/usr/web/webroot/cgi-bin/pads/welcome.pl line 7. In addition to all the other things said in this thread, the reason you get this error is because cgi-lib.pl doesn't have package, so it exports to the current package. Unfortunately, if two Apache::Registry scripts both require it, then it gets defined in one package, but the require gets skipped in the other. Definitely you need something that understands import, such as CGI.pm's cgi-lib compatibility mode. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Re: cgi-lib.pl
On Tue, 24 Jul 2001, John Buwa wrote: Hello, I have a huge system i wrote using the cgi-lib.pl as its core. I attempted to integrate mod-perl with my system and all my cgi-lib.pl which are used via a require in all scripts returns errors. My dont work, if they do the act very strange and unacceptable. My question is how do i use cgi-lib.pl and mod-perl together? Is anyone doing this? How can it be done. Here is a common error in my log: [Mon Jul 23 05:38:06 2001] [error] Undefined subroutine Apache::ROOTwww_2emy_2ddomain_2ecom::cgi_2dbin::pads::welcome_2epl::ReadPar se called at /driveb/usr/web/webroot/cgi-bin/pads/welcome.pl line 7. http://perl.apache.org/guide/porting.html#Name_collisions_with_Modules_and a quick hack: s/require cgi-lib.pl/do cgi-lib.pl/ doesn't effective, but a working solution. Another solution would be to write a wrapper around cgi-lib.pl to use a package as explained in the URL above. But the best is to use CGI.pm's cgi-lib compat mode: $ perldoc CGI _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: cgi-lib.pl
Rather than go into the details, it's probably best that you use Apache::PerlRun in place of Apache::Registry. cgi-lib.pl is an old Perl 4 library, if you are using new Perl 5 features like OO, modularity, and want to take the MOST advantage of mod_perl, use CGI.pm instead. CGI.pm also has a backwards compatible mode for cgi-lib.pl scripts. Also please read the mod_perl guide. http://perl.apache.org/guide/ At 01:03 AM 7/24/2001 -0500, John Buwa wrote: Hello, I have a huge system i wrote using the cgi-lib.pl as its core. I attempted to integrate mod-perl with my system and all my cgi-lib.pl which are used via a require in all scripts returns errors. My dont work, if they do the act very strange and unacceptable. My question is how do i use cgi-lib.pl and mod-perl together? Is anyone doing this? How can it be done. Here is a common error in my log: [Mon Jul 23 05:38:06 2001] [error] Undefined subroutine Apache::ROOTwww_2emy_2ddomain_2ecom::cgi_2dbin::pads::welcome_2epl::ReadPar se called at /driveb/usr/web/webroot/cgi-bin/pads/welcome.pl line 7. Any info would be appreciated! John __ Gunther Birznieks ([EMAIL PROTECTED]) eXtropia - The Open Web Technology Company http://www.eXtropia.com/
Re: cgi-lib.pl
hi, Not really sure if this is useful info for you but your sub:object called ReadParse is being called in welcome.pl @ line 7 without being defined previously.. [Mon Jul 23 05:38:06 2001] [error] Undefined subroutine Apache::ROOTwww_2emy_2ddomain_2ecom::cgi_2dbin::pads::welcome_2epl::ReadPar se called at /driveb/usr/web/webroot/cgi-bin/pads/welcome.pl line 7. Any info would be appreciated! John
Re: cgi-lib.pl
John, A number of good suggestions came by regarding this. Here's mine, use the following in place of your cgi-bin.pl include... use CGI qw(:cgi-lib :standard -debug); This will allow you to use CGI.pm and have it default to the cgi-lib commands you're used to. The -debug statement will allow you to run your scripts via command line and enter in the variable=value pairs that you would normally send via html form. Good luck and I hope this helps, Ron John Buwa wrote: Hello, I have a huge system i wrote using the cgi-lib.pl as its core. I attempted to integrate mod-perl with my system and all my cgi-lib.pl which are used via a require in all scripts returns errors. My dont work, if they do the act very strange and unacceptable. My question is how do i use cgi-lib.pl and mod-perl together? Is anyone doing this? How can it be done. Here is a common error in my log: [Mon Jul 23 05:38:06 2001] [error] Undefined subroutine Apache::ROOTwww_2emy_2ddomain_2ecom::cgi_2dbin::pads::welcome_2epl::ReadPar se called at /driveb/usr/web/webroot/cgi-bin/pads/welcome.pl line 7. Any info would be appreciated! John