I have a perl script that needs to be executed using the exec command.  This
perl script had a use for another library. When executing this perl script
from the consol - there is no problem - the library from the use is picked
up from the proper directory (the included library is in the same directory
as the perl script) - but when executing it from within php, the library
cannot be found.  In the past I have worked around it successfully by
putting the library in the perl libs directory - but on this shared host
provider they will not allow that.

I am at a loss first of all why the file cannot be found in the perl script
where executed using php, and second of all how to get the perl script to
execute successfully through php.

The php code is:
exec("/home/vtccanada/psigate/processor.cgi \"secure.psigate.com\" \"1139\"
\"ConfigFile=teststore&KeyFile=./teststore.pem&ChargeType=1&UserId=TEST&Oid=
&Bname=John Q. Public&Bcompany=PSiGate&Baddr1=6725-6 Millcreek
Drive&Bcity=Mississauga&Bstate=Ontario&Bzip=L5N
5V2&Bcountry=Canada&Amount=1.99&Comments=NO
COMMENTS&[EMAIL PROTECTED]&CardNumber=4111111111111111&ExpMonth=04&
ExpYear=05\"",$results);

foreach($results as $x) {
    print "$x<br>";
}

The Perl bit that is giving trouble is:

sub process_order {

    use ClearLink;

        # Unique order number. Leave blank to have the API assign one.
        $oid = $input{'Oid'};
        
Etc...
}

Specifically the use ClearLink line.

I know that this is not a perl list - but if anyone has suggestions on how
to get that file included, or executed properly through php, I would
appreciate it - keeping in mind that I have no access to perl library
directories.

Thanks.



--
Cheers

Mike Morton

"Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up with
Apple."
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to