Install FFMPEG-PHP

c0nfus3d1

Verified User
Joined
Oct 29, 2010
Messages
15
I'm trying to install ffmpeg with ffmpeg-php on centos 5.7

I have ffmpeg installed. but I'm having problems with ffmpeg-php. I run ./configure with no problems, but when I run make I get this:

Code:
In file included from /usr/include/sys/stat.h:105,
                 from /usr/local/include/php/main/php_streams.h:28,
                 from /usr/local/include/php/main/php.h:399,
                 from /root/ffmpeg-source/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/bits/stat.h:70: error: field âst_atimâ has incomplete type
/usr/include/bits/stat.h:71: error: field âst_mtimâ has incomplete type
/usr/include/bits/stat.h:72: error: field âst_ctimâ has incomplete type
In file included from /usr/local/include/php/main/php.h:405,
                 from /root/ffmpeg-source/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/local/include/php/TSRM/tsrm_virtual_cwd.h:209: error: expected specifier-qualifier-list before âtime_tâ
/root/ffmpeg-source/ffmpeg-php-0.6.0/ffmpeg-php.c: In function âzm_startup_ffmpegâ:
/root/ffmpeg-source/ffmpeg-php-0.6.0/ffmpeg-php.c:94: warning: implicit declaration of function âavcodec_initâ
make: *** [ffmpeg-php.lo] Error 1

and I'm having no luck at all.. Can anyone help point me in the right direction? Thanks
 
run the following to prevent compilation failure with something like

# sed -i 's#PIX_FMT_RGBA32#PIX_FMT_RGB32#' ./ffmpeg_frame.c
 
Error when install phpffmpeg on centos with PHP7

Unfortunately, when I am going to install PHP-FFMPEG, I encounter the following error:

[root@server ffmpeg-php-0.6.0]# make
/bin/sh /usr/ffmpeg/ffmpeg-php-0.6.0/libtool --mode=compile cc -I. -I/usr/ffmpeg/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/ffmpeg/ffmpeg-php-0.6.0/include -I/usr/ffmpeg/ffmpeg-php-0.6.0/main -I/usr/ffmpeg/ffmpeg-php-0.6.0 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /usr/ffmpeg/ffmpeg-php-0.6.0/ffmpeg-php.c -o ffmpeg-php.lo
mkdir .libs
cc -I. -I/usr/ffmpeg/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/ffmpeg/ffmpeg-php-0.6.0/include -I/usr/ffmpeg/ffmpeg-php-0.6.0/main -I/usr/ffmpeg/ffmpeg-php-0.6.0 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /usr/ffmpeg/ffmpeg-php-0.6.0/ffmpeg-php.c -fPIC -DPIC -o .libs/ffmpeg-php.o
In file included from /usr/include/sys/stat.h:107,
from /usr/local/include/php/Zend/zend_stream.h:28,
from /usr/local/include/php/Zend/zend.h:41,
from /usr/local/include/php/main/php.h:35,
from /usr/ffmpeg/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/bits/stat.h:91: error: field ‘st_atim’ has incomplete type
/usr/include/bits/stat.h:92: error: field ‘st_mtim’ has incomplete type
/usr/include/bits/stat.h:93: error: field ‘st_ctim’ has incomplete type
/usr/include/bits/stat.h:152: error: field ‘st_atim’ has incomplete type
/usr/include/bits/stat.h:153: error: field ‘st_mtim’ has incomplete type
/usr/include/bits/stat.h:154: error: field ‘st_ctim’ has incomplete type
In file included from /usr/local/include/php/Zend/zend_stream.h:28,
from /usr/local/include/php/Zend/zend.h:41,
from /usr/local/include/php/main/php.h:35,
from /usr/ffmpeg/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/sys/stat.h:367: error: array type has incomplete element type
/usr/include/sys/stat.h:374: error: array type has incomplete element type
In file included from /usr/local/include/php/main/php.h:394,
from /usr/ffmpeg/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/local/include/php/Zend/zend_virtual_cwd.h:218: error: expected specifier-qualifier-list before ‘time_t’
/usr/local/include/php/Zend/zend_virtual_cwd.h:248: error: expected declaration specifiers or ‘...’ before ‘time_t’
/usr/ffmpeg/ffmpeg-php-0.6.0/ffmpeg-php.c: In function ‘zm_startup_ffmpeg’:
/usr/ffmpeg/ffmpeg-php-0.6.0/ffmpeg-php.c:94: warning: implicit declaration of function ‘avcodec_init’
make: *** [ffmpeg-php.lo] Error 1
I used the following link for installation: rosehosting

My server uses php7. Please guide me.
 
Back
Top