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.


Need Your Help

How to launch activity from service properly?

android service android-activity

I have a activity that can launch a service after the user presses the button. In this service, i have a Timer that runs every 10s. I want to run another activity (google maps) from this service ev...

Cron Job Commands not working

cron crontab

I am new to cron jobs and have set up one in Plesk to execute every minute however I am not sure if the command is correct due to it not working.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.