Silvio Wanka | 1 Mar 11:48 2005
Picon
Picon

Re: mod_perl - DBD::Oracle exec format error for Oracle.sl

jwarn wrote:
> 
> Here is the output of chatr for the various libraries.  It looks like 
> everything is similiar except for Oracle.sl.  I am still
> at a loss, so *any* advice is appreciated.
> 
> 
> HTTPD
> /post/home/post/migr/pos/apache/bin/httpd:
>         shared library list:
>             dynamic   /usr/lib/libm.2
>             dynamic   /usr/lib/libpthread.1
>             dynamic   /usr/lib/libcl.2
>             dynamic   /usr/lib/libc.2
> 
> ORACLE SL
> /post/opt/perl-5.8.0/lib/site_perl/5.8.0/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl: 
>         shared library list:
>             dynamic   /post/opt/oracle9.2/lib32//libclntsh.sl.9.0
>             dynamic   /usr/lib/libm.2
> 
> MOD_PERL
> /post/home/post/migr/pos/apache/libexec/libperl.so:
>         shared library list:
>             dynamic   /usr/lib/libcl.2
>             dynamic   /usr/lib/libpthread.1
>             dynamic   /usr/lib/libnsl.1
>             dynamic   /usr/lib/libnm.sl
>             dynamic   /usr/lib/libdld.2
>             dynamic   /usr/lib/libm.2
(Continue reading)

Jozef Kosoru | 1 Mar 15:44 2005
Picon

[mp2] How to get a Location in the modperl handler?

Hello,

Let's assume that we have these lines in the apache config:

	<Location /my/location>
		SetHandler modperl
		PerlResponseHandler MyApp::Handler
	</Location>

How can MyApp::Handler obtain an information that it is running
within "/my/location"?

Thank you for any help!

Jozef

--

-- 
jozef kosoru
http://zyzstar.kosoru.com

Ian Joyce | 1 Mar 15:42 2005
Picon

Re: [mp2] How to get a Location in the modperl handler?

On Tue, 1 Mar 2005 15:44:35 +0100, Jozef Kosoru <zyzstar <at> uid0.sk> wrote:
> Hello,
> 
> Let's assume that we have these lines in the apache config:
> 
>         <Location /my/location>
>                 SetHandler modperl
>                 PerlResponseHandler MyApp::Handler
>         </Location>
> 
> How can MyApp::Handler obtain an information that it is running
> within "/my/location"?
> 
> Thank you for any help!
> 
> Jozef
> 
> --
> jozef kosoru
> http://zyzstar.kosoru.com
> 

$r->location

--Ian

David Wright | 1 Mar 15:46 2005

Re: [mp2] How to get a Location in the modperl handler?

>> Let's assume that we have these lines in the apache config:
>>
>>         <Location /my/location>
>>                 SetHandler modperl
>>                 PerlResponseHandler MyApp::Handler
>>         </Location>
>>
>> How can MyApp::Handler obtain an information that it is running
>> within "/my/location"?
>>
>> Thank you for any help!
>>
>> Jozef
>>
>> --
>> jozef kosoru
>> http://zyzstar.kosoru.com
>>

> $r->location

As long as first you do:

use Apache::RequestUtil ();

I think.

dave

(Continue reading)

Gavin Henry | 1 Mar 17:34 2005
Picon

defaulting to index.pl

Dear all,

I have been reading http://perl.apache.org and http://modperlbook.org/

and I understand the Apache::Registry parts of the docs, i.e. enabling say
/perl/ for an alias etc.

But, all I want to do is stick a index.pl in the main root directory and
go from there.

I know this is done with the <Files></Files> parameter, but it's confusing
the  out of me.

I want to get rid of all my php stuff, and with php, you just stick in a
index.php and start coding.

Can you point me to the right place to read?

Thanks.

--

-- 
Just getting into the best language ever...
Fancy a yourname <at> perl.me.uk? Just ask!!!

Chris Croome | 1 Mar 17:46 2005
Picon

Re: defaulting to index.pl

Hi

On Tue 01-Mar-2005 at 04:34:57PM -0000, Gavin Henry wrote:
> 
> I have been reading http://perl.apache.org and
> http://modperlbook.org/
> 
> and I understand the Apache::Registry parts of the docs, i.e.
> enabling say /perl/ for an alias etc.
> 
> But, all I want to do is stick a index.pl in the main root
> directory and go from there.
> 
> I know this is done with the <Files></Files> parameter, but it's
> confusing the  out of me.

You need to tell apache which file to serve as a directory index: 

  DirectoryIndex index.pl

  http://httpd.apache.org/docs-2.0/mod/mod_dir.html#directoryindex

