Installation Help

2003-12-30 Thread semuel
Hello There.

 

I have installed Mandrake 9.1, and in the installation I asked it to also
install Apache 2, mod_perl, mysql.

now I want to make them all work. I took stason's pages, and there he said
to write in the httpd.conf (with is in my system httpd2.conf) a loadmodule
line. no good - the apache didn't find the module.

a little search - the mod_perl module is in different folder. (something
extena)

tried to copy the mod_perl file to the apache's modules files did worked,
but everything else I tried trigered "couldn't find" errors.

 

the perl is in the folder:

/usr/lib/perl5/

and have three sub-folders:

5.8.0, vendor_perl, site_perl

the second have:

5.8.0/i386-linux-thread-multi/Apache2/Apache

that does not contain an Registry module.

 

My apache identify itself as:

Apache-AdvancedExtranetServer/2.0.44 (Mandrake Linux/11mdk) mod_perl/1.99_08
Perl/v5.8.0 mod_ssl/2.0.44 OpenSSL/0.9.7a PHP/4.3.1

 

So, it seen that I have mod_perl 2. (that what 1.99 means, doesn't it?)

 

the apache modules are in:

/usr/lib/apache2-2.0.44/

and the mod_perl is in:

/usr/lib/apache2-extramodules-2.0.44/

so I put in the apache httpd2.conf the line:

LoadModule perl_module extramodules/mod_perl.so

instead of:

LoadModule perl_module modules/mod_perl.so

and suprizingly, apache did found the mod_perl file.

So, I inserted another line:

PerlRequire /etc/httpd//apache2-startup.pl

(well, now I'm guessing. didn't write the real file name/path, but it's
something like that)

 

And now, Apache refuse to start, and state the he cann't find
Apache/Registry.

I chacked, and he's right - there is no Registry module under Apache that
under Apache2 folder.

on the other hand,  cann't find anyone that calls that module.

the @INC contain the Apache2 folder, and also an /var/www/perl/.mod_perl2
folder.

 

The questions are:

1. Did I do the right thing in the extramodules thing? (I was totally
guessing)

2. Who is calling the Registry module?

3. Where is that module, and how do I make Apache know that?

 

And some apache questions:

1. how do I get a list of all the modules that apache loaded? (the dynamic
ones, not the static)

2. I don't have a util named "apxs". is it important?

 

What annoy me the most is that I still haven't wrote a single line in perl.
didn't breach the installation stage. ufff.

 

Semuel Fomberg.

 



--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



[mp2] Documentation - newbie questions

2004-01-10 Thread semuel








Hello
There.

 

1.
In the mp2 documentation (http://perl.apache.org/docs/2.0/api/index.html)
there is one module with "No Title" title. Please fix it.

2.
In the handlers lists, please include the name of the object that the handler
is getting as parameter. 

That
is because I looked, and couldn't decide whether PerlResponseHandler is getting
Apache::RequestRec or Apache::RequestIO.

3.
Apache::RequestIO does not exist it the documentation. (at the line in 1)

 

Thanks.

Semuel
Fomberg.








RE: [mp2] Documentation - newbie questions

2004-01-10 Thread semuel
From: Stas Bekman 
Sent: Saturday, January 10, 2004 10:52 PM
 
>> 2. In the handlers lists, please include the name of the object that the
>> handler is getting as parameter. 
> Which lists you are talking about, please give us the direct URL.

URL: http://perl.apache.org/docs/2.0/user/handlers/http.html
At the beginning of every handler, there is a "$r=shift" line.
And what is missing is an "$r is ..." comment.
Like in the response handler. Like in every other.

>> That is because I looked, and couldn't decide whether
>> PerlResponseHandler is
>> getting Apache::RequestRec or Apache::RequestIO.
> There is no Apache::RequestIO object, there is only Apache::RequestRec.
> Apache::RequestIO is a class that contains some methods operating on 
> Apache::RequestRec, and which you need to load in before you can use them.

Oh. You mean that RequestIO adds the content_type and the print functions to
the $r object, that is RequestRec? Interesting. 
The $r->print syntax confused me. Ok.
Can you please add a paragraph in the RequestRec documentation that says:

"This class represent the request arrived from the browser, and the response
that your program is about to send. Other classes operate on this object,
and if you can not find a method, try looking at them:
... insert here the list ...
For example, Apache::RequestIO provide the ability to write a response,
using a "content_type" function, that is activated using:
$r->content_type('plain/html');"

And in the classes please add:
"This class provides additional functionality to the Apache::RequestRec
object. The syntax for using the functions is:
$r->()
Where $r is an Apache::RequestRec object."

>> 3. Apache::RequestIO does not exist it the documentation. (at the line 
>> in 1)
> what's (at the line in 1)?

Oops. That was suppose to be "at the link in 1", namely:
http://perl.apache.org/docs/2.0/api/index.html
the RequestIO does not exist there.

> Yes, there are many missing and incomplete manpages. Please send patches.

If I knew enough to correct your man page, I would not have asked these
(that I'm sure that they are) stupid questions. 
But I don't. all I can do is to point on something and to say, what did you
mean there? 

Well, while I'm around, here are some more:
4. The Apache package itself, doesn't have place in the API page. (same
page) but it does exist, as can be seen at:
http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlHeaderParserHand
ler
(where it use the Apache::DECLINED and Apache::method_register.

5. Apache::Connection, APR::UUID, APR::Pool doesn't appear in the API page.
(http://perl.apache.org/docs/2.0/api/index.html)


Semuel.


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



RE: File uploads using Apache:;request in mod_perl2

2004-01-19 Thread semuel
Hello There.

No, this was changed to Apache::RequestRec and friends. 
See http://perl.apache.org/docs/2.0/api/Apache/RequestRec.html

Semuel.

-Original Message-
From: Pete Smith [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 19, 2004 6:07 PM
To: 'Joe Schaefer'
Cc: [EMAIL PROTECTED]
Subject: RE: File uploads using Apache:;request in mod_perl2

Sorry, I forgot to mention this too.

I am defining $r as the request object, like in mod_perl1:

my $r = Apache::Request->new(shift,
 TEMP_DIR => '/tmp/mason',
);

Is this correct in mod_perl2? I'm sorry, but I'm not terribly clued up on
mod_perl2 yet...

Thanks,
Pete


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html




-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



RE: File uploads using Apache:;request in mod_perl2

2004-01-19 Thread semuel
Hello There.

Oh, and how could I forget. At the mason's wiki,
There is a live discussion about it.
http://www.masonhq.com/wiki/null?ApacheModPerl2
In general, I don't think that mason works well with Apache2.
And here is the formal announcement:
http://www.masonhq.com/docs/faq/#can_i_use_mason_with_mod_perl_1_

Have fun.

-Original Message-----
From: semuel [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 19, 2004 7:20 PM
To: 'Pete Smith'
Cc: [EMAIL PROTECTED]
Subject: RE: File uploads using Apache:;request in mod_perl2

Hello There.

No, this was changed to Apache::RequestRec and friends. 
See http://perl.apache.org/docs/2.0/api/Apache/RequestRec.html

Semuel.

-Original Message-
From: Pete Smith [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 19, 2004 6:07 PM
To: 'Joe Schaefer'
Cc: [EMAIL PROTECTED]
Subject: RE: File uploads using Apache:;request in mod_perl2

Sorry, I forgot to mention this too.

I am defining $r as the request object, like in mod_perl1:

my $r = Apache::Request->new(shift,
 TEMP_DIR => '/tmp/mason',
);

Is this correct in mod_perl2? I'm sorry, but I'm not terribly clued up on
mod_perl2 yet...

Thanks,
Pete


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html




-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html




-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



RE: Re[2]: GIF contents not "coming out"

2004-01-24 Thread semuel
Hello There.

If you want to eliminate the need of the 'print ""' line, you should reverse
the order of the commands:
local $| = 1; print "Content-type: image/gif\r\n\r\n"; 
(That's because the $| is a flashing command. NM)
And you don't need to "\r\n\r\n". "\n\n" will do the job.

Semuel.

-Original Message-
From: Chris Drake [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 24, 2004 6:07 AM
To: [EMAIL PROTECTED]
Subject: Re[2]: GIF contents not "coming out"

Hi Stas,

Thanks for the pointers.  I've spent another hour on the problem, and
found that this fixes it:-

print "Content-type: image/gif\r\n\r\n"; local $| = 1; print "";

(interestingly, omitting the empty print causes the problem to come
back);

This only happens with GIF data incidentally - sending text worked
fine before now.


Kind Regards,
Chris Drake


Saturday, January 24, 2004, 1:25:43 PM, you wrote:

SB> Chris Drake wrote:
>> Hi All,
>> 
>> My mod_perl 2 script is not sending back the contents of the GIF I'm
>> trying to print.  Running it locally, it does, or if I go:-
>> print "foo";
>> ... I get "foo" - but when I print the GIF - I just get back the
>> headers without any content!!!

SB> Please read on how we like problems to be reported:
http://perl.apache.org/bugs/

SB> Make sure to include the relevant config section (is it 'perl-script' or

SB> 'modperl' SetHandler?)

SB> Also any difference if you remove 'use bytes'?

SB> Also this is much more efficient way to read/print a multiline file:

SB>  local $/;
SB>  $::r->print();





--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



RE: Question about handlers

2004-01-26 Thread semuel
Hello There.

Maybe playing with mod_perl handles is too much for your site's needs. Why
won't you try one of the templating systems? 
For example, Mason will let you stay with your html files, and you can add
header/footer for the pages, and won't bother you with restarts.
Link: http://www.masonhq.com/

Semuel.

-Original Message-
From: Hemond, Steve
Sent: Monday, January 26, 2004 3:18 PM
 Subject: Question about handlers

Hi ppl,

Actually, the only thing I need to do is to add a header/footer to my
webpages. I plan on adding dynamic content based on a database soon.
Couldn't I handle these details in simple .pl files? (Like having a .pm
acting as a library to my website, containing a bunch of well defined
functions).




-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



RE: [mp2] Can I link mp2 statically?

2004-02-09 Thread semuel
Hello There.

Why should you?
It was said, that mason needs MP statically linked into apache, and won't
work with the shared-object method. (haven't checked that myself)
Is this correct? Why?

Semuel.

-Original Message-
From: Beau E. Cox [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 09, 2004 3:38 AM
To: modperl
Subject: [mp2] Can I link mp2 statically?

Hi

Can I link mp2 statically?

I have looked in the 2.0 docs, specifically
<http://perl.apache.org/docs/2.0/user/install/install.html#MP_USE_STATIC>
and tried that magic, but the apache ./config.nice && make does not seem
to see mod_perl.

I did:

1) Configured and made Apache2 as I alwyays do,

2) perl Makefile.PL ... && make as always for mp2,

3) revisited Apache to reconfigure && make for static:

 ln -s $MP2DIR/src/modules/perl $APACHEDIR/modules

Where:
 MP2DIR is the top mod_perl2 dir (where I ran perl Makefile.PL, etc.)
 APACHEDIR is the top Apache2 dir (where I did ./configure && make)

followed by:
 
 cd $APACHEDIR
 ./config.nice --enable-perl=static && make

4) Nada - when I drop my load mp2 directives from httpd.conf,
   mp2 is not there. No mention of mod_perl and/or perl in
   the output from apache configure and make.

I know, I know, the docs (at the link above) state:

 META: The following is not implemented yet.

But I was wondering if I could anyway...

Anyone know how or whether this is possible?

Aloha => Beau;


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html




-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html