Re: mod_perl configure

2000-08-03 Thread yusun

I have installed mod_perl as you said. And I think I have installed it
successfully.
If it were not, when I start apache, it would  report error for I added
  PerlHandler Apache::PerlRun
  Options +ExecCGI
in httpd.conf.
After you install the mod_perl, do you need to configure the httpd.conf by
yourselves?
Thanks!

- Original Message -
From: "frans" [EMAIL PROTECTED]
To: "yusun" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 03, 2000 3:53 PM
Subject: Re: mod_perl configure


 Sorry, I'm not a master. But I try to answer your question.
 This is because your installation not successful. Try to install
 mod_perl again with perl-5.6.0. I 've tried it and it worked good.
 The script CGI you embedded is not running under mod_perl, but it run as a
 common CGI.
 The installation step like here

 $ perl Makefile.PL EVERYTHING=1 DO_HTTPD=1 USE_APACI=1
 APACHE_SRC=../apache_1.3.6/src APACHE_PREFIX=/usr/local/apache
 $ make
 $ make test TEST_VERBOSE=1
 $ make install
 then restart your apache

 Thx.

 On Thu, 3 Aug 2000, yusun wrote:

  I have installed the mod_perl and changed the httpd.conf as
 
   Alias /cgi-perl/ /usr/ns-home/cgi-bin/
   Location /cgi-perl/
   #AllowOverride None
   SetHandler perl-script
   PerlHandler Apache::PerlRun
   Options +ExecCGI
   allow from all
   PerlSendHeader On
   PerlSetVar  PerlRunOnce On
   /Location
 
  When I restarted httpd, there was no error reported.
  But when I used the following CGI to test whether the mod_perl was
working
  or not.
  The report was no. Why?
 
  ###
  #!/usr/bin/perl
  print "Content-type: text/plain\n\n";
print "Server's environment\n";
foreach ( keys %ENV ) {
print "$_\t$ENV{$_}\n";
}
  #
 
  The result is
   :
   :
  GATEWAY_INTERFACE CGI/1.1
   :
 
  It means that I have configured this location to run under mod_cgi and
not
  mod_perl.
  How can I configure the location to run under mod_perl?
  Thanks!
 
 
 
 





mod_perl

2000-08-03 Thread yusun





I have installed the mod_perl 
 % tar xzvf apache_x.x.x.tar.gz 
% tar xzvf mod_perl-x.xx.tar.gz % cd mod_perl-x.xx % perl 
Makefile.PL APACHE_SRC=../apache_x.x.x/src \ DO_HTTPD=1 
USE_APACI=1 EVERYTHING=1 % make  make test  make 
install % cd ../apache_x.x.x % make install

The report said it is success. 
Then Ichanged the httpd.conf as 

Alias /cgi-perl/ 
/usr/ns-home/cgi-bin/Location 
/cgi-perl/ 
#AllowOverride None 
SetHandler perl-script 
PerlHandler Apache::PerlRun 
Options +ExecCGI allow from 
all PerlSendHeader 
On PerlSetVar 
PerlRunOnce On/LocationWhen I 
restarted httpd, therewas no error reported.But when I used the following CGI to test whether the mod_perl was 
workingor not.The report was no. Why?
!/usr/bin/perlprint "Content-type: 
text/plain\n\n"; print "Server's environment\n"; foreach ( 
keys %ENV ) { print 
"$_\t$ENV{$_}\n"; }#The result 
is : 
:GATEWAY_INTERFACE CGI/1.1 :It means 
that I have configured this location to run under mod_cgi and 
notmod_perl.How can I configure the location to run under 
mod_perl?Thanks!


Re: mod_perl

2000-08-03 Thread yusun

Sorry for answering late. I slept for a while.
I have answered the questions you asked.
By the way, did you got to the http://perl.apache.org/guide/ by youselves?
If you did, you should notice, last time, all I wrote such as the install
steps and the CGI script are from there.
The only purpose I posted my question is to get help.
The only purpose of the setting of  [EMAIL PROTECTED] is to help each other
solve problems.
I do not like to see that kind of condemn any more.
If you are an expert and gentleman, to behave like it, OK?

- Original Message -
From: "Tobias Hoellrich" [EMAIL PROTECTED]
To: "yusun" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 03, 2000 11:15 PM
Subject: Re: mod_perl


 Yusun,

 your questions don't get better if you post them over and over again. Can
you
 answer the following questions below:
 1.) Have you read through the guide at http://perl.apache.org/guide/ ?
Millions
 of people have spent thousands of hours compiling the information in
there. I'm
 sure you will find some really valuable informatio.