And also you need to enable scripts, I'd use a <Directory> directive
something like this if I were you:

  DocumentRoot /var/www/html
  <Directory /var/www/html>
    AllowOverride None
    Options ExecCGI Indexes
    DirectoryIndex index.pl
(Continue reading)

Gavin Henry | 1 Mar 18:01 2005
Picon

Re: defaulting to index.pl

<quote who="Chris Croome">
> Hi
>
> On Tue 01-Mar-2005 at 04:34:57PM -0000, Gavin Henry wrote:
>>
>> I have been reading http://perl.apache.org and
>> http://modperlbook.org/
>>
>> and I understand the Apache::Registry parts of the docs, i.e.
>> enabling say /perl/ for an alias etc.
>>
>> But, all I want to do is stick a index.pl in the main root
>> directory and go from there.
>>
>> I know this is done with the <Files></Files> parameter, but it's
>> confusing the  out of me.
>
> You need to tell apache which file to serve as a directory index:
>
>   DirectoryIndex index.pl
>
>   http://httpd.apache.org/docs-2.0/mod/mod_dir.html#directoryindex
>
> And also you need to enable scripts, I'd use a <Directory> directive
> something like this if I were you:
>
>   DocumentRoot /var/www/html
>   <Directory /var/www/html>
>     AllowOverride None
>     Options ExecCGI Indexes
(Continue reading)

Jonathan Vanasco | 1 Mar 19:44 2005

Question: Limiting Filetypes Uploaded

I'm in need of a 'good' method to limit files uploaded via mod_perl2 ( 
to photos of gif/jpg/png 100k or less)

How have others approached this?  I haven't found much on the subject  
(and it took me FOREVER to figure out that i needed to use 
Apache::Upload() for mp2!)

With the test code below, i've noticed some interesting things:
	1- depending on the browser, if $req{POST_MAX} or the form 
MAX_FILE_SIZE is exceeded, nothing can happen.  this is a browser 
crappiness issue, correct?
	1b - if the POST_MAX is exceeded, is it possible to find out that this 
happened and act appropriately on it?
	2 - i've noticed a type of "image/jpeg"  "image/gif"   "image/png" for 
uploaded file types.  can this be relied on to any extent?

Right now, I'm thinking the following validation process - is this too 
much, or too little?:
	stage 1,  accept the file if the 'type' is image/jpeg image/gif 
image/png
	stage 2, accept the file if the extension is ok (png/jpg/jpeg/gif) and 
it matches the filetype
	stage 3, (is this needed, or is this previously done to get the type 
?) read the beginning of the file to make sure that it is a valid image

I'm also a little unsure of saving the file.  Right now, I'm going to 
save to disk, but in the future i may want to do this via Danga's 
MogileFS
In either situation, there seems to be far too many options on how to 
do this!
(Continue reading)

Damon Buckwalter | 1 Mar 22:49 2005
Picon

ACL filesystem incompatibility and potential race condition

Greetings,

I use mod_perl 2 on a Debian Linux system, from the Debian supplied
package.  I also use ext3 and jfs filesystems, which provide ACL
capabilites for assigning permissions.  In my particular
configuration, files are owned by my user and group, and not
world-readable.  In order for Apache (httpd) to read files to be
served, I assign an ACL giving the group that Apache runs as access to
read files (www-data on Debian).  In the process of doing this, I
noted that Apache serves files protected in such a manner without
incident, but mod_perl's Registry and PerlRun handlers refuse to.

In an attempt to fix this problem a year ago, I worked to get a patch
added on Debian systems that will use the "use filetest 'access'"
pragma inside of RegistryCooker.  RegistryCooker must also be modified
to use $r->filename with the -r and -x filetests, since the "filetest
'access'" pragma requires a filename, not stat() info.

Recently, I found that PerlRun was failing, even with the above patch.
 This made me look closer at the code in RegistryCooker's
can_compile() function.  Why are we testing whether the file is
readable/executable before compilation, if this operation is not
executed atomically with the subsequent
ModPerl::Util::slurp_filename()/modperl_util.c:apr_file_open()?  This
seems to be insecure at worst and unreliable at best.

I propose that the read/execute/directory tests be removed from
can_compile().  The slurp_filename() method should not assume success
as it does now, but instead return an error code indicating that a
file could not be opened/does not exist/is a directory/etc.
(Continue reading)

Gokul P. Nair | 1 Mar 22:58 2005
Picon

modperl 2.0.0-rc4 statically linked with httpd-2.0.53

how do i find out if mod_perl is statically linked to
apache or dynamically? the reason i need to know this
is because in order to install HTML::Mason, it is
strictly reccomended that mod_perl be statically
linked to apache.

thanks in advance.

Gokul

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Gmane