I have tried to run my script via cron, but it was not working...
*/1 * * * * /usr/local/bin/php -f /usr/local/www/maintain.php > /usr/local/www/php.log
So I decided to try to run this script from the command line in putty like this:
/usr/local/bin/php -f /usr/local/www/maintain.php > /usr/local/www/php.log
And then I've received the following warning/error message:
# /usr/local/bin/php /usr/local/www/maintain.php > /usr/local/www/php.log
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/libpcre.so' - Cannot open "/usr/local/lib/php/20090626/libpcre.so" in Unknown on line 0
But this script is running great, when I'm running it via www like http://my-url.com/maintain.php
.
I'm using PHP 5~ with Lighttpd running od FreeBSD. Where is my problem?
/usr/local/lib/php/20090626/libpcre.so
exist? Are you sure it's running from lighttpd and you don't just have error display off?/usr/local/lib/libpcre.so
./usr/local/lib/php/20090626/
it does print another message:PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'libpcre.so' in Unknown on line 0
/etc/php.d/X.ini
, or it may be in your masterphp.ini
grep -r libpcre /usr/local/etc/php*
and remove it.