***yes, I have read it millions of times.


 2.) Does mod_perl show up in the list of compiled in modules (output from
 'httpd -l')?
*
Compiled-in modules:
  http_core.c
  mod_so.c
  mod_php4.c
  mod_perl.c

 3.) What does perl's 'HEAD http://localhost/' tell you for your server
 (output)?
**
The apache is working

 4.) What is the filename of your testscript?
*
test.cgi

 5.) Where is it installed (directory) ?

**/usr/local/src/apache_1.3.12
  %cd /usr/src
  %tar xzvf apache_1.24.tar.gz
  % tar xzvf mod_perl-1.24.tar.gz
  % cd mod_perl-1.24
  % perl Makefile.PL APACHE_SRC=../apache_1.3.12src \
DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
  % make  make test  make install
  % cd ../apache_1.3.12
  % make install

 6.) What URL are you using when you access it?

**localhost/ns-home/cgi-bin/test.cgi

 7.) Which conf-file are you modifying (full pathname)?

**/usr/local/apache/conf/httpd.conf

 8.) Can you proof that modifications to the conf-file really change the
servers
 behaviour?
***Yes. If I change some thing in it in a wrong way, after I
$../bin/apachetl start, it will report error.

 9.) Which server are you starting (full pathname)?
**localhost
***/usr/local/apache/bin/apachectl start

 10.) Can you substitute the "xxx" below with real version numbers?

*apache_1.3.12

 Only if you can provide answers to all questions above we will be able to
take
 the next step in trying to figure out what you did wrong. And don't dare
 posting another message unless you answer "Yes" to question 1 :-)

 Tobias

The real problem is why the recult is not
GATEWAY_INTERFACE   CGI-Perl/1.1






Re: mod_perl

2000-08-03 Thread yusun

Thanks! You solve my problem.
I had set
directory /home/*/cgi-bin
   SetHandler cgi-script

So, though I set SetHandler perl-script in Location /home/my/cgi-bin, it
still worked as cgi-script.
Now I change the directory to /usr/local/apache/htdocs/test. Then it works
well.
The report is
GATEWAY_INTERFACE CGI-Perl/1.1
Thanks

- Original Message -
From: "Tom Brown" [EMAIL PROTECTED]
To: "yusun" [EMAIL PROTECTED]
Sent: Friday, August 04, 2000 12:16 PM
Subject: Re: mod_perl



 you've obviously got a ScriptAlias in place for that directory... you
 _must_ ... either that or you've set mod_cgi as the handler for *.cgi
 scripts somewhere.

 I don't remember the start of this thread, so I don't know what fragments
 of your httpd.conf file you have posted... but some of the directories you
 listed below seem very strange...

 your test script is in /usr/src/apache/ ? I'd expect it under
 /home/httpd/ or something like that... e.g. a web_content directory

 Also your test URL seems a little strange
 "http://localhost/ns-home/cgi-bin/test.cgi" ... as a rule, mod_perl is
 _not_ used for a /cgi-bin/ directory, a script alias is used to hand all
 files in that directory off to mod_cgi... try running your script from
 another directory...

 On Fri, 4 Aug 2000, yusun wrote:

  Sorry for answering late. I slept for a while.
  I have answered the questions you asked.
  By the way, did you got to the http://perl.apache.org/guide/ by
youselves?
  If you did, you should notice, last time, all I wrote such as the
install
  steps and the CGI script are from there.
  The only purpose I posted my question is to get help.
  The only purpose of the setting of  [EMAIL PROTECTED] is to help each
other
  solve problems.
  I do not like to see that kind of condemn any more.
  If you are an expert and gentleman, to behave like it, OK?
 
  - Original Message -
  From: "Tobias Hoellrich" [EMAIL PROTECTED]
  To: "yusun" [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Thursday, August 03, 2000 11:15 PM
  Subject: Re: mod_perl
 
 
   Yusun,
  
   your questions don't get better if you post them over and over again.
Can
  you
   answer the following questions below:
   1.) Have you read through the guide at http://perl.apache.org/guide/ ?
  Millions
   of people have spent thousands of hours compiling the information in
  there. I'm
   sure you will find some really valuable informatio.
 
  ***yes, I have read it millions of times.
 
 
   2.) Does mod_perl show up in the list of compiled in modules (output
from
   'httpd -l')?
  *
  Compiled-in modules:
http_core.c
mod_so.c
mod_php4.c
mod_perl.c
 
   3.) What does perl's 'HEAD http://localhost/' tell you for your server
   (output)?
  **
  The apache is working
 
   4.) What is the filename of your testscript?
  *
  test.cgi
 
   5.) Where is it installed (directory) ?
 
  **/usr/local/src/apache_1.3.12
