Re: oracle : The lowdown
On Tue, 11 Jan 2000, Michael wrote: On Tue, 11 Jan 2000, John Armstrong wrote: Hello all- I just got the word from down high that VC's will freak out if they see we are using mysql and now we are looking at an Oracle solution. The product is a mid level mod perl application that will receive ~500,000 hits a day. I want to engineer it to withstand up to 2 million hits per day ( not unique users ). Does anyone have good or bad stories about using Oracle with mod_perl/DBI/Apache::DBI? I would love to hear both sides of the coin. I personally think Oracle is overkill but I don't have any major issues with it. Depends what the business is. If it is a serious business looking for VC I would actually suspect the inverse is true: MySQL is underkill (I think I just made that word up) due to its lack of transactions and other advanced features (yes, these things do mean something in the real world). So what's wrong with Postgres ?? [EMAIL PROTECTED] Nothing except speed. Postgres is great for free projects, and its MVCC is a cool technology in a free database. -- Matt/ Details: FastNet Software Ltd - XML, Perl, Databases. Tagline: High Performance Web Solutions Web Sites: http://come.to/fastnet http://sergeant.org Available for Consultancy, Contracts and Training.
Re: Apache::ASP
Don, Try and get a static install to work. mod_perl DSO does not work reliably. If mod_perl is compiled statically into Apache, it just works, and you don't need to configure the web server with anything, and you'll probably need to comment out lines like "LoadModule ...". You know that mod_perl is working in the server by having mod_perl's "make test" work, or by trying something simple like "PerlModule CGI" in a config. -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051 don Wang wrote: Help! I have tried unsucessfully to set up an Apache server with ASP functionality. According to instructions I got when downloading ASP.pm modules from perl.com. It did not work. After seemingly successful installation, I tried various ways to modify httpd config files, and the asp (most likely mod_perl) is not working, since all the asp files and perl files are displayed in plain text. I had a full installation of Mandrake RedHat 6.0 with 2.2.9 Linux kernel, with Apache and mod_perl pre-installed. I copied the tar file to: /usr/lib/perl5/site_perl/5.005/i386-linux/apache/ untar and perl Makefile.PL By then, it reported back that I have many (~10) modules missing. After going through installing all the modules with CPAN.pm, perl Makefile.PL finally says ok, and I went ahead with make, make test, make install. all seems fine. Errors occur when I tried to config and restart the Apache server. When I enable DSO, it says libperl.so is garbled, and possibly not a Apache module DSO. When disabling DSO by commenting out two lines in httpd.conf (AddModule mod_perl.c and LoadModule perl_module moduels/libperl.so), Only then httpd starts. when I have location /perl in the conf files, the "PerlHandlerApache::Registry" is also give out error for invalid "PerlHandler" command, perhaps mispelled or module not defined in the configuration. httpd error log reports that I only have apache 1.3.6 with PHP Mandrake/Linux running. no mod_perl to be found. Then the 10 step "sure-install" also failed subsequently. http://perl.apache.org/guide/index.html Questions: Why does the ten step install from apache failed? is it from previous installtion? How do I know if a module is defined in a configuration? where? how to? I heard mixed words on DSO. If I were to statically compile it, how to disable DSO? I am lost. Thanks in advance for your help! Don -- *** [EMAIL PROTECTED] Unified Access Communications, Inc. 200 Lincoln Street, Suite 201 Boston, MA 02111 phone: (617) 695-0137, ext. 13 fax: (617) 695-0984 ***
Re: oracle : The lowdown
Matt Sergeant wrote: On Tue, 11 Jan 2000, Joshua Chamas wrote: BTW, I have also evaled Sybase, Informix, DB2, SQLServer 6.5, Solid, and found Oracle to be the best of all those, but if you don't need transactions, go with MySQL... Do you mind sharing with me (if not the list) why Sybase lost out to Oracle? Not going to let me get away with that eh? ... At the time, it was likely that DBD::Sybase didn't support bind parameters, or something stupid like that, maybe lack of support for multiple $sth ... this eval was about 1+1/2 year ago now, so quite dated. It may have been that their licensing was worse too, having me pony up $3000+ up front for a web app, instead of $1200 for Oracle ? I was able to make a successful argument with Oracle that I could monitor "concurrent users" and should have per user pricing for starters (read $Application + $Session in Apache::ASP) Its all a big blur. ;) I think it was Informix DB2 database quirks that turned me off, I vaguely recall DB2's precise time() data type being too precise and taking up too much storage. SQLServer 6.5 was just weak and locked up way too fast, which supposedly is different with 7.0 -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: Is there a generic apache mailing list?mod_proxy problems
I'm having some problems with other modules in Apache, in particular the mod_proxy module. It appears to strip non-standard headers from requests as they pass through the proxy. This is bad. Can anyone help me? You should go to www.apache.org, you will find all the info over there, including the appropriate mailing list. ___ Stas Bekmanmailto:[EMAIL PROTECTED] http://www.stason.org/stas Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC perl.apache.orgmodperl.sourcegarden.org perlmonth.comperl.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: Apache::Registry and -M
From my quick look at Registry.pm it looks like there's no way to disable the feature where a script will be re-compiled if it changes on disk. * take a look at Apache::RegistryNG * move the code into a module and require from the 2 lines script Is this correct? This is a problem if I update both the main script, and modules used by the script. For example, adding a new subroutine to a module and then calling it from the main Registry script. The main script will be recompiled, but not the module, so I'll get an undefinded subroutine called. I'm not using Apache::StatINC - the module isn't in the @INC path at startup. I'd like to be able to move the updated script and module into place and either do a -USR1 restart or just wait for the Apache processes to go through their normal life cycle. As is, it seems as if I have to bring down the server, move in the updated scripts in, and restart. Not the most graceful process. Apache::StatINC is perfect for development stage, if you need the same behavior for just a few files on production server, see: http://perl.apache.org/guide/porting.html#Reloading_Modules_and_Required_F ___ Stas Bekmanmailto:[EMAIL PROTECTED] http://www.stason.org/stas Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC perl.apache.orgmodperl.sourcegarden.org perlmonth.comperl.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
problems with module at root of web site
Hi, I have written a perl module that is meant to run at the root of a web site (blah.com/, let's say), but there are errors whenever it tries to access an image with an absolute URL. For instance, this tag returns a broken image: img src="/images/logo.gif" this, I'm guessing, is because it's using in some way or another the module I have written, since it's pointing from root. How do I fix this? How do I make the module act at the root of the site and not have it interfere with absolute URIs like that? Regards, Etienne
Re: problems with module at root of web site
There are a few ways to go about this one, but here's the solution that I'd use. 1) Install a PerlTransHandler that sets the URI to / or whatever you want to have your PerlHandler work with. Have the transhandler return DECLINED if $r-uri =~ m:^/images/:o; 2) Install a PerlHandler that builds the response for the web. The advantage to doing it this way is: a) this was what apache was designed for (multiple phases) b) allows other handlers to kick in before you build the response (such as mod_access) -- Sean Chittenden [EMAIL PROTECTED] Power tends to corrupt, absolute power corrupts absolutely. -- Lord Acton On Wed, 12 Jan 2000, Etienne Pelaprat wrote: Date: Wed, 12 Jan 2000 01:50:49 PST From: Etienne Pelaprat [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: problems with module at root of web site Hi, I have written a perl module that is meant to run at the root of a web site (blah.com/, let's say), but there are errors whenever it tries to access an image with an absolute URL. For instance, this tag returns a broken image: img src="/images/logo.gif" this, I'm guessing, is because it's using in some way or another the module I have written, since it's pointing from root. How do I fix this? How do I make the module act at the root of the site and not have it interfere with absolute URIs like that? Regards, Etienne
Re: problems with module at root of web site
I have written a perl module that is meant to run at the root of a web site (blah.com/, let's say), but there are errors whenever it tries to access an image with an absolute URL. For instance, this tag returns a broken image: img src="/images/logo.gif" this, I'm guessing, is because it's using in some way or another the module I have written, since it's pointing from root. How do I fix this? How do I make the module act at the root of the site and not have it interfere with absolute URIs like that? How about reading the error messages from the error_log file? See: http://perl.apache.org/guide/debug.html for more info. ___ Stas Bekmanmailto:[EMAIL PROTECTED] http://www.stason.org/stas Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC perl.apache.orgmodperl.sourcegarden.org perlmonth.comperl.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Embperl Emergency!!!
Hi, I just upgraded to Embperl 1.2.1 and I've broken my internet server!$% It appears the problem is I have some perl routines that go print EOF HTML EOF etc.. That was probably the wrong thing to do. I think the HTML is coming out before the http headers. Well I've tried the $optRedirectStdout feature but all the HTML is quoted so I get lt;HTMLgt; etc which is no good. I've tried $optDisableHtmlScan, but that doesn't help. I've tried to print to OUT instead of STDOUT, but OUT doesn't seem to be in the right namespace (No, I'm not a perl guru). And I've tried to pass the OUT descriptor to the routine using \*OUT or *OUT{IO}, but none of this works. HELP! -- Chris Bitmead mailto:[EMAIL PROTECTED]
RE: Embperl Emergency!!!
Hi, I just upgraded to Embperl 1.2.1 and I've broken my internet server!$% It appears the problem is I have some perl routines that go print EOF HTML EOF From which version did you upgrade? This problem should also be there for all older versions I remember... etc.. That was probably the wrong thing to do. I think the HTML is coming out before the http headers. Well I've tried the $optRedirectStdout feature but all the HTML is quoted so I get lt;HTMLgt; etc which is no good. I've tried $optDisableHtmlScan, but that doesn't help. I've tried to print to OUT instead of STDOUT, but OUT doesn't seem to be in the right namespace (No, I'm not a perl guru). And I've tried to pass the OUT descriptor to the routine using \*OUT or *OUT{IO}, but none of this works. Try { local $HTML::Embperl::escmode = 0 ; print HTML::Embperl::OUT EOF HTML EOF } This should work, but it's just a quick hack. I do not promise that Embperl 1.4 or 2.0 will support these global variables, also I guess they will do so. (1.3 surely will not change these things) Gerald - Gerald Richterecos electronic communication services gmbh Internetconnect * Webserver/-design/-datenbanken * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925151 WWW:http://www.ecos.de Fax: +49 6133 925152 -
Re: problems with module at root of web site
"Sean" == Sean Chittenden [EMAIL PROTECTED] writes: Sean There are a few ways to go about this one, but here's the solution Sean that I'd use. Sean 1) Install a PerlTransHandler that sets the URI to / or whatever Sean you want to have your PerlHandler work with. Have the transhandler return Sean DECLINED if $r-uri =~ m:^/images/:o; Sean 2) Install a PerlHandler that builds the response for the web. Or a variation of that, that I like... set up a TransHandler like this: sub handler { # PerlTransHandler return DECLINED unless $r-uri eq "/"; $r-set_handler("perl-script"); $r-push_handlers( PerlHandler = sub { ... your code goes here } return OK; } No need to mess with $r-uri, which will be very confusing if there's an error. Sean The advantage to doing it this way is: Sean a) this was what apache was designed for (multiple phases) Sean b) allows other handlers to kick in before you build the response Sean (such as mod_access) Absolutely. -- 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!
mod_perl mixing up scripts?
Oh great mod_perl sages...I beseech thee on bended knee ( with eyes averted) :) I'd like to preface this by saying that I _hate_ to ask lists for help, so do all I can to research the problem on my own... but I'm not sure I'm even looking in the right place. I've read the mod_perl guide (have it printed and in a binder, in fact). Any assistance (including pointing me in the right direction) would be greatly appreciated. I'm running Apache 1.3.9/mod_perl1.21 on a Mac Workgroup Server, LinuxPPC (1999). I have a group calendar script (FrameCal, http://www.blue-gecko.com/framecal ) that is giving me problems. Actually, I have one calendar working perfectly with no problems. You are supposed to be able to create additional calendars that use the same script. Each calendar has it's own separate folder (with it's own separate characteristics set in a .conf file). You pass the calendar information when you call the script. ( action ="URLtoScript/framecal.pl?calendar=whichCalendar". The problem is that the 2nd calendar has it's own set of authorized users , and event catagories. It will work fine for a while when I restart Apache, but before long it will not let it's users log in. Checking out the drop down menu it becomes apparent that you are looking at the catagories for THE OTHER calendar. Restarting the server fixes the problem again for a while. I thought that setting up entirely different framecal scripts in entirely different folders for the two calendars would solve the problem. So, the script that works is in /cgi-bin/calendar/admissions/framecal.pl and the script that doesn't work is in /cgi-bin/newscalendar/news/framecal.pl but the information from the one calendar is still being confused by the server with the other (though apparently not vice-versa). I believe that I have both locations set up with the exact same permissions/access restrictions, but I suspect that I am missing something that involves the mod_perl aspects of the apache httpd.conf. Is there something that I can learn from calling myserver.edu/status or /perl-status? (It looks like I need to recompile with Devel::Sydump to get much info from perl-status... if I knew what to do with it.) Maybe more info than you need to know, but... here is the list of Apache compiled-in modules... http_core.c mod_env.c mod_log_config.c mod_mime.c mod_negotiation.c mod_status.c mod_include.c mod_autoindex.c mod_dir.c mod_cgi.c mod_asis.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_access.c mod_auth.c mod_setenvif.c mod_perl.c Thanks for any ideas you might have to share. Darren Addy University of Nebraska at Kearney
Re: Apache::Registry and -M
"BM" == Bill Moseley [EMAIL PROTECTED] writes: BM I'd like to be able to move the updated script and module into place and BM either do a -USR1 restart or just wait for the Apache processes to go BM through their normal life cycle. As is, it seems as if I have to bring Well, you can do it in an order that will let you keep working fine. Since you are adding functions to your modules, just move them in place first, send the USR1 signal to make all children exit. Now, move your script in place. The children will notice the change and any that had the old one will restart, but they already have your new modules.
access_log
I was doing the stress testing of the Apache web server by simulating a large number of http requests. After several hours I started getting the following line in my access_log file: 165.78.11.40 - - [11/Jan/200:22:33:45 -0500] "-" 408 - Instead of the URL that was supposed to be accessed. Can somebody please tell me what this means? Petar
Re: access_log
At 11:09 AM 1/12/00 -0500, Gacesa, Petar wrote: I was doing the stress testing of the Apache web server by simulating a large number of http requests. After several hours I started getting the following line in my access_log file: 165.78.11.40 - - [11/Jan/200:22:33:45 -0500] "-" 408 - Instead of the URL that was supposed to be accessed. Can somebody please tell me what this means? Petar It's a bit off-topic... nothing to do with mod_perl. It's reporting a situation when the client starts to send an HTTP request but doesn't complete it - you have an Apache process tied up waiting for the request to complete; it doesn't, and Apache eventually times out the request and so logs it. So look at your simulated client. - Simon - Simon Rosenthal ([EMAIL PROTECTED]) Web Systems Architect Northern Light Technology 222 Third Street, Cambridge MA 02142 Phone: (617)577-2796 : URL: http://www.northernlight.com "Northern Light - Just what you've been searching for"
Re: mod_perl mixing up scripts?
I do not consider myself a mod_perl guru... But, it sounds like you are having troubles with global variables. Once you have the script compiled go here... 1) http://yourserver.com/perl-status 2) click "Compiled Registry Scripts" 3) click on the script in question 4) check on your hashes, scalars, and unknown variable at the bottom. My bet is that some of these is not being properly initialized for each pass through your script. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 12, 2000 9:05 AM Subject: mod_perl mixing up scripts? Oh great mod_perl sages...I beseech thee on bended knee ( with eyes averted) :) I'd like to preface this by saying that I _hate_ to ask lists for help, so do all I can to research the problem on my own... but I'm not sure I'm even looking in the right place. I've read the mod_perl guide (have it printed and in a binder, in fact). Any assistance (including pointing me in the right direction) would be greatly appreciated. I'm running Apache 1.3.9/mod_perl1.21 on a Mac Workgroup Server, LinuxPPC (1999). I have a group calendar script (FrameCal, http://www.blue-gecko.com/framecal ) that is giving me problems. Actually, I have one calendar working perfectly with no problems. You are supposed to be able to create additional calendars that use the same script. Each calendar has it's own separate folder (with it's own separate characteristics set in a .conf file). You pass the calendar information when you call the script. ( action ="URLtoScript/framecal.pl?calendar=whichCalendar". The problem is that the 2nd calendar has it's own set of authorized users , and event catagories. It will work fine for a while when I restart Apache, but before long it will not let it's users log in. Checking out the drop down menu it becomes apparent that you are looking at the catagories for THE OTHER calendar. Restarting the server fixes the problem again for a while. I thought that setting up entirely different framecal scripts in entirely different folders for the two calendars would solve the problem. So, the script that works is in /cgi-bin/calendar/admissions/framecal.pl and the script that doesn't work is in /cgi-bin/newscalendar/news/framecal.pl but the information from the one calendar is still being confused by the server with the other (though apparently not vice-versa). I believe that I have both locations set up with the exact same permissions/access restrictions, but I suspect that I am missing something that involves the mod_perl aspects of the apache httpd.conf. Is there something that I can learn from calling myserver.edu/status or /perl-status? (It looks like I need to recompile with Devel::Sydump to get much info from perl-status... if I knew what to do with it.) Maybe more info than you need to know, but... here is the list of Apache compiled-in modules... http_core.c mod_env.c mod_log_config.c mod_mime.c mod_negotiation.c mod_status.c mod_include.c mod_autoindex.c mod_dir.c mod_cgi.c mod_asis.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_access.c mod_auth.c mod_setenvif.c mod_perl.c Thanks for any ideas you might have to share. Darren Addy University of Nebraska at Kearney
Re: problems with module at root of web site
Mind if I ask a nit-pick of a performance question? Currently speed and performance are of upmost importance (I'm currently involved in a mod_perl vs JServ development race). That being said, isn't pushing a handler onto the request stack slower than predefining a handler that the request falls through to? I could be wrong and haven't tested things otherwise, but, it would seem like pushing a custom handler (granted it's already compiled into byte-code) onto the stack at the time of the request would take slightly longer. I suppose I'd be who of me to test this assertion, but if you have any idea as to wether or not this case ahead of time, I'd be greatly interested in hearing about your past experience. --Sean -- Sean Chittenden [EMAIL PROTECTED] On 12 Jan 2000, Randal L. Schwartz wrote: Date: 12 Jan 2000 07:33:36 -0800 From: Randal L. Schwartz [EMAIL PROTECTED] To: Sean Chittenden [EMAIL PROTECTED] Cc: Etienne Pelaprat [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: problems with module at root of web site "Sean" == Sean Chittenden [EMAIL PROTECTED] writes: Sean There are a few ways to go about this one, but here's the solution Sean that I'd use. Sean 1) Install a PerlTransHandler that sets the URI to / or whatever Sean you want to have your PerlHandler work with. Have the transhandler return Sean DECLINED if $r-uri =~ m:^/images/:o; Sean 2) Install a PerlHandler that builds the response for the web. Or a variation of that, that I like... set up a TransHandler like this: sub handler { # PerlTransHandler return DECLINED unless $r-uri eq "/"; $r-set_handler("perl-script"); $r-push_handlers( PerlHandler = sub { ... your code goes here } return OK; } No need to mess with $r-uri, which will be very confusing if there's an error. Sean The advantage to doing it this way is: Sean a) this was what apache was designed for (multiple phases) Sean b) allows other handlers to kick in before you build the response Sean (such as mod_access) Absolutely.
Re: problems with module at root of web site
"Randal" == Randal L Schwartz [EMAIL PROTECTED] writes: Randal Or a variation of that, that I like... set up a TransHandler like this: Randal sub handler { # PerlTransHandler Randal return DECLINED unless $r-uri eq "/"; Randal $r-set_handler("perl-script"); That should have been -handler, not -set_handler. Durn failing memory. :) Randal $r-push_handlers( PerlHandler = sub { Randal ... your code goes here Randal } Randal return OK; And this needs Apache::Constants qw(OK DECLINED); Randal } And I thought it would be obvious that I build my server with Makefile.PL's "EVERYTHING=1" option by now, but yes, that's a prereq. -- 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: Embperl + Apache::Session
i am using embperl with cookies. i also have this set in httpd.conf PerlSetEnv EMBPERL_COOKIE_DOMAIN .genwax.com PerlSetEnv EMBPERL_COOKIE_PATH / PerlSetEnv EMBPERL_COOKIE_EXPIRES 'Friday, 31-Dec-2010 14:00:00 GMT' how are you checking to make sure cookies are sent? either telnet directly to the port and do a get telnet www.domain.com 80 GET /path/to/page/with/embperl HTTP/1.0 that is two returns above, or better lwp-request -e 'http://www.domain.com/path/to/page/with/embperl|less You should see a SET-COOKIE header. cliff rayman genwax.com Andre Landwehr wrote: Hi, I am trying to use sessionmanagement via Apache::Session together with HTML::Embperl. As I understand from the documentation I just need to configure a storing and a locking mechanism in httpd.conf to do so. After that I should be able to use the %udat hash to store session related data, HTML::Embperl::Session is supposed to do everything from creating a unique session-id to storing it in a cookie or retrieving that cookie again automatically. Unfortunately setting the cookie does not work for me. When I use %udat for the first time a session-id is created (which I checked with a simple "print %udat;"), but the cookie is not sent (and: yes, my Netscape is cookie-enabled...). This is the embperl related stuff from my httpd.conf: -- AddType text/html .epl SetEnv EMBPERL_DEBUG 10477 SetEnv EMBPERL_VIRTLOG /perldebug SetEnv EMBPERL_ESCMODE 0 # optRawInput + optRedirectStdout SetEnv EMBPERL_OPTIONS 16914 # Session management PerlSetEnv EMBPERL_SESSION_CLASSES "MemoryStore NullLocker" PerlModule HTML::Embperl Location /perldebug SetHandler perl-script PerlHandler HTML::Embperl Options ExecCGI /Location Files *.epl SetHandler perl-script PerlHandler HTML::Embperl Options ExecCGI /Files --- I use the following versions: Apache_1.3.9 Apache-Session-1.04 HTML-Embperl-1.2.1 libwww-perl-5.43 URI-1.02 HTML-Parser-2.23 I would be happy if someone could help me with that since I have tried for two days everytime with the same result, which gets quite depressing by now ;-) Btw: To my mind Embperl is really great! I ported a site from PHP to Embperl recently and gained about 80% speed with that, due to faster database access Take care, Andre Part 1.2Type: application/pgp-signature
Re: perl -V ??
the easiest way to tell if you have a module installed is $ perl -MModule::Name if you have the module perl will load it and wait (ctrl-d to exit), and if you don't it will choke. requires in eval { } 's is good for code that will be distributed and needs to do different things based on what's available, but for just testing it's huge overkill. darren Dave Reinhardt ([EMAIL PROTECTED]) wrote: perl -V got me the following, BUT how do I tell if Perl modules: Digest::MD5, Crypt::DES, Crypt::CBC are installed? # perl -V Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration: Platform: osname=freebsd, osvers=3.0-19980804-snap, archname=i386-freebsd uname='freebsd 192.168.173.90 3.0-19980804-snap freebsd 3.0-19980804-snap #13: thu oct 1 21:06:05 edt 1998 admin@:usrsrcsyscompilepowerbsd i386 ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='cc', optimize='-O', gccversion=2.7.2.1 cppflags='-I/usr/local/include' ccflags ='-I/usr/local/include' stdchar='char', d_stdstdio=undef, usevfork=true intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='ld', ldflags =' -L/usr/local/lib' libpth=/usr/lib/aout /usr/local/lib /usr/lib libs=-lm -lc -lcrypt libc=/usr/lib/aout/libc.so.3.1, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-DPIC -fpic', lddlflags='-Bshareable -L/usr/local/lib' Characteristics of this binary (from libperl): Built under freebsd Compiled at Oct 8 1998 12:38:21 @INC: /usr/local/lib/perl5/5.00502/i386-freebsd /usr/local/lib/perl5/5.00502 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 . -- Wise people think all they say; fools say all they think.
Embperl Emergency..
Hi, I have just upgraded to Embperl 1.2.1 and I seem to have stuffed my web server. The problem seems to be that I have some perl subroutines that write directly to STDOUT... print EOF HTML EOF This is probably the wrong thing to do, but it used to work fine. Anyway, I've now tried $optRedirectStdout. That's an improvement but it quotes everything lt;HTMLgt; which is not what I want. I've tried $optDisableHtmlScan but that doesn't help either. I've tried printing to OUT, but the routines are in another perl module and it can't find OUT for some reason (I'm not a perl guru). I've tried passing OUT to the routines as a parameter but I can't figure the syntax or something because it doesn't work for me (using the \*OUT or *OUT{IO} syntax. Help! Need to get this server back on line. -- Chris Bitmead mailto:[EMAIL PROTECTED]
Re: Apache::ASP
don Wang wrote: Joshua, (and all) Thanks very much for your reply. Following your suggestions, I have tried again this morning, to no avail. I am sure I missed something obvious here. although serveral people have mentioned compiling mod_perl STATICALLY with Apache, I have not found clear instructions on EXACTLY how to do it. Following the 10-step instruction at http://perl.apache.org/guide/install.html, still several problem came up. If you avoid doing ... The DSO mechanism is provided by Apache's mod_so.c which needs to be compiled into the httpd program. This is automatically done when DSO is enabled for module mod_xxx via configure --enable-module=xxx or by explicitly adding mod_so via configure --enable-module=so. you will get a static build. You need to make install mod_perl, before you make test mod_perl. After make test works, then copy your new httpd to your final home /usr/local/apache/... Once you have the new server copied over it should have the mod_perl tag in the header too. -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Embperl emergency
Hi, I've just upgraded to Embperl 1.2.1 and I've stuffed my webserver. It appears the problem is that I've been writing code like this.. print EOF HTML EOF This used to work, but I guess it's wrong. I've tried $optRedirectStdout but it quotes everything... lt;HTMLgt; which is not what I want. I've tried $optDisableHtmlScan, but that doesn't seem to help in this case. The code in question is in another perl module that doesn't seem to have access to OUT, so I can't print to that. I've tried passing OUT as a parameter to the subroutine (\*OUT or *OUT{IO}) but I can't seem to get the syntax right or something because it just complains that $OUT is undefined. Can someone help get my webserver back on line!? Thanks, Chris Bitmead mailto:[EMAIL PROTECTED]
Re: Embperl emergency
print qq(Using qq() works remarkably well and preserves newlines, tabs, etc. Here docs are... legacy, in my mind and are less friendly to editors (such as emacs). See if moving to qq() solves your problems, if not, then ... I dunno.); This is more along the lines of a PS than anything else, but it works for all interpolated envs in perl. Ex: print qq(the result of 1 + 1 = @{[1 + 1]}\n); Inline code evaluation w/in a string... combine this w/ the ternery operator ((EXPR) ? (TRUE) : (FALSE)) and you've got a pretty inline scripting tool that's not emb perl. The only gotcha is that you can't have multiple statements (ex: @{[ EXPR; EXPR2; EXPR3 ]}). That should turn up an error. Anyway, fyi. --SC -- Sean Chittenden [EMAIL PROTECTED] My CODE of ETHICS is vacationing at famed SCHROON LAKE in upstate New York!! On Thu, 13 Jan 2000, Chris wrote: Date: Thu, 13 Jan 2000 07:55:36 +1100 From: Chris [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Embperl emergency Hi, I've just upgraded to Embperl 1.2.1 and I've stuffed my webserver. It appears the problem is that I've been writing code like this.. print EOF HTML EOF This used to work, but I guess it's wrong. I've tried $optRedirectStdout but it quotes everything... lt;HTMLgt; which is not what I want. I've tried $optDisableHtmlScan, but that doesn't seem to help in this case. The code in question is in another perl module that doesn't seem to have access to OUT, so I can't print to that. I've tried passing OUT as a parameter to the subroutine (\*OUT or *OUT{IO}) but I can't seem to get the syntax right or something because it just complains that $OUT is undefined. Can someone help get my webserver back on line!? Thanks, Chris Bitmead mailto:[EMAIL PROTECTED]
Apache 1.3.9 + mod_perl 1.21 + Solaris 2.7 dumps core
$ httpd -X Segmentation Fault(coredump) I thought this was the old 'apache modperl use a different malloc' problem, so I recompiled Perl with -Uusemymalloc, along with all the other installed modules. No joy - it still core dumps. Here's the stack trace: (/package/SC5.0/bin/../WS5.0/bin/sparcv9/dbx) where =[1] boot_Data__Dumper(0x4, 0xfef582a0, 0xfef62f54, 0x285814, 0xff0e7734, 0xfeff52f4), at 0xfefe4e0c [2] Perl_pp_entersub(0xfef62f1c, 0xfef582a0, 0xfef67734, 0x2857a8, 0x7, 0x33f170), at 0xfeef4dd4 [3] Perl_runops_standard(0xfef582a0, 0xfef676f8, 0x265a20, 0xfef62f10, 0xe6, 0xfef676f8), at 0xfeeeccb0 [4] perl_eval_sv(0xfef676f8, 0x0, 0xfef67200, 0x2, 0x2bc12c, 0xff1bdbc4), at 0xfeea33ac [5] perl_require_module(0x93eb0, 0x0, 0xff17597c, 0x0, 0xffbefdcc, 0x10), at 0xff13d754 [6] perl_cmd_module(0x93d20, 0x93db8, 0x93eb0, 0xff17597c, 0xffbefb04, 0xa), at 0xff1377a4 [7] invoke_cmd(0xff177e64, 0xffbefb04, 0x93db8, 0xffbedaab, 0xffbefb04, 0xff177e64), at 0x32790 [8] ap_handle_command(0x6f810, 0xff177e64, 0xffbedaa0, 0x258390, 0x0, 0x93200), at 0x32b7c [9] ap_srm_command_loop(0x2000, 0x93200, 0x93200, 0xffbefb04, 0x2f687474, 0x2f616363), at 0x32c50 [10] ap_process_resource_config(0x93b10, 0x893c4, 0x92640, 0x258250, 0x92668, 0x92640), at 0x32fd8 [11] ap_read_config(0x92640, 0x258250, 0x893c4, 0x8dab8, 0x0, 0x92640), at 0x337cc [12] standalone_main(0x8dc00, 0x8d800, 0x8dabc, 0x260b8c, 0xb400, 0x8), at 0x3c69c [13] main(0x8d800, 0x8dc00, 0x2, 0x86800, 0x0, 0x0), at 0x3d05c i.e. in the XS startup code for Data::Dumper (which *is* built with system malloc). Any clues or cuggestions, anyone? Here's the rest of my config information: My config: Apache 1.3.9 mod_perl 1.21 Solaris 2.7 $ cat makepl_args.modperl APACHE_SRC=/home2/web/build/apache_1.3.9/src EVERYTHING=1 USE_APXS=1 WITH_APXS=/home2/web/apache_1.3.9/bin/apxs $ perl -V Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=solaris, osvers=2.7, archname=sun4-solaris uname='sunos fubar 5.7 generic_106541-08 sun4u sparc sunw,ultra-30 ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='cc', optimize='-xO2', gccversion= cppflags='-I/usr/local/include' ccflags ='-I/usr/local/include' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldl -lm -lc -lcrypt libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R /usr/local/lib/perl5/5.00503/sun4-solaris/CORE' cccdlflags='-KPIC', lddlflags='-G -L/usr/local/lib' Characteristics of this binary (from libperl): Built under solaris Compiled at Jan 12 2000 11:44:51 @INC: /usr/local/lib/perl5/5.00503/sun4-solaris /usr/local/lib/perl5/5.00503 /usr/local/lib/perl5/site_perl/5.005/sun4-solaris /usr/local/lib/perl5/site_perl/5.005 . Thanks, Alan Burlison
alarm() in Apache::Registry
Does anyone have experience using an alarm() call under Apache::Registry? Should I set alarm(0) as my script "exits" or is it ok to leave it set? I'm using it to cap runaway scripts. -j
Embperl emergency...
Sorry if you got my previous mail a few times. I successfully subscribed to modperl (including auth) and then... nothing. Not sure what's happening there, but I'm subscribed now under a different email. Should be ok now. (cross fingers). The $escmode thing doesn't seem to work for me. In my srm.conf I have optRedirectStdout set. My embperl code looks a bit like this... [- use foo; -] [- $escmode = 1; -] [- foo-bar() -] And inside foo.pm bar() { print EOF HTML EOF } I've used $escmode before inside regular embperl successfully, but it doesn't seem to be doing for me in this case. I also tried the full name of escmode (HTML::escmode or whatever it is Gerald suggested. Don't have it in front of me now). I was using 1.2.0b5 I believe, and it all seemed to work. Now the html comes out before the http headers unless I set optRedirectStdout.
Re: problems with module at root of web site
Sean Chittenden wrote: Mind if I ask a nit-pick of a performance question? Currently speed and performance are of upmost importance (I'm currently involved in a mod_perl vs JServ development race). If you're on Linux, I can tell you right now that mod_perl is significantly faster than the fastest servlet runner (http://www.caucho.com/) with the fastest JVM (IBM 1.1.8 final release). If you're on Solaris, all bets are off. I suspect you should be able to clobber JServ in the performance department on any platform though. - Perrin
Re: alarm() in Apache::Registry
Does anyone have experience using an alarm() call under Apache::Registry? http://perl.apache.org/guide/debug.html#Handling_the_server_timeout_case Should I set alarm(0) as my script "exits" or is it ok to leave it set? I'm using it to cap runaway scripts. Try http://www.singlesheaven.com/stas/modules/Apache-SafeHang-0.01.tar.gz (It's not on CPAN yet) ___ Stas Bekmanmailto:[EMAIL PROTECTED] http://www.stason.org/stas Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC perl.apache.orgmodperl.sourcegarden.org perlmonth.comperl.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: Apache::ASP
Don, Don't do that Location /ASP/ thing yet... let the .htaccess in site/eg override things. The PerlSerVar won't work because its PerlSetVar. The black thing is probably a bug that came up recently, set DynamicIncludes to 1 in the .htaccess file, and the page should be white. That you are seeing links means Apache::ASP is working !! Read up on how to config the site/eg scripts at: http://www.nodeworks.com/asp/config.html If you read about the Location tag, you have gone too far. Congrats on a successful mod_perl install! It will be well worth it I assure you. -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051 don Wang wrote: Joshua, Thanks again for your tips. After a complete installation of perl, mod_perl, and Apache (details below), I am ALMOST there ... : after starting apache/1.3.9 (mod_perl/1.21), I can see a BLACK page with many links in some kind of not quite orderly table layout (rather than plain script as of yesterday). It seems that asp is there, yet not quite, since the looks on many other pages are wrong and there is no asp functionality. As for configuration, I have the following in the httpd.conf file: Directory / Options FollowSymLinks AllowOverride All /Directory Location /ASP/ SetHandler perl-script PerlHandler Apache::ASP # PerlSerVar Global /tmp /Location for now, the httpd directory is located at: /usr/local/apache/htdocs/ with Joshua's site/eg/ files at eg directory under htdocs. I have to comment out PerlSetVar, otherwise, httpd won't start and error msg says "invalid command PerlSetVar, perhaps mispelled or module not supported". So, questions are: Is my mod_perl and asp really working? how can I tell? why can't I use PerlSetVar? what's implication of the skipped test when I install mod_perl? Are they needed? Thanks, Don --here's what I did: -- After reading somewhere about possible broken perl from RedHat package, I reinstalled a fresh Perl_5.00503 (also have to include six other modules, including libwww, mime-base64, etc.). in CPAN.pm, a few tests (request, perlrunrx, cookie, and module) were skipped and one failed (sandwich) after I did "install Bundle::Apache". I then went ahead and installed mod_perl with (perl Makefile.PL USE_APACI=1 EVERYTHING=1, make, make install, make test). It again reported a few failed tests as above. I went on to install Apache, and ASP.pm. and this time, it seemed to worked, although mod_perl could still be faulty, since I don't quite know how to test it yet. Oh, one more thing: silly but I definetely overlooked, and if not for someone else email post, I would never know: I have to find where the newly compiled httpd program is upon compilation and installtion, and remember to use the new one rather than the old one as defined by default path. Joshua Chamas wrote: don Wang wrote: Joshua, (and all) Thanks very much for your reply. Following your suggestions, I have tried again this morning, to no avail. I am sure I missed something obvious here. although serveral people have mentioned compiling mod_perl STATICALLY with Apache, I have not found clear instructions on EXACTLY how to do it. Following the 10-step instruction at http://perl.apache.org/guide/install.html, still several problem came up. If you avoid doing ... The DSO mechanism is provided by Apache's mod_so.c which needs to be compiled into the httpd program. This is automatically done when DSO is enabled for module mod_xxx via configure --enable-module=xxx or by explicitly adding mod_so via configure --enable-module=so. you will get a static build. You need to make install mod_perl, before you make test mod_perl. After make test works, then copy your new httpd to your final home /usr/local/apache/... Once you have the new server copied over it should have the mod_perl tag in the header too. -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051 -- *** [EMAIL PROTECTED] Unified Access Communications, Inc. 200 Lincoln Street, Suite 201 Boston, MA 02111 phone: (617) 695-0137, ext. 13 fax: (617) 695-0984 ***