Hi, I have installed multiple versions of PHP on my server based on the ispconfig documents tutorials for ubuntu, also adding apc, geoip etc. but i would like to also install php-ffmpeg for each PHP version individually or as an shard extension. please not that the default system PHP has its own php-ffpmeg ubuntu repository version already installed so i want to avoid conflicts with that. Also note that the ffmpeg i have on my server was compiled by source and not using the ubuntu repository version. please tell me if i should do it another way but for now I'm thinking the steps i will use maybe are: Download the latest ffmpeg-php release Extract the archive: tar -xjf ffmpeg-php-X.x.x.tbz2 cd ffmpeg-php-X.x.x/ phpize ./configure && make sudo make install But I think the key area where i need help is how you use ./configure with the right prefix for shared or individual use if that is the only possible method? please advise thanks
You will have to set the path to the config of the right php version. From PHP manual comments of the phpize command: http://php.net/manual/en/install.pecl.phpize.php There are some other comments that might related to this on that page.
Are you saying I have to install the multiple php versions again adding --with-php-config= ? or install php-ffmpeg adding --with-php-config= ? with the php-ffmpeg, can i install that as: ./configure \ --enable-shared \ --prefix=/usr/local/php-ffmpeg/ then reinstall multiple php versions adding? --with-php-ffmpeg= /usr/local/php-ffmpeg/ would that work for a shared method? or if for individual, do i have to install php-ffmpeg multiple times in each /opt/php-xxx/php-ffmpeg then add --with-php-ffmpeg= /opt/php-5.xxx/bin/php-config ?
Install php-ffmpeg with the config setting. I never installed that add on, so I can't say of the shared option will work. Try it and you will see.
Solved: installed on each php version using: ./configure \ --prefix=/opt/ffmpeg-php/ \ --with-ffmpeg=/usr/local/cpffmpeg \ --with-php-config=/opt/php-5XXX/bin/php-config
The next part of this issue I have is this error: PHP Warning: PHP Startup: ffmpeg: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20121212 These options need to match Dose the build location matter for the method i am using?, please advise how to fix this.
UPDATE: Solved = tested and works ffmpeg-php had to be compiled under the same directory that the version of php that you want to use is made from, then ran the following updated command process to install on each version. phpize ./configure \ --prefix=/usr/local/src/php5-build/php-5.XXX/ffmpeg-php \ --with-ffmpeg=/usr/local/cpffmpeg \ --with-php-config=/opt/php-5.XXX/bin/php-config make make install PLEASE NOTE: I have to download ffmpeg-php from https://github.com/jbboehr/ffmpeg-php because that version has been updated to work with newer versions of PHP.