%cd /usr/src
%tar xzvf apache_1.24.tar.gz
% tar xzvf mod_perl-1.24.tar.gz
% cd mod_perl-1.24
% perl Makefile.PL APACHE_SRC=../apache_1.3.12src \
  DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
% make  make test  make install
% cd ../apache_1.3.12
% make install
 
   6.) What URL are you using when you access it?
 
  **localhost/ns-home/cgi-bin/test.cgi
 
   7.) Which conf-file are you modifying (full pathname)?
 
  **/usr/local/apache/conf/httpd.conf
 
   8.) Can you proof that modifications to the conf-file really change
the
  servers
   behaviour?
  ***Yes. If I change some thing in it in a wrong way, after I
  $../bin/apachetl start, it will report error.
 
   9.) Which server are you starting (full pathname)?
  **localhost
  ***/usr/local/apache/bin/apachectl start
 
   10.) Can you substitute the "xxx" below with real version numbers?
 
  *apache_1.3.12
  
   Only if you can provide answers to all questions above we will be able
to
  take
   the next step in trying to figure out what you did wrong. And don't
dare
   posting another message unless you answer "Yes" to question 1 :-)
  
   Tobias
  
  The real problem is why the recult is not
  GATEWAY_INTERFACE   CGI-Perl/1.1
 
 
 


 --
 [EMAIL PROTECTED]   | What I like about deadlines is the lovely
 http://BareMetal.com/  | whooshing they make as they rush past.
 web hosting since '95  | - Douglas Adams





Re: mod_perl success!

2000-08-02 Thread yusun

I have installed the mod_perl and changed the httpd.conf as you said.
But when I used the following CGI to test whether the mod_perl was working
or not.
The report was no. Why?

#!/usr/bin/perl
print "Content-type: text/plain\n\n";
  print "Server's environment\n";
  foreach ( keys %ENV ) {
  print "$_\t$ENV{$_}\n";
  }
#

The result is
 :
 :
GATEWAY_INTERFACE CGI/1.1
 :

It means that I have configured this location to run under mod_cgi and not
mod_perl.
How can I configure the location to run under mod_perl?
Thanks!


Yu Sun
[EMAIL PROTECTED]


