Re: problem calling a file under mod_perl2

2007-05-30 Thread Michael Peters
Jonathan Vanasco wrote: > in our setup, we do this: > > port 80:nginx > ports: 7000-9000modperl ( handlers assigned to individual ports ) Out of curiosity, why use a different port for each hander instead of just a different url? -- Michael Peters Developer Plus Three,

Re: problem calling a file under mod_perl2

2007-05-30 Thread Jonathan Vanasco
On May 29, 2007, at 11:46 AM, Clinton Gormley wrote: The only way I can think of would be to make a web request in PHP, so the PHP program does an HTTP request to your web server, to call the perl script, then does something with the data that is returned. Not optimal, but it may suit your nee

Re: problem calling a file under mod_perl2

2007-05-29 Thread Malcolm J Harwood
On Tuesday 29 May 2007, Clinton Gormley wrote: > > Ok, then I finally understand what is happening. But is there any other > > option to use every script under mod_perl even calling it from php? > > The only way I can think of would be to make a web request in PHP, so > the PHP program does an HTT

Re: problem calling a file under mod_perl2

2007-05-29 Thread Clinton Gormley
> > > > Ok, then I finally understand what is happening. But is there any other > option to use every script under mod_perl even calling it from php? The only way I can think of would be to make a web request in PHP, so the PHP program does an HTTP request to your web server, to call the perl sc

Re: problem calling a file under mod_perl2

2007-05-29 Thread Alicia Amadoz
> > There's your problem - you aren't using mod_perl at all - the system > call launches a new perl interpreter, compiles the code, runs it and > exits. > > not very efficient - same as using ordinary CGI. > Ok, then I finally understand what is happening. But is there any other option to use e

Re: problem calling a file under mod_perl2

2007-05-29 Thread Clinton Gormley
On Tue, 2007-05-29 at 16:32 +0200, Alicia Amadoz wrote: > Hi, > > How I should write a warn() statement in startup.pl? I am new to Perl > and I wrote 'warn;' and 'warn(use lib 'path');' but the errors where > like 'Warning: something's wrong'. That means that it is being loaded - the "something's

Re: problem calling a file under mod_perl2

2007-05-29 Thread Alicia Amadoz
Hi, How I should write a warn() statement in startup.pl? I am new to Perl and I wrote 'warn;' and 'warn(use lib 'path');' but the errors where like 'Warning: something's wrong'. Another thing that I am thinking it could be related to my problem is that I am using php on my website and I call the

Re: problem calling a file under mod_perl2

2007-05-29 Thread Perrin Harkins
On 5/29/07, Alicia Amadoz <[EMAIL PROTECTED]> wrote: In startup.pl there are some modules called and they were also called from my script file. So, I deleted the use syntax from my script file so that the modules only were called from startup.pl. If I have an error like 'Can't locate object metho

Re: problem calling a file under mod_perl2

2007-05-29 Thread Alicia Amadoz
> > How do you know it isn't being loaded? > > - Perrin > > In startup.pl there are some modules called and they were also called from my script file. So, I deleted the use syntax from my script file so that the modules only were called from startup.pl. If I have an error like 'Can't locate o

Re: problem calling a file under mod_perl2

2007-05-29 Thread Perrin Harkins
On 5/29/07, Alicia Amadoz <[EMAIL PROTECTED]> wrote: I have found that somehow 'startup.pl' isn't loaded or it can't be read. It has rw-r--r-- permissions. Have I the correct configuration for mod_perl2? That should be fine, but there might be an enclosing directory with bad permissions. The s

Re: problem calling a file under mod_perl2

2007-05-29 Thread Alicia Amadoz
Hi, I have found that somehow 'startup.pl' isn't loaded or it can't be read. It has rw-r--r-- permissions. Have I the correct configuration for mod_perl2? I would be very grateful if anyone could help me with this. Regards. Here is my httpd.conf: LoadModule perl_module modules/mod_perl.so #Ali

Re: problem calling a file under mod_perl2

2007-05-28 Thread Alicia Amadoz
Hi again, Thanks for your suggestions Clint. I have tried some more things and it doesn't work yet. In my httpd.conf file I have this configuration: PerlSwitches -wT PerlPostConfigRequire /usr/local/apache2/htdocs/www/p_scripts/perl-cgi/startup.pl SetHandler perl-script PerlRes

Re: problem calling a file under mod_perl2

2007-05-28 Thread Clinton Gormley
On Mon, 2007-05-28 at 12:36 +0200, Alicia Amadoz wrote: > Hi, > > I have tried with adding the directory where perl_functions.pl lives in > my startup.pl file. Again, the error is the following: > > Can't locate perl_functions.pl in @INC So you need to examine @INC to see what is missing. just

Re: problem calling a file under mod_perl2

2007-05-28 Thread Alicia Amadoz
Hi, I have tried with adding the directory where perl_functions.pl lives in my startup.pl file. Again, the error is the following: Can't locate perl_functions.pl in @INC I have also tried with the absolute path at require "path"; in 'search.pl' and it works ok. But I need to work with relative p

Re: problem calling a file under mod_perl2

2007-05-28 Thread Clinton Gormley
Hi Alicia The handling of the current working directory has changed from mod_perl 1 to mod_perl 2. In mod_perl1, mod perl registry used to chdir into the script's directory. This no longer happens as mod_perl2 has to support threads, and chdir is not thread safe - it would affect all other thre

problem calling a file under mod_perl2

2007-05-28 Thread Alicia Amadoz
Hi, I have a problem loading a perl file under mode_perl2. I want to reuse some subrutines that I have in 'perl_functions.pl' file and I am trying to call this file from 'search.pl' file. I get this error: Can't locate ../perl_functions.pl in @INC My configuration is the following: In httpd.