Results 1 to 6 of 6

Thread: DateTime module doesn't load

  1. #1
    12noon.com skst's Avatar
    Join Date
    Jun 2002
    Location
    Chicago, IL (USA)
    Posts
    696
    Rep Power
    15

    DateTime module doesn't load

    If I write a Perl script that uses DateTime and execute it in a browser, it runs fine. If I schedule a job to run it, it can't find DateTime in the path.

    Code:
    Can't locate DateTime.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.8 /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 .) at SCRIPT_NAME.pl line 137.
    PerlDiver says it's located in /usr/local/lib/perl5/site_perl/5.8.8/i686-linux. But if I try to use lib that path, it still fails.

    Code:
    Can't load '/usr/local/lib/perl5/site_perl/5.8.8/i686-linux/auto/DateTime/DateTime.so' for module DateTime: /usr/local/lib/perl5/site_perl/5.8.8/i686-linux/auto/DateTime/DateTime.so: undefined symbol: PL_stack_max at /usr/lib/perl/5.8/XSLoader.pm line 70.
     at /usr/local/lib/perl5/site_perl/5.8.8/i686-linux/DateTime.pm line 23
    BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.8/i686-linux/DateTime.pm line 49.
    Compilation failed in require at SCRIPT_NAME.pl line 137.
    BEGIN failed--compilation aborted at SCRIPT_NAME.pl line 137.
    Stefan Tucker
    12noon.com home of Alarm++ and Display Changer

  2. #2
    HalfaBee's Avatar
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    7,266
    Rep Power
    26
    Have you tried running perldiver in a scheduled job.
    I don't suffer from laziness, I enjoy every minute!
    Edit your php.ini here
    http://members.powweb.com/member/cgi...nt/PHPplus.bml

  3. #3
    12noon.com skst's Avatar
    Join Date
    Jun 2002
    Location
    Chicago, IL (USA)
    Posts
    696
    Rep Power
    15
    No, but that might be interesting. It'd only point out the differences though. I don't understand why there are differences. Why are certain Perl modules available to HTTP but not to scheduled jobs? One would think it'd be the other way around if it were a security issue.
    Stefan Tucker
    12noon.com home of Alarm++ and Display Changer

  4. #4
    HalfaBee's Avatar
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    7,266
    Rep Power
    26
    Probably a different server config.
    I don't suffer from laziness, I enjoy every minute!
    Edit your php.ini here
    http://members.powweb.com/member/cgi...nt/PHPplus.bml

  5. #5
    12noon.com skst's Avatar
    Join Date
    Jun 2002
    Location
    Chicago, IL (USA)
    Posts
    696
    Rep Power
    15
    I'm sure, but why--it's rather annoying. I have to upload a bunch of Perl modules to my account that are already on PW somewhere.

    Yup the paths are clearly different. I have no idea why they should be. I'll try adding use lib statements to try to access the modules I need, but I tried before, and it didn't seem to work.

    PerlDiver path on HTTP:
    Code:
    .
    /usr/local/lib/perl5/5.8.8/i686-linux
    /usr/local/lib/perl5/5.8.8
    /usr/local/lib/perl5/site_perl/5.8.8/i686-linux
    /usr/local/lib/perl5/site_perl/5.8.8
    /usr/local/lib/perl5/site_perl
    /usr/local/lib/perl/5.8.4
    /usr/local/lib/site_perl
    PerlDiver path on CGI:
    Code:
    .
    /etc/perl
    /usr/local/lib/perl/5.8.8
    /usr/local/share/perl/5.8.8
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.8
    /usr/share/perl/5.8
    /usr/local/lib/site_perl
    /usr/local/lib/perl/5.8.4
    /usr/local/share/perl/5.8.4
    I guess I'll submit a ticket and see what PW Support has to say.
    Stefan Tucker
    12noon.com home of Alarm++ and Display Changer

  6. #6
    12noon.com skst's Avatar
    Join Date
    Jun 2002
    Location
    Chicago, IL (USA)
    Posts
    696
    Rep Power
    15
    The ticket response is:
    I have checked the issue regarding Perl include path different on CGI and HTTP. Due to security reasons we don’t provide same include path for CGI and HTTP. If same path is given to both, then hackers can get the access to the root through HTTP very easily. Hence we use different include path for CGI and HTTP. While scheduled jobs are provided to advanced users.
    I don't see how a cracker can get into root just by knowing a path. If they can access CGI in order to find out the path, they're in anyway. Regardless, why would the DateTime module be left out of the CGI modules? Isn't it more of a risk for me to install my own modules?

    Anyway, I've followed up with Support, basically asking those questions.
    Stefan Tucker
    12noon.com home of Alarm++ and Display Changer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •