[mp1] 64 bit perl/apache and 32 bit shared objects

2004-10-05 Thread Robert Landrum
perl core dumps. I think the problem is that the conversion from 64-bit T_IVs to ints is 32 bits too long for the shared methods, but I'm not 100% certain I'm right. Anyone ever run into this problem before? Can I solve it with XS? Rob -- Robert Landrum Systems Programmer -- Report

Re: reposting form values

2006-11-28 Thread Robert Landrum
Torsten Foertsch wrote: On Tuesday 28 November 2006 21:31, Patrick Galbraith wrote: Quick question - how does one do a repost (using POST, not GET) form values? This would be in a redirect TransHandler. Your only chance is to proxy the request to the other server. You cannot use a Location h

Re: DBI AutoCommit goes away when db connection is killed

2006-11-28 Thread Robert Landrum
Lev Lvovsky wrote: In testing out persistent connections while using transactions, we've noticed that while in a loop which continuously begins and ends a transaction, killing the persistent connection which Apache::DBI is maintaining causes the still-running handler to report things like: erro

Re: DBI AutoCommit goes away when db connection is killed

2006-11-29 Thread Robert Landrum
Lev Lvovsky wrote: Once you reconnect, the connection is persistent again. At least, that's been my experience with postgresql. This is exactly what I've been thinking to do, but I've not seen anything within Apache::DBI that allows me to reconnect per se. How do I perform that action? Al

Re: Instability at startup for Apache2/mod_perl2 using worker MPM

2006-11-30 Thread Robert Landrum
Perrin Harkins wrote: David Scott wrote: I've built Apache 2.2.3 and mod_perl 2.0.3 with libapreq 2.08 and the worker MPM. There appears to be some kind of race condition at startup that prevents the server from coming up. This only happens once in a while, and can be fixed by some minor con

Re: reset multiple cookies

2006-12-11 Thread Robert Landrum
Marc Lambrichs wrote: Date: Sun, 10 Dec 2006 12:50:09 GMT Server: Apache Set-Cookie: auth_tkt=; path=/; domain=main.domain.com; expires=Sun, 10-Dec-2006 11:50:09 GMT Set-Cookie: auth_tkt=; path=/; domain=first.domain.com; expires=Sun, 10-Dec-2006 11:50:09 GMT Set-Cookie: auth_tkt=; path=/; doma

Re: Forking to an interactive program under mod_perl

2006-12-12 Thread Robert Landrum
Alex Beamish wrote: What I'm trying to do is come up with scaled page images from a PDF on the fly. Thus, I want to launch Ghostscript and then ask for a couple of page images. So, launching Ghostscript and getting the first page might happen on the first request; subsequent requests would come

Re: Forking to an interactive program under mod_perl

2006-12-13 Thread Robert Landrum
Alex Beamish wrote: I'll deal with multiple documents with some combination of stale timers and LRU slots, but that's not really what I see as the most complicated or difficult part of this problem. For this particular application, my inactivity timer will probably by 10-15 minutes, and I'll ex

Re: The case of the disappearing plus sign

2006-12-18 Thread Robert Landrum
Chris Schults wrote: It appears that the "+" is getting stripped out at some point as the script is returning results for "water pollution" instead of "water+pollution". Is it possible that Apache is the culprit or should we be looking more closely at our script or rewrite rule? The test would

Re: localhost vs vhost problem

2006-12-20 Thread Robert Landrum
Well.. For one thing, vhost1.turnbui.net isn't a ServerName entry or a ServerAlias entry. I'd start by adding that. Rob turnbui wrote: ServerName ianst.homeip.net DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/iansthtdocs" # ErrorLog logs/ianst-host-error.log # Custom

Re: localhost vs vhost problem

2006-12-20 Thread Robert Landrum
turnbui wrote: Sorry Rob, just my vain attempt to protect the innocent. In fact it is ianst.homeip.net that I am using. Sorry to mislead. Okay. So just to rehash here... ASP does not work at: http://ianst.homeip.net/asp ASP works correctly at: http://localhost/asp localhost isn't a server l

Re: localhost vs vhost problem

2006-12-20 Thread Robert Landrum
Perrin Harkins wrote: Robert Landrum wrote: localhost isn't a server listed in your VirtualHost section in either ServerName or ServerAlias. That means that the VirtualHost section isn't even a consideration when hitting localhost. Doesn't that mean it just takes the first V

