AW: MP1 - MP2 migration Problems.

2008-02-14 Thread Petry Roman, IT
Hello again,

i did a new setup of our Apache and mod_perl2 with your hint´s.. Configured 
again some startup.pl stuff. but no luck 8-)

Error is still the same in error.log from apache.

[Thu Feb 14 14:33:58 2008] [error] [Thu Feb 14 14:33:58 2008] -e: Can't locate 
object method request via package Apache at /usr/lib/cgi-bin/test1.pl line 
4.\n

Code looks like this for test1.pl
#!/usr/bin/perl
my $r = Apache-request;
$r-send_http_header('text/plain');
$r-print(mod_perl rules!\n);

Hmm. Is someone able to use this code under apache2 with compat enabled. 
Perhaps it is broken in some ways ?

bye
Roman


-Ursprüngliche Nachricht-
Von: André Warnier [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 13. Februar 2008 23:01
An: modperl@perl.apache.org
Cc: Petry Roman, IT
Betreff: Re: MP1 - MP2 migration Problems.


Of course, what I forgot to mention below - and sorry if you know that 
already - is that whichever perl modules you pre-load in your main 
Apache server config via the startup.pl script, you do not need to use 
anymore in all your perl scripts or Apache/mod_perl handlers.
(At the cost of having them (insibly) duplicated in all the children 
processes).
But it may simplify your migration problems, and you can always tune 
this later.

André

André Warnier wrote:
 
 Hi.
 
 About your problem below...
 
 I am not sure that this is going to help, nor even if it is really 
 relevant to your specific problem.  Just trying to give you ideas, 
 because it reminds me of something.
 Below are two configurations, of two of our systems which have slightly 
 different versions of mod_perl and the rest.
 I went through the same kind of problems you're going through, a while 
 ago when going from Apache 1.x to Apache 2.x, and then again more 
 recently when there were some changes in the mod_perl naming of modules 
 between mod_perl 1.9xx and mod_perl 2.0, and then some additional things 
 happened during a Linux Debian upgrade from Sarge to Etch, which changed 
 the location where some Apache2 stuff was installed.
 And there is still some difference to this day in some Perl scripts or 
 modules between these two systems, which greatly bothers me, but it 
 basically works.
 
 The main difference is in the two first use statements in our 
 startup.pl script (which I assume you are familiar with, as a way to 
 pre-load some perl stuff when the server starts).
 I do not remember precisely which problems we had, but they were of the 
 same general gist as yours, so maybe this helps.
 Here it goes :
 
 1) system colin  (Debian Sarge, older)
 =
 version (uname -a) :
 Linux colin 2.6.8-11-amd64-k8 #1 Sun Oct 2 21:26:54 UTC 2005 x86_64 
 GNU/Linux
 Apache2 version : see below
 Perl version (perl -v) : 5.8.4
 mod_perl version (per Apache log) :
 [Wed Feb 13 22:24:59 2008] [notice] Apache/2.0.54 (Debian GNU/Linux) 
 DAV/2 mod_jk/1.2.6 PHP/4.3.10-22 mod_perl/1.999.21 Perl/v5.8.4 
 configured -- resuming normal operations
 
 mod_perl startup.pl script :  (invoked via PerlRequire in httpd config)
 --
 
 #!/usr/bin/perl
 # modperl2_startup.pl
 # Apache2 / mod_perl 2 startup script
 
   use Apache2 ();
   use Apache::compat ();
   use lib /usr/lib/apache2/perllib;   # that's a local perl lib directory
   use lib /home/EFS/lib; # that also
   use ModPerl::Util ();
   use Apache::RequestRec ();
   use Apache::RequestIO ();
   use Apache::RequestUtil ();
   use Apache::Filter ();
   use Apache::ServerUtil ();
   use Apache::Connection ();
   use Apache::Log ();
   use Apache::Const -compile = qw(:common :log REDIRECT);
   use APR::Const -compile = ':common';
   use APR::Table ();
   use ModPerl::Registry ();
   use CGI ();
   CGI-compile(':all');
   1;
 
 lines in httpd.conf :
 (or, rather, in /etc/apache2/mods-available/perl.conf) :
 PerlRequire /usr/lib/apache2/perllib/modperl2_startup.pl
 SetEnv PERL5LIB /usr/lib/apache2/perllib
 
 
 
 
 2) system arthur  (Debian Etch, more recent)
   ==
 version (uname -a) :
 Linux arthur 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 i686 GNU/Linux
 
 Apache2 version : see below
 Perl version (perl -v) : 5.8.8
 mod_perl version (per Apache log) :
 [Wed Feb 13 22:29:38 2008] [notice] Apache/2.2.3 (Debian) DAV/2 
 mod_jk/1.2.18 PHP/4.4.4-8+etch4 mod_ssl/2.2.3 OpenSSL/0.9.8c 
 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations
 
 mod_perl startup.pl script :
 --
 
   #!/usr/bin/perl
 # modperl2_startup.pl
 # Apache2 / mod_perl 2 startup script
 
   use Bundle::Apache2 ();
   use Apache2::compat ();
   use lib /usr/local/lib/apache2/perllib;  # that's a local perl lib 
 directory
   use lib /home/EFS/lib; # that also
   use ModPerl::Util ();
   use Apache2::RequestRec ();
   use Apache2::RequestIO ();
   use Apache2::RequestUtil ();
   use Apache2::Filter ();
   use Apache2::ServerUtil ();
   use Apache2::Connection ();
   use Apache2::Log ();
   use Apache2::Const -compile = qw(:common 

AW: MP1 - MP2 migration Problems.

2008-02-13 Thread Petry Roman, IT
Hello Randy,

i did read those documents again and again, but i can´t find the cause of my 
problems with the compat module 8-(..
If i try the new mod_perl2 syntax everything is o.k.. but to redesign all 
scripts is not an solution at this time. i need backward compatibility with 
mod_perl1 at this time..
Sorry it´s not my decision.

Another tip 8-)
bye
ROman

-Ursprüngliche Nachricht-
Von: Randy Kobes [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 13. Februar 2008 17:55
An: Petry Roman, IT
Cc: modperl@perl.apache.org
Betreff: Re: MP1 - MP2 migration Problems.


On Wed, 13 Feb 2008, Petry Roman, IT wrote:

 Hello @all,

 we are just transfering our Intranet Server which used 
 Apache 1.3 and mod_perl1 from SLES8 to SLES10 wiht Apache2 
 and mod_perl2.

There's a couple of documents:
   http://perl.apache.org/docs/2.0/user/porting/porting.html
   http://perl.apache.org/docs/2.0/user/porting/compat.html
that may help in this regard.

-- 
best regards,
Randy Kobes

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.