S
S
Sergey Semenko2015-03-21 19:31:04
PHP
Sergey Semenko, 2015-03-21 19:31:04

Why is ffmpeg-php not working?

With grief in half, I installed ffmpeg-php on CentOS, but for some reason it does not work on Apache. In /etc/php.ini I added
extension=/usr/lib64/php/modules/ffmpeg.so
Command php -r 'new ffmpeg_movie();' an error output that I did not pass a parameter, that is, the class exists, and when I create a file and write there
<?php
new ffmpeg_movie();
I am getting an error that class not found.
Why is this and how to fix it?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
Sergey Semenko, 2015-03-22
@abler98

In short, Apache still used another PHP, namely zts-php. I solved this problem in the following way:
1) Downloaded and installed ffmpeg (not ffmpeg-php)

rpm -Uvh http://dl.atrpms.net/el6-x86_64/atrpms/stable/atrpms-repo-6-7.el6.x86_64.rpm
yum install ffmpeg ffmpeg-devel

2) Compiled the library under zts-php
git clone https://github.com/tony2001/ffmpeg-php.git
cd ffmpeg-php
zts-phpize
./configure --with-php-config=/usr/bin/zts-php-config
make && make install

E
Eugene, 2015-03-21
@Nc_Soft

About installation on centos

git clone https://github.com/tony2001/ffmpeg-php.git
cd ffmpeg-php
phpize
./configure
make && make install

About ffmpeg-php: tell me why you use it? Isn't it easier to run a console command?

M
Melkij, 2015-03-21
@melkij

Has the Indian been restarted?
Look in phpinfo, maybe you are changing the wrong php.ini at all.

A
Artem Spiridonov, 2015-03-21
@customtema

To make the ffmpeg class available, install
sudo apt-get install php5-ffmpeg
No configuration needed, works out of the box.

D
Dmitry Skogorev, 2015-03-21
@EnterSandman

console php and the one that you have attached to the web server may differ

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question