Re: Passing a hash to a cgi outside a form?
You might also try Data::Dumper to create eval-able expressions -> hashes, arrays, and other complex objects. Dana
Re: Core Dump
Here is the backtrace, but as you can see it is a mod_ssl issue, so I have moved this discussion to [EMAIL PROTECTED] If anyone has comments, however, please feel free to let me know! Dana #0 0x4007b105 in SSL_CTX_ctrl () #1 0x8083500 in ssl_init_Module () #2 0x8083827 in ssl_init_Module () #3 0x80b49a9 in ap_init_modules () #4 0x80be4e5 in ap_child_terminate () #5 0x80bed03 in main () On Sun, 16 Jul 2000, Ask Bjoern Hansen wrote: > On Thu, 13 Jul 2000, Dana Powers wrote: > > > This may or may not have anything to do with mod_perl, but I am subscribed to > > this list, so I figure I'll start here. > > > > I have just compiled Apache/mod_ssl/mod_perl and installed it with essentially > > no problems, but when I send a SIGHUP or SIGUSR1 to apache, it coredumps. This > > didnt happen before I compiled mod_perl + mod_ssl ( I was using the stock RPM > > from RedHat 6.0 ), so I thought it may have something to do with that. Here are > > the packages that I used: > > Hi Dana, > > You need to make a backtrace for us to look at. The SUPPORT document > in the mod_perl distribution tells you how. > > > - ask > > -- > ask bjoern hansen - <http://www.netcetera.dk/~ask/> > more than 70M impressions per day, <http://valueclick.com>
Re: Coredump
Thanks a lot, i knew gdb was what I should be using, but I've never had to use it so the uptake was a bit slow. Here is the stack trace: #0 0x4007b105 in SSL_CTX_ctrl () #1 0x8083500 in ssl_init_Module () #2 0x8083827 in ssl_init_Module () #3 0x80b49a9 in ap_init_modules () #4 0x80be4e5 in ap_child_terminate () #5 0x80bed03 in main () I see it is a mod_ssl issue - i will move this discussion there. Thanks for the help. Dana On Sat, 15 Jul 2000, Dragomir Kamenov wrote: > Try analyzing the core files with GDB do something like > > #gdb -c /usr/sbin/httpd > > then, at the "(gdb)" prompt, type "where" - this would give you a stack > backtrace from the point it cored. >
Coredump
Do any of you know a better place to look for help with my apache coredump problem? (see earlier message) I looked all over the apache website and found nothing useful. No mailing lists, or newsgroups or the like. All I found was bug-reporting info, which this certainly doesnt fall into yet. Dana Powers
Core Dump
This may or may not have anything to do with mod_perl, but I am subscribed to this list, so I figure I'll start here. I have just compiled Apache/mod_ssl/mod_perl and installed it with essentially no problems, but when I send a SIGHUP or SIGUSR1 to apache, it coredumps. This didnt happen before I compiled mod_perl + mod_ssl ( I was using the stock RPM from RedHat 6.0 ), so I thought it may have something to do with that. Here are the packages that I used: drwxr-xr-x 8 root root 1024 Jul 5 13:13 apache_1.3.12 drwxr-xr-x 24 root root 1024 Jul 5 11:04 mod_perl-1.24 drwxr-xr-x 10 root root 1024 Jul 5 10:48 mod_ssl-2.6.5-1.3.12 drwxr-xr-x 29 root root 4096 Jun 30 15:50 perl-5.6.0 Like I said, everything works just fine - SSL, mod_perl etc, but when I try apachectl reload >boom<. Thanks for any help Dana
Re: DBI:mysql question
You'll need to use $sth = $dbh->prepare(...); and $sth->execute(); Then ($lock) = $sth->fetchrow_array(); and $sth->finish(); $dbh->do assumes that you are inserting or updating and so you dont expect any results back. A GET_LOCK does not work like that, as you have noted, so you will need to treat it like a select statement. I use these locks to simulate a row-level locking system and it works quite well. Dana On Wed, 12 Jul 2000, Rob Tanner wrote: > I want to use advisory locks in MySQL. The functuion is GET_LOCK(), and > the way it should be used is SELECT GET_LOCK(). It return 1 is successful, > 0 if timed out, and undef on error. The sequence: > > my $db_lock = 'GET_LOCK("mylock", 5)'; > my $result = $dbh->do($db_lock); > > returns "1" regardless of whether the lock was obtained. According to the > cheetah book (Programming the Perl DBI), page 120/1, that's correct. The > $dbh->do statement only returns "0" on an error. > > How do I execute the MySQL GET_LOCK function and get back the real result > (0 or 1). Always getting back a 1 as if I got the lock, whether I did or > not, kind of defeats the purpose. > > What is the work-around? > > Thanks, > Rob > >_ _ _ _ __ _ _ _ _ > /\_\_\_\_\/\_\ /\_\_\_\_\_\ > /\/_/_/_/_/ /\/_/ \/_/_/_/_/_/ QUIDQUID LATINE DICTUM SIT, > /\/_/__\/_/ __/\/_//\/_/ PROFUNDUM VIDITUR >/\/_/_/_/_/ /\_\ /\/_//\/_/ > /\/_/ \/_/ /\/_/_/\/_//\/_/ (Whatever is said in Latin > \/_/ \/_/ \/_/_/_/_/ \/_/ appears profound) > > Rob Tanner > McMinnville, Oregon > [EMAIL PROTECTED]
Re: Using modules
# Library: /path/to/library/foo.pm use lib 'path/to/library'; use foo; Make sure that the process has permissions to read the file too. Dana On Sun, 09 Jul 2000, Srinidhi Rao S wrote: > > Hi all, > I have a small problem. I have a package which is not situated in perl\lib folder. >It has a different path. I have some problems in copying this to library folder. Can >I use the package from the present position without copying to the library folder?? >How do tell the perl compiler to search that folder also?? > Thanx in advance > Regards > Srinidhi Rao S
Re: Apache : mod_perl vs fastcgi
On Thu, 06 Jul 2000, Pramod Sokke wrote: > >1) I installed apache with mod_perl - the speed increased.But I didn't > >understand HOW mod_perl optimizes use of resources and increases speed ? > >Does it share perl interpreter, script or anything else? > > The Perl runtime library is linked into the server. The persistent > interpreter embedded in the server avoids the overhead of starting an > external interpreter program and the additional Perl start-up time. That's > the main cause of increase in speed. > mod_perl also caches compiled perl code so you gain time there as well. I.E. CGI - load perl + open perl script + compile script + execute. mod_perl - execute cached script We have gained considerable performance (10x) because we use so many shared libraries. These libraries get cached in the server under mod_perl and no longer need to be reloaded and recompiled for every hit. > >2) Then I installed FastCGI - but I didn't see the differance. Speed and > >memory usage remained the same. > > FastCGI with perl may or may not be that fast. I could be totally wrong here but I believe that FastCGI will be able to cache the perl runtime, but perl will still have to reload and recompile any scripts during every hit. > >I test with mysql database (16000 records, 5 fields of different types) > >- > >SELECT * FROM TEST WHERE one < $a and one > $b; > >Next, I open, read and parse 5Mb text file. > >With LWP::Parallel::UserAgent perl module I send 10 parallel requests. > > > >Do mod_perl and FastCGI installed in the same Apache server interact and > >how do they interact if they do at all? There should be no interaction as long as you have set up your httpd.conf file with the basic setup - some alias dir or file extention is always mod_perl and some other is always FastCGI. You might also look into Apache::DBI for database connectivity. It will allow you to very easily use persistent connections => one db connect per apache thread, instead of one per page hit. Dana
Re: Script that stays on the same page
I would try using a Non-Parsed-Header (NPH) script and return something like this: print << "END"; HTTP/1.0 204 No Response END Dana On Mon, 03 Jul 2000, Pierre-Yves BONNETAIN wrote: > Hello, > >For my server, I need to write some script that will be 'regularly' > triggered (GET or POST), but that will NOT send the user to another page. The > user must stay on the same page he is, without ANY html being exchanged as > a result of the script. >This will be used to change parameters on the user's session, but since > those params will not affect the page the user is currently looking at, there > is no need to send HTML back. >So, 1/ can it be done ? 2/ How ? >TIA, > -- > -+-+ Pierre-Yves BONNETAIN (aka Pyb) > Consultant Internet/Sécurité --- B & A Consultants > Tel : 0 563.277.241 - Fax : 0 563.277.245