Re: Bug Report

2007-01-04 Thread Robert Landrum
Snook, Adrian (London) wrote: 3. This is the core dump trace: (if you get a core dump): Core was generated by `/home -k start'. Program terminated with signal 11, Segmentation fault. #0 0x002f201e in free () from /lib/tls/libc.so.6 (gdb) bt full #0 0x002f201e in free () from /lib/tls/libc.so

Re: Lost ENV variable value .........

2007-01-11 Thread Robert Landrum
Tracy12 wrote: Thanks, If this is the case, How can we preserve the REMOTE_USER value and forward/redirect to the other application ( running on same Apache Server) which is based on the REMOTE_USER environment variable, which is set in my perl module in the first application. I was under th

Re: Lost ENV variable value .........

2007-01-11 Thread Robert Landrum
Perrin Harkins wrote: After successful authentication we need to pass the control to another application(which is running on the same apache server) which depend on the REMOTE_USER value which we set. That will work fine, as long as your auth handler runs in the same request as the thing that w

Re: Lost ENV variable value .........

2007-01-11 Thread Robert Landrum
Tracy12 wrote: 1) As we dont use the apache basic authentication but our CAS authentication. If the authentication is not successful how can we redirect to the CAS login page. Ah-ha... So CAS authentication is done via a webform of some type, which means that it uses cookies. Am I correct i

Re: Port/Sheme information

2007-01-16 Thread Robert Landrum
Tracy12 wrote: How can we retrieve the URL Scheme (http/https ?) from a perl module, Port given that only input parameter is $r should we use my $uri = Apache::URI->parse($r) and $uri->scheme; I use $r->get_server_port. If it's 80 it's http, if it's 443, it's https. Of course, this

Re: Redirects?

2007-01-17 Thread Robert Landrum
Will Fould wrote: I have a strange issue with a particular script that sometimes (often) generates a 302 to another script without a clear reason why. Oddly enough, I simply placed a few "warn('blah')" code snippets to crudely determine from the error log where it was happening in production

Re: file descriptor for client socket?

2007-01-17 Thread Robert Landrum
Daniel Risacher wrote: Is it possible to get the file descriptor for the client socket from the RequestRec? I.e. something like $r->FILENO (which doesn't seem to work) or perhaps $r->connection->client_socket->os_sock (os_sock exists in the APR structure in C, but there doesn't seem to be a p

Re: Session Handling/Set Session attributes

2007-01-17 Thread Robert Landrum
Tracy12 wrote: My perl authentication handler works fine BUT the biggest problem inside my Auth handler I do some resource intenstive tasks and if everything successful set the REMOTE_USER env variable. But for the subsequent requests from the same user (after the initial Authentication is succe

Re: Catching errors

2007-01-18 Thread Robert Landrum
Jonathan Mangin wrote: sub handler { my $r = shift; my $req = Apache2::Request->new($r); my $foo; # eval {$foo = $req->param('foo')}; $foo = $req->param('foo'); You might want to make sure $r is really $r. If you configure apache such that you use PerlHandler Foo->handler, I be

Re: mod_perl best practices cleanup

2007-01-22 Thread Robert Landrum
Tracy12 wrote: I tried to declare use vars qw( $SESSION_CLEANUP_COUNTER); and increment within the code doent seem to work, Shoud i increment this in a specific hanlder. You really need to heed the advice of the list and consider using the a cron job to expire old sessions. It's really not

Re: Troubleshooting Apache2 Segfaults

2007-01-24 Thread Robert Landrum
Joel Gwynn wrote: Here's my backtrace, any ideas? #0 0xb7a58743 in modperl_dir_config (my_perl=0x81b6eb0, r=0x823ce98, s=0x203a6e6f, key=0x8800c38 "CONFIG_FILE", sv_val=0x0) at modperl_util.c:516 #1 0xb78dae84 in XS_Apache2__RequestRec_dir_config (my_perl=0x81b6eb0, cv=0x82cd074) at Requ

Re: Troubleshooting Apache2 Segfaults

2007-01-24 Thread Robert Landrum
Joel Gwynn wrote: Interesting. I just might be doing that: $config_file = $self->param('r')->dir_config('CONFIG_FILE'); In my section, I have this: PerlSetVar CONFIG_FILE /projects/funnyr_dev/private/config.ini And of course I'm not using flock on that file. Hmmm. Try changing that up...

Re: Troubleshooting Apache2 Segfaults

2007-01-24 Thread Robert Landrum
Perrin Harkins wrote: My guess is that $self has a lifespan longer than one request, so you are trying to use a $r object from a previous request. Would $r still be defined in that instance? Rob

Re: undefined routines & mod_dbd

2007-01-30 Thread Robert Landrum
Garnier, Jeremie wrote: use Apache2::Module (); # test if an Apache module is loaded if (Apache2::Module::loaded('mod_dbd.c')) { … } But it dones: Undefined subroutine &Apache2::Module::loaded call at… I suspect that this may be because you're not actually running in mod_perl.

Re: Where does "MoveNext" belong to?

2007-02-06 Thread Robert Landrum
Patrix Diradja wrote: while(!$rsnya->{EOF}){ my $tab4l = $rsnya->fetchrow_array; print "\$tab4l: $tab4l \n"; $rsnya->movenext; } Not a mod_perl question, per se, but try while(my $tab4l = $rsnya->fetchrow_array) { print "\$tab4l: $tab4l\n"; } Rob

Re: Perl Authentication Handler and Cookie Issue

2007-02-16 Thread Robert Landrum
Sumit Shah wrote: Hello, I have a Mod Perl authentication handler and it needs to retrieve the session id from a cookie. It is unable to retrieve any cookies and I get the following error. It does not even print any of the cookies. I would appreciate any help with this. my $token = $c

Re: Server Side Image Maps & libapreq / cgi

2007-02-20 Thread Robert Landrum
Jonathan Vanasco wrote: How can I reliably catch this under libapreq / cgi ? ( the former for current use, the latter just-for-kicks ) As far as libapreq is concerned, I can't find any way -- it seems to be an odd special-case html spec. The short answer is: don't use server side image map

Re: Sry, 1 more question.. Apache2::Reload goofiness

2007-02-20 Thread Robert Landrum
[EMAIL PROTECTED] wrote: This is getting very frustrating, so I guess I should ask about this before I scrap the whole project and go back to CGI. I'm using Apache::Reload during development since I'm constantly making changes to code. However, it does not appear to be working right. Is t

Re: Server Side Image Maps & libapreq / cgi

2007-02-20 Thread Robert Landrum
Jonathan Vanasco wrote: On Feb 20, 2007, at 3:56 PM, Robert Landrum wrote: The short answer is: don't use server side image maps. That's not an option. I need to catch the xy on a gif. And yes, the long answer is to parse the URI yourself. arhh. ok. already doing tha

Re: Perl Authentication Handler and Cookie Issue

2007-02-20 Thread Robert Landrum
Sumit Shah wrote: I printed out the contents of the Cookie attribute in the request header and I can see the cookie present in the header. I read all the contents into a hash and then try to check for its existence. The if(exists($hashMap{'SSOTokenID'})) condition fails. Does it have anything

Re: Sample Web Application that uses mod_perl

2007-02-22 Thread Robert Landrum
aqua wrote: Dear Group, Some of you might have tried the mod_perl for the first time and tested with simple web application and it should be there some-where in your system. Could you please post a few. The problem is that it isn't exactly a simple thing. It sounds like you're looking for

Re: Error intercept.

2007-02-22 Thread Robert Landrum
Benoit Plessis wrote: $r -> headers_out->set('Content-Length', length $error_page); Hmm... Incident sur l'hebergement

Re: PerlAuthenHandler called twice?

2007-02-22 Thread Robert Landrum
Hadmut Danisch wrote: For some reason the module is called twice for every request. Is this a HEAD/GET problem? Maybe you're seeing the browser doing a HEAD request, then a full GET request? Rob

Re: Using or working around File::MMagic under mod_perl

2007-02-27 Thread Robert Landrum
Mark Stosberg wrote: Hello, Recently I ran into a bug with File::MMagic where it returns inconsistent results under mod_perl. Could it simply be a matter of fixing the use of the DATA handle, as Stats suggest here? http://mail-archives.apache.org/mod_mbox/perl-modperl/200403.mbox/[EMAIL PROTE

Re: Zend PHP

2007-03-08 Thread Robert Landrum
Martin Moss wrote: I just had a demo of the Zend Platform and framework for php. It's got some really nice stuff, but ultimately the reason we may decide to ditch perl and move to php (h I know booo) will be down to support. OR lackthereof for Perl... I've been writing perl for 10 years no

Re: Zend PHP

2007-03-09 Thread Robert Landrum
Martin Moss wrote: Many thanks to you all for your posts, Much food for thought... ultimately the decision is out of my hands, which is why I'm looking for useful perl based alternatives to propose to the powers that be. My favorite perl based alternative is HTML::Mason. Simple, fast, and goo

Re: UTF8 fun with SOAP::Lite and mod_perl 1.3.33

2007-03-16 Thread Robert Landrum
Drew Wilson wrote: But I cannot figure out WHERE this conversion is being done. I've picked through SOAP::Lite enough to know that unicode conversions are probably more than it knows how to handle. However, SOAP::Data::encode_data uses a regex to munge data. Perhaps there's a conversion h

Re: MP1 Security issue

2007-03-26 Thread Robert Landrum
Chris Shiflett wrote: That's a weak defense. If you're a proponent of full disclosure, say so, but don't use ignorance as your defense in the same email where you claim to not be a "dumb guy." I am a dumb guy, and I would have done the exact same thing Randal did. I just don't think about s

Re: "Insecure dependency in eval while running setgid" error

2007-03-27 Thread Robert Landrum
Fred Moyer wrote: Or maybe this is a bug in getegid where it's not clearing a previous memory state. What platform is this on? sun4-solaris His first post had a list of modules in a stack trace, which is where I grabbed that. I googled, but didn't find anything relevant. :( See if fgre

Re: "Insecure dependency in eval while running setgid" error

2007-03-28 Thread Robert Landrum
[EMAIL PROTECTED] wrote: Unfortunately turning taint mode off isn't an option for me. My application is client facing and so we want to continue to make use of the security mechanism that taint mode gives us. Keep taint mode on in dev, so you can identify your issues in development, then turn

Re: "Insecure dependency in eval while running setgid" error

2007-03-28 Thread Robert Landrum
Perrin Harkins wrote: On 3/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Keep taint mode on in dev, so you can identify your issues in > development, then turn in off in prod. Is that actually the generally recommended approach? It's hard to know for sure that you've tried every code

Re: "Insecure dependency in eval while running setgid" error

2007-03-29 Thread Robert Landrum
[EMAIL PROTECTED] wrote: I'm hoping tho that if I can create a small test case under mod_perl then that opens up myself/someone-on-the-list trying it with other combinations of perl & mod_perl. If you log the pid in the access file, you should be able to determine the serious of page hits tha

Re: SOPE::Lite / prcessing complex data types at server side

2007-04-04 Thread Robert Landrum
Tobias Regneri wrote: package MyService; sub AddGroupAttributes { ($self, $provider, $group, $attrlist) = @_; ($name, $hashref) = split('=', $attrlist); $params = $$hashref; ... } the variables $provider and $group are set correctly but the hash for the list items is empty. Do I

Re: SOAP::Lite / processing complex data types at server side

2007-04-05 Thread Robert Landrum
Tobias Regneri wrote: Given the following xml structure of the data to process Name1 Val1 Name2 Val2 SOAP::Lite will build the internal representation $VAR1 = [ bless( { 'ListItem' => [ bles

Re: 200 vhosts, 5 sets of libs, 2GB RAM, 1 httpd (seeking advice)

2007-04-11 Thread Robert Landrum
Chris Hagglund wrote: The trouble is, as each vhost loads this config file for its plain and SSL vhost directives, the amount of memory being used seems to be going up, and restarting apache is taking longer and longer. Intead of loading it over and over again (twice for vhosts with ssl!) I am

Re: Charts and Graphs

2007-04-13 Thread Robert Landrum
Bill Whillers wrote: I'm wondering what people are using for efficiently generating charts and graphs on the fly from within a mod_perl environment. I've been using GD::Graph for a while but I'm hoping to get a bit more feature-deep. I'm not terribly concerned about getting a bit more complic

Re: Lock Files - File is permanently locked

2007-04-13 Thread Robert Landrum
Justin Luster wrote: Does anyone know what might be happening? We are only using Apache::Registry in this instance. I can’t see how a lexically scoped file handle that is being locked is not being unlocked once the process ends. The process isn't ending if you're using Apache::Registry. I

Re: Lock Files - File is permanently locked

2007-04-13 Thread Robert Landrum
Justin Luster wrote: Here is an example of a call to OpenFile(). You will notice that I'm additionally locking the file itself as well as the lock file (I figured it would not hurt to have both methods): my $LockFileHandle = authlib::FileLock("udata_" . $strRespNum . "_lck.cgi", 1); #Read rest

Re: Lock Files - File is permanently locked

2007-04-13 Thread Robert Landrum
Justin Luster wrote: Seems like an awful lot of code... open(DATAFILE,">$strDataFileName") or die; flock(DATAFILE,LOCK_EX); seek(DATAFILE,0,0); eval { authlib::RestartQNameWrite(\*DATAFILE,$strRestartQName); }; flock(DATAFILE,LOCK_UN); close(DATAFILE); if($@) { die $@; } *sighs* I need

Re: Malformed header from script

2007-04-16 Thread Robert Landrum
michael watson (IAH-C) wrote: Sorry for the confusion The code also actually attempts to print out HTML headers ie " etc" but these DO NOT come through to the webpage - instead, a bunch of special characters are printed out... Right... because the and tags are being (incorrectly) shov

Re: Malformed header from script

2007-04-18 Thread Robert Landrum
michael watson (IAH-C) wrote: [Wed Apr 18 09:56:55 2007] [notice] Apache/2.2.4 (Unix) mod_perl/2.0.3 Perl/v5.8.0 configured -- resuming normal operations [Wed Apr 18 09:56:57 2007] [error] [client 149.155.40.20] malformed header from script. Bad header=: mapview [Wed Apr 18 09:56:57 2007] [warn]

Re: Getting user input during apache startup

2007-05-02 Thread Robert Landrum
Krist van Besien wrote: The code works insofar that it waits 5 seconds and than proceeds with the default I set, but it completely ignores any keypresses I make. It is as if STDIN is not available at the time this code runs. If I replace the ReadKey(5) with a ReadKey(5,STDIN) I get a syntax error

Re: TIF image file

2007-05-08 Thread Robert Landrum
Michael Peters wrote: Vaughn, Terry wrote: I have some TIF files that I transferred from a windows box to a linux box over a Samba connection. I cannot get Apache to display the file.TIF with this simple .htm It's not apache that's having problems. I don't believe TIF images can be displa

[mp1] Eval in Mason causes segfault

2007-09-05 Thread Robert Landrum
I've run into a strange error recently and wanted to see if anyone else had come across this. Basically, I have have a set of database handles created as globals in the HTML::Mason::Commands namespace. To use these, we assign them to an object. i.e.: my $obj = new Foo; $obj->{my_dbh} = $my_

[mp2] HTML::Mason and Missing content

2008-04-07 Thread Robert Landrum
We're seeing some very strange behavior with HTML::Mason/Apache 2.2/MP2 that only affects a few of our files. I'm able to reproduce it reliably. We have a custom handler method that handles all requests to our site by passing them off to HTML::Mason (with exceptions for images, and the like).

Re: [mp2] HTML::Mason and Missing content

2008-04-08 Thread Robert Landrum
Felipe de Jesús Molina Bravo wrote: Hi how did you installed modperl ... static or dinamic? Dynamic... But I'm not getting segfaults. The issue was caused by having PerlSendHeader On. Switching it to off, the problem went away. Rob

[JOB] Perl/mod_perl/Mason Developer

2008-05-06 Thread Robert Landrum
HTML::Mason, Apache, mod_perl. Unix based OS experience is required. Desired skills: PostgresQL, Sybase, Oracle, RPM. Java and perl based web services experience is a plus. Please send resume to Robert Landrum: [EMAIL PROTECTED]

Re: [JOB] Perl/mod_perl/Mason Developer

2008-05-06 Thread Robert Landrum
This is an onside position only in Dulles, VA. Sorry for the confusion... Rob Robert Landrum wrote: The Infrastructure Development team at AOL is looking to hire a perl developer to assist in the development of our internal infrastructure. The good: Great pay and benefits. The work is