- Original Message -
From: "Andrew Chen" [EMAIL PROTECTED]
To: "Pramod Sokke" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, August 02, 2000 8:18 AM
Subject: Re: mod_perl success!


 It's actually:

 PerlSetVar PerlRunOnce On

 (that's without the handler, of course. With it you want that off)

 Andrew Chen
 Intern, Architecture
 [EMAIL PROTECTED]
 206-219-8445
 The Cobalt Group, Inc.

 On Tue, 1 Aug 2000, Pramod Sokke wrote:

  Where did you set your PerlRunOnce option? I tried setting it in
httpd.conf
  like this:
 
  Alias /cgi-perl/ /usr/ns-home/cgi-bin/
  Location /cgi-perl/
  #AllowOverride None
  SetHandler perl-script
  PerlHandler Apache::PerlRun
  Options +ExecCGI
  allow from all
  PerlSendHeader On
  PerlRunOnce On
  /Location
 
  and I got this error:
 
  Invalid command 'PerlRunOnce', perhaps mis-spelled or defined by a
module
  not included in the server configuration.
 
  -Pramod
 
  At 04:25 PM 7/25/00 -0700, Andrew Chen wrote:
  On Tue, 25 Jul 2000, Pramod Sokke wrote:
  
   Andrew,
   From your discussion on the forum, I recall you mentioning the
differences
   between PerlRunOnce being 'On' and 'Off'. Since our code is extremely
   shabby and huge, will I be able to use it with 'Off'? If I don't,
will I be
   compromising on the speed?
  
   Thanks again for the great detailed write-up!
   -Pramod
  
  If PerlRunOnce is On, then you can use your code without any changes,
even
  if it is completely horrible. PerlRunOnce Off allows for bigger speed
  increases, but then you have to write the handler.
  
  If you just want a really quick speed improvement, stick it on PerlRun
  with PerlRunOnce On and see if that's sufficient.
  
  If you feel like writing the handler (so that you can get a really big
  speed boost) then you can run it with PerlRunOnce Off.
  
  Andrew
 





Re: mod_perl success!

2000-08-02 Thread yusun

No, it is no problem.
I have run it.
You can test it.

- Original Message -
From: "Razvan Ionescu" [EMAIL PROTECTED]
To: "Razvan Ionescu" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 03, 2000 10:46 PM
Subject: Re: mod_perl success!


 ups again, i meant $key

 a working code for this "keys" loop would be

 foreach $key (sort(keys %ENV)) {

 print "$key = $ENV{$key}\n";
  }

 anyway you can write it shorter but you'll have problems when debuging.

 Razvan

  ----- Original Message -
  From: "yusun" [EMAIL PROTECTED]
  To: "Andrew Chen" [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Wednesday, August 02, 2000 3:50 PM
  Subject: Re: mod_perl success!
 
 
   I have installed the mod_perl and changed the httpd.conf as you said.
   But when I used the following CGI to test whether the mod_perl was
 working
   or not.
   The report was no. Why?
  
   #!/usr/bin/perl
   print "Content-type: text/plain\n\n";
 print "Server's environment\n";
 foreach ( keys %ENV ) {
 print "$_\t$ENV{$_}\n";
 }
   #
  
   The result is
:
:
   GATEWAY_INTERFACE CGI/1.1
:
  
   It means that I have configured this location to run under mod_cgi and
 not
   mod_perl.
   How can I configure the location to run under mod_perl?
   Thanks!
  
  
   Yu Sun
   [EMAIL PROTECTED]
  
  
   - Original Message -
   From: "Andrew Chen" [EMAIL PROTECTED]
   To: "Pramod Sokke" [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Sent: Wednesday, August 02, 2000 8:18 AM
   Subject: Re: mod_perl success!
  
  
It's actually:
   
PerlSetVar PerlRunOnce On
   
(that's without the handler, of course. With it you want that off)
   
Andrew Chen
Intern, Architecture
[EMAIL PROTECTED]
206-219-8445
The Cobalt Group, Inc.
   
On Tue, 1 Aug 2000, Pramod Sokke wrote:
   
 Where did you set your PerlRunOnce option? I tried setting it in
   httpd.conf
 like this:

 Alias /cgi-perl/ /usr/ns-home/cgi-bin/
 Location /cgi-perl/
 #AllowOverride None
 SetHandler perl-script
 PerlHandler Apache::PerlRun
 Options +ExecCGI
 allow from all
 PerlSendHeader On
 PerlRunOnce On
 /Location

 and I got this error:

 Invalid command 'PerlRunOnce', perhaps mis-spelled or defined by a
   module
 not included in the server configuration.

 -Pramod

 At 04:25 PM 7/25/00 -0700, Andrew Chen wrote:
 On Tue, 25 Jul 2000, Pramod Sokke wrote:
 
  Andrew,
  From your discussion on the forum, I recall you mentioning the
   differences
  between PerlRunOnce being 'On' and 'Off'. Since our code is
  extremely
  shabby and huge, will I be able to use it with 'Off'? If I
don't,
   will I be
  compromising on the speed?
 
  Thanks again for the great detailed write-up!
  -Pramod
 
 If PerlRunOnce is On, then you can use your code without any
 changes,
   even
 if it is completely horrible. PerlRunOnce Off allows for bigger
 speed
 increases, but then you have to write the handler.
 
 If you just want a really quick speed improvement, stick it on
  PerlRun
 with PerlRunOnce On and see if that's sufficient.
 
 If you feel like writing the handler (so that you can get a
really
  big
 speed boost) then you can run it with PerlRunOnce Off.
 
 Andrew

   
  
 





mod_perl configure

2000-08-02 Thread yusun




I have installed the mod_perl and changed the 
httpd.conf as 

Alias /cgi-perl/ 
/usr/ns-home/cgi-bin/Location 
/cgi-perl/ 
#AllowOverride None 
SetHandler perl-script 
PerlHandler Apache::PerlRun 
Options +ExecCGI allow from 
all PerlSendHeader 
On PerlSetVar 
PerlRunOnce On/LocationWhen I 
restarted httpd, therewas no error reported.But when I used the following CGI to test whether the mod_perl was 
workingor not.The report was no. Why?
!/usr/bin/perlprint "Content-type: 
text/plain\n\n"; print "Server's environment\n"; foreach ( 
keys %ENV ) { print 
"$_\t$ENV{$_}\n"; }#The result 
is : 
:GATEWAY_INTERFACE CGI/1.1 :It means 
that I have configured this location to run under mod_cgi and 
notmod_perl.How can I configure the location to run under 
mod_perl?Thanks!


Re: save as

2000-07-25 Thread yusun
I think you should check the httpd.conf. You should tell the Apache to
handle the *.cgi or *.pl in some dir as CGI programs.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 26, 2000 6:36 AM
Subject: save as


 Hello folks,

 This may be a weak question, but I have to ask it anyway.
 I have a script running under mod_perl.
 It works fine, but every once in a while the browser/\"web
 server\" offers to save the script instead of executing it.
 Any ideas ? Thanks!

 Arshavir