----- Original Message ----- 
From: "Nick Wehr" <[EMAIL PROTECTED]>
To: <inline@perl.org>
Sent: Monday, June 06, 2005 2:11 PM
Subject: problem 'use'ing an Inline module from CGI...


> I'm trying to publish my Inline module with AMF::Perl over an Apache
> webserver.  I've installed the Combo.pm module which tests fine.  I've
> read that the webserver needs write permissions before compiling the
> script but since I've already compiled it, I thought this would
> work...

The server will still need to know where the binaries are, and will need to
be able to read (execute?) them.

> Apparently it looks like a permissions issue - but I could be
> wrong.  Can anybody help?  Thanks!
>
> -nicholas
>
> I get this error in the web server log:
>
> [Sun Jun 05 21:00:46 2005] [error] [client 127.0.0.1] Had problems
> bootstrapping Inline module 'nTote::Combo'
> [Sun Jun 05 21:00:46 2005] [error] [client 127.0.0.1]
> [Sun Jun 05 21:00:46 2005] [error] [client 127.0.0.1] Can't load
>
'/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/nTote/Combo/Com
bo.so'
> for module nTote::Combo:
>
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/nTote/Combo/Comb
o.so:
> failed to map segment from shared object: Permission denied at
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230,
> <DATA> line 1.
> [Sun Jun 05 21:00:46 2005] [error] [client 127.0.0.1]  at
> /usr/lib/perl5/site_perl/5.8.5/Inline.pm line 500
> [Sun Jun 05 21:00:46 2005] [error] [client 127.0.0.1]
> [Sun Jun 05 21:00:46 2005] [error] [client 127.0.0.1]
> [Sun Jun 05 21:00:46 2005] [error] [client 127.0.0.1]  at
> /var/www/cgi-bin/nToteDev.amf line 0
>

I'm confused as to exactly what's happening. I assume you're using
Inline::C. If you haven't already, then check 'perldoc Inline::C-Cookbook'.
There's a brief section discussing some aspects of CGI with Inline. Maybe
there's something there that will help.

Other than that, I would create a simple perl script that contains something
like the following:

#!/usr/bin/perl
use warnings;
use nTote::Combo;
print "Content-type: text/html\n\n";
print "OK\n";

First check that it runs ok from the command line, then try running it via
the webserver. That might help narrow things down a bit.

Does Combo.so need to load some other shared object ?
Where is your inlined code - in nToteDev.amf ? or in nTote::Combo ?

Cheers,
Rob

Reply via email to