i have a perl script that runs db backups on sybase. when i run this directly from the command line, it works fine. when i set up a cron job it brings back the error "ct_init(): network packet layer: internal net library error: Attempt to load protocol driver failed". it's not a problem with the library path(s) as as i mentioned, from the command line the scrip works fine. could anyone enlighten me as to how cron works (i.e. when it's run is it run in the user mode of the owner of the crontab file??) as i'm thinking it's some sort or permissions issue but can't see how to resolve it without knowing how cron works.
It sounds like you've got a seperate location for storing modules, specifically the DBI drivers (DBD). Try this:
$ set | grep PERL
That will show any environment variables used by the perl interpreter. Look out for PERL5LIB for anything that looks like a PATH list e.g PERL5LIB=/some/dir:/other/dir:/opt/some/dir
If that's set then it's probably not being set when Cron runs your script. You'll have to change your crontab line: