2006/08/31

Run Perl script in a CGI script

The backtick opeartor can place a well-done Perl script in a CGI script. But a CGI script running on the web usually use a standard library:

/usr/lib/perl5/5.8.0

problem:
If that well-done Perl script use non-standard library in a specifical Path, you may get below error:

Can't locate XML/Xerces.pm in @INC ...


Solution:
Add a path to that non-standard library in the CGI script.

use lib '/usr/local/hive/lib/.....'

'export LD_LIBRARY_PATH=/usr/local/....:${LD_LIBRARY_PATH}'

No comments:

Post a Comment