@INC

2002-07-29 Thread Ruslan V. Sulakov

My INC contains WRONG directories!!! Help!
How can I change INC in perl for installing of Apache::SubProcess and other
modules?
At this time I cannot install any Apache::* related modules, because of bad
INC

Platform: FreeBSD

I have Apache::* modules installed in:
/usr/local/lib/perl5/site_perl/5.6.1/mach/Apache/

But I cannot install needed modules:
oasis2# tar -zxf Apache-SubProcess-0.03.tar.gz
oasis2# cd Apache-SubProcess-0.03
oasis2# perl Makefile.PL
Can't locate Apache/src.pm in INC (INC contains: ../lib
/usr/libdata/perl/5.00503/mach /
usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/
perl5/site_perl/5.005 .) at Makefile.PL line 4.
BEGIN failed--compilation aborted at Makefile.PL line 4.
oasis2#

Thanks in advance!
Ruslan





Re: @INC

2002-07-29 Thread Ruslan V. Sulakov

Thanks, Ilya! You are right!
/usr/bin/perl contains old binary from v5.00503
So, I've change it to a link pointing to /usr/local/bin/perl
Now all works fine!
Ruslan

 Looks like your sys admin had installed perl from core and from ports
 and as result you have two perl installation on systems. Perl from
 core (5.00503) likely to have is binary in /usr/bin/perl and perl from
 ports (5.6.1) in /usr/local/bin/perl.
 
 If your PATH doesn't have /usr/local/bin or it comes after /usr/bin
 than 'perl Makefile.PL' uses perl from core. Try either changing your
 PATH or using full path to perl (i.e. /usr/local/bin/perl
 Makefile.PL).







Apache::DProf

2002-07-24 Thread Ruslan V. Sulakov

I have troubles using Apache::DProf
I try to use it as described at:
http://perl.apache.org/docs/1.0/guide/performance.html#Code_Profiling_Techni
ques

But when my httpd.conf has a line:
PerlModule Apache::DProf
apache reply with error 500 (Internal Server Error) when I request a perl
script, that runs under mod_perl

Without this line, all works fine!

Errorlog shows following message during each request:
[Sat Jul 20 07:34:28 2002] [error] Undefined subroutine
Apache::Registry::handler called.


I have in my httpd.conf
Files *.pl
  SetHandler  perl-script
  PerlHandler Apache::Registry
  PerlSendHeader On
  Options +ExecCGI
  PerlModule Apache::DProf
  PerlRequire /path/to/my/modules/modperl_startup.pl
/Files

Is here something wrong?
How can I have Apache::DProf worked for profiling my code?

Thanks in advance.
Ruslan





HTTP 1.1

2001-06-04 Thread Ruslan V. Sulakov

Strange numbers appeares, when I use HTTP 1.1 protocol to get response from my 
mod_perl server.
The test.pl script:
use strict;
use Apache::Request();
my $r = shift;
my $apr = Apache::Request-new($r);
$apr-send_http_header('text/html');
print 1234567;

Now look to  HTTP 1.1. response of this script:
# telnet xx.xx.ru 81
Trying xxx.xxx.xxx.xxx...
Connected to xx.xx.ru.
Escape character is '^]'.
GET /test.pl HTTP/1.1
Accept: */*
Host: xx.xx.ru

HTTP/1.1 200 OK
Date: Mon, 04 Jun 2001 14:49:24 GMT
Server: Apache/1.3.12 (Unix) mod_perl/1.24
Transfer-Encoding: chunked
Content-Type: text/html

1
1234567
0



What does mean number 1 before line 1234567? And what does mean 0 after all?
Is there a way to cut off the line with number 1 and cut off the line with number 
0?
I need only line 1234567 in response! It is vital for me!


Now look what will be, if I ask HTTP version 1.0:
bsd2# telnet xx.xx.ru 80
Trying 212.188.13.65...
Connected to xx.xx.ru.
Escape character is '^]'.
GET /test.pl HTTP/1.0
Accept: */*
Host: xx.xx.ru

HTTP/1.1 200 OK
Date: Mon, 04 Jun 2001 15:39:16 GMT
Server: Apache/1.3.9 (Unix) mod_perl/1.21 rus/PL28.18
Connection: close
Content-Type: text/html; charset=koi8-r

1234567


Thats all right with HTTP/1.0! No additional lines in output and no Header 
Transfer-Encoding: chunked in response.

But I need , it to be all right in case of HTTP/1.1 !

Is there any ideas?

Thanks!
Ruslan




Re: template toolkit compile test problems

2001-04-26 Thread Ruslan V. Sulakov

What is PerlFixupHandler for?
Whats the difference of PerlFixupHandler and PerlTransHandler?

Thanks,
Ruslan