PHP extension SSH2 not found when run from cron
I am running a LAMP stack and installed the SSH2 extension using PECL. I have a PHP script that uses a function provided by the SSH2 extension (SSH2_connect). This same script runs fine when I run it from a browser, however if I run the same file from a cron job, I get a fatal PHP error saying that the function is undefined. I have tried running the cron job as root and as www-data. Any ideas would be greatly appreciated. Thanks.