a require problem

2008-08-29 Thread Jeff Pang
I have began a project, but meet some problems,:) say there are three dirs: |- cgi-bin |- cgi-bin - lib |- cgi-bin - template I have a script in cgi-bin, which requires the template file from template dir. This script also uses a library file (.pm) from lib dir. Finally the library need to requ

Re: a require problem

2008-08-29 Thread Sean Davis
On Fri, Aug 29, 2008 at 9:54 AM, Jeff Pang <[EMAIL PROTECTED]> wrote: > I have began a project, but meet some problems,:) > > say there are three dirs: > > |- cgi-bin > |- cgi-bin - lib > |- cgi-bin - template > > > I have a script in cgi-bin, which requires the template file from template > dir. >

RE: a require problem

2008-08-29 Thread Berg, Eric
Jeff, I'm running into issues with mod_perl2 that sound like they may be related. Are you, in fact, running this script under mod_perl? Doesthe myttt.tmpl file that you refer to contain Perl code that is to be eval'ed in your myscr.pl? Just yesterday I ran into a problem in which using do( $fil

RE: a require problem

2008-08-29 Thread Clinton Gormley
Is this not a current-working-directory issue? This isn't terribly well documented on the mod_perl site, but from http://perl.apache.org/docs/2.0/api/ModPerl/Registry.html META: document that for now we don't chdir() into the script's dir, because it affects the whole process un

RE: a require problem

2008-08-29 Thread Berg, Eric
Not for me. I hit the pwd issue early on in my (currently incredibly frustrating and dubious-to-the-point-of-abandonment) migration to Apache 2.2. It doesn't sound like that's Jeff's problem either; he says that the routines can't be found, not the file. E > -Original Message- > From:

RE: [mp2] make fails - `modperl_thx_interp_get' undeclared here (not in a function)

2008-08-29 Thread Mario Rodríguez
Hi Charlie: I have installed httpd-2.2.9 and static mod_perl2.0.5-dev, i had the same problem, well, i had many problems, but when this problem appeared, you just have to comment the lines where appear these headers of functions that are never used in the file modperl_exports.c 1164 #ifndef m

Re: a require problem

2008-08-29 Thread Perrin Harkins
On Fri, Aug 29, 2008 at 10:53 AM, Berg, Eric <[EMAIL PROTECTED]> wrote: > Just yesterday I ran into a problem in which using do( $file ) or eval( > $file ) both had problems in that they did not successfully execute the > code in $file. What were the error messages from do and eval? > Folks, is t

Re: a require problem

2008-08-29 Thread David Nicol
On Fri, Aug 29, 2008 at 11:46 AM, Perrin Harkins <[EMAIL PROTECTED]> wrote: > On Fri, Aug 29, 2008 at 10:53 AM, Berg, Eric <[EMAIL PROTECTED]> wrote: >> eval( $file ) ... did not successfully execute the code in $file. that isn't supposed to. eval( `cat $file`) should though. Or use Tie::S

Re: [mp2] make fails - `modperl_thx_interp_get' undeclared here (not in a function)

2008-08-29 Thread Charlie Reddington
I'm going to start guessing that this is an issue with perl 5.8.8. I was trying to stick with updated versions of everything but I eventually said screw it and tried it with perl 5.8.5. Which allowed everything to compile right away.. So I guess I'm good to go though it's not exactly ho

Re: a require problem

2008-08-29 Thread Perrin Harkins
On Fri, Aug 29, 2008 at 11:19 AM, Clinton Gormley <[EMAIL PROTECTED]> wrote: > Is this not a current-working-directory issue? > > This isn't terribly well documented on the mod_perl site, but from > http://perl.apache.org/docs/2.0/api/ModPerl/Registry.html Better documented here: http://perl.apach

RE: a require problem

2008-08-29 Thread Berg, Eric
That was part of the problem, Perrin: there were no error messages. Turns out that this is what's happening: The required file does, in fact, execute, so that's NOT the problem. It's a separate problem that manifests itself when using the -x file test. The included/do()'ed file contains an arr

Re: a require problem

2008-08-29 Thread Perrin Harkins
On Fri, Aug 29, 2008 at 1:23 PM, Berg, Eric <[EMAIL PROTECTED]> wrote: > The really weird thing is that when run in a CGI context, the -x test > works as expected, but when called when running as a mod_perl2 registry > script, it returns false, even though the file (that does exist) is > executable

RE: a require problem

2008-08-29 Thread Berg, Eric
The mod_perl server and the CGI server are the same. It's just a handler configured for CGI's for *.cgi and mod_perl for *.pl, and I've symlinked from a .pl to the .cgi. The web server for CGI and mod_perl and the command line run were all done as the same user. Code like this: warn "$cmd

Re: a require problem

2008-08-29 Thread Perrin Harkins
On Fri, Aug 29, 2008 at 2:04 PM, Berg, Eric <[EMAIL PROTECTED]> wrote: > The mod_perl server and the CGI server are the same. Even so, CGI is often configured to execute the script as the owner of the file, rather than as the user running the web server, so make sure you really are the same user.

RE: a require problem

2008-08-29 Thread niels
Could it be that during forking a different effective user id is set, which is what -x checks? are $<, $>, $( and $) all the same under cgi and mod_perl? (it sounds like /usr/bin/rcsdiff is not a symbolic link, which could be treated differently maybe, followsymlinks, etc) Niels L > The mod_perl

RE: a require problem

2008-08-29 Thread Berg, Eric
For me, it's the same on both. What could be the problem here? How can we take the next steps in debugging this? ERic > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Friday, August 29, 2008 3:01 PM > To: Berg, Eric > Cc: modperl perl apache org > Subje

Re: a require problem

2008-08-29 Thread Perrin Harkins
On Fri, Aug 29, 2008 at 3:43 PM, Berg, Eric <[EMAIL PROTECTED]> wrote: > For me, it's the same on both. Nevertheless, there have been problems in the past with GID. Are you running the latest mod_perl, and perl 5.8.8 or later? See this for background: http://marc.info/?l=apache-modperl&m=1179227

RE: a require problem

2008-08-29 Thread niels
What does 'file $cmd' (the gnu file program) say? is -e true under mod_perl? I'm out of ideas, but if you are certain its not due to different Apache configuration, then maybe sifting though strace output would be worth trying .. and i'm new to mod_perl anyway. Good luck. My errors are often obviou

Virtual Directories

2008-08-29 Thread Will Fould
Hello - This has got to be very common: I've got a list of directories: http://www.example.com/foo http://www.example.com/bar http://www.example.com/. These directories don't exist in the web root but map to the real location on the file system: /var/customers/12345

RE: a require problem

2008-08-29 Thread Berg, Eric
I'm running this: Apache/2.2.9 (Unix) mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 This is not my biggest problem right now. As you know, I'm still wrestling with problems associated with Parallel::ForkManager. I'm going to put together a discrete test of this problem for demonstratio

Re: Virtual Directories

2008-08-29 Thread Perrin Harkins
On Fri, Aug 29, 2008 at 4:26 PM, Will Fould <[EMAIL PROTECTED]> wrote: > Assuming my code can look in an existing database/memcache with the > requested URI segment, can someone suggest the lightest/fastest ways to > accomplish this or provide a decent link to a better discussion? Some options: -

mp2, STDIN/POST is clobbered by CGI->new($r);

2008-08-29 Thread Ashley Pond V
Hello everybody. I've got an access handler that is checking some arguments before passing the request off with DECLINED or redirecting back to login/home. The first version broke PHP forms that used POST by using this idiom to check for arguments: my $cgi = CGI->new($r); CGI, I am gue