Hi All,
I'm trying to write my first cPAddon install script.
I need to use the DBI perl module in order to setup some details in the database after the installation.
If I SSH to the server as root, I can run perl scripts using the DBI module without problem, however, whist attempting to use DBI via cPanels 'Site Software' I get the following error:
Anybody know how to load the DBI module when writing install scripts?
I'm using the following:
and in order to attempt to get the DBI module on the path:
If I don't specify the above paths, perl uses these paths:
For some reason, it's using the 5.6.2 path instead of the 5.8.8.
My script is located in /usr/local/cpanel/cpaddons/cPanel/Ecommerce
Any help appreciated ( this is driving me mad
).
Thanks,
Mark
I'm trying to write my first cPAddon install script.
I need to use the DBI perl module in order to setup some details in the database after the installation.
If I SSH to the server as root, I can run perl scripts using the DBI module without problem, however, whist attempting to use DBI via cPanels 'Site Software' I get the following error:
Code:
Can't locate object method "connect" via package "DBI" (perhaps you forgot to load "DBI"?)
I'm using the following:
Code:
use DBI;
Code:
BEGIN { unshift @INC, qw(/usr/lib/perl5/5.8.8/x86_64-linux/
/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/Bundle/
/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/Bundle/DBD
/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBD/mysql); }
Code:
/usr/local/cpanel
/usr/local/cpanel/cpaddons
/usr/local/cpanel
/usr/local/cpanel/perl
/usr/local/cpanel/Cpanel/CPAN/overload/__Digest /usr/local/cpanel/build-tools/stubs
/usr/lib/perl5/5.6.2/x86_64-linux
/usr/lib/perl5/5.6.2
/usr/lib/perl5/site_perl/5.6.2/x86_64-linux
/usr/lib/perl5/site_perl/5.6.2
/usr/lib/perl5/site_perl
My script is located in /usr/local/cpanel/cpaddons/cPanel/Ecommerce
Any help appreciated ( this is driving me mad
Thanks,
Mark