I am setting environment variables in php which work fine and show result good in php but these not work fine for ffmpeg as when i set these var in putty every thing ok.
exec('export LD_LIBRARY_PATH=/usr/local/av/lib:/usr/lib:/lib');
exec('export PKG_CONFIG_PATH=/usr/local/av/lib/pkgconfig');
exec('export PATH=/usr/local/av/bin:/usr/kerberos/bin:/usr/bin:/bin:/usr/sbin:/sbin');
I also use this
$var_set1=putenv("LD_LIBRARY_PATH=/usr/local/av/lib:/usr/lib:/lib"); $var_set2=putenv("PKG_CONFIG_PATH=/usr/local/av/lib/pkgconfig"); $var_set3=putenv("PATH=/usr/local/av/bin:/usr/kerberos/bin:/usr/bin:/bin:/usr/sbin:/sbin");
// give me true when i echo above var.
// also i can get value with getenv which same as i set
but when i run this command
ffmpeg -i _gis115.flv -vhook "/root/ffmpeg/ffmpeg/vhook/imlib2.so -R 210 -G 155 -B 200 -x W(0.8-0.80tan(N/150PI/4)) -y H(0.8+0cos(N/1PI)) -F arial.ttf/20 -t usenet_watermark" -acodec copy -sameq water_gK.flv
its not work but same command work fine if i connect with putty and set environment variables in putty
export LD_LIBRARY_PATH=/usr/local/av/lib:/usr/lib:/lib
export PKG_CONFIG_PATH=/usr/local/av/lib/pkgconfig
export PATH=/usr/local/av/bin:/usr/kerberos/bin:/usr/bin:/bin:/usr/sbin:/sbin
then above ffmpeg command work fine in putty.
As i guess problem is thier the evironment variables not working fine for php. I am using CENTOS Enterprise 4.6 i686 dedicated server with appachi, php5
One thing more my web address as i just create account so it contain like
http://myipaddress/~MyUserAccount/index.php
as its not have proper DNS it may be a problem for environment variables.
I hope someone have solution of my problem.