imagick php-ffmpeg gd install problem -does not show in phpinfo page Please Help!

BigBigBoss

Member
Mar 16, 2011
9
0
51
Please can someone help as I'm stuck and can't seem to find a solution
I installed image magic through /scripts/installimagemagic
and installed php-ffmpeg like below and added extension=ffmpeg.so in php.ini file which is located at /usr/local/lib/php.ini

Code:
# mkdir /usr/local/src
# cd /usr/local/src
# wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2
# tar jxf ffmpeg-php-0.6.0.tbz2
# cd ffmpeg-php-0.6.0
# perl -i -p -e "s/PIX_FMT_RGBA32/PIX_FMT_RGBA/g;" ffmpeg_frame.c
# phpize
# ./configure && make clean && make && make install
Installation goes fine without errors but cannot see them in phpinfo page if I do php -i | grep ffmpeg I get this
Code:
[/]# php -i | grep ffmpeg
ffmpeg
ffmpeg-php version => 0.6.0-svn
ffmpeg-php built on => Mar 16 2011 21:04:49
ffmpeg-php gd support  => enabled
ffmpeg libavcodec version => Lavc52.72.2
ffmpeg libavformat version => Lavf52.64.2
ffmpeg swscaler version => SwS0.11.0
ffmpeg.allow_persistent => 0 => 0
ffmpeg.show_warnings => 0 => 0
And if i do php -i | grep imagick I get this
Code:
[/]# php -i | grep imagick
imagick
imagick module => enabled
imagick module version => 3.0.1
imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator
imagick.locale_fix => 0 => 0
imagick.progress_monitor => 0 => 0
and php -m gives this
Code:
[/]# php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
eAccelerator
ereg
exif
ffmpeg
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
imap
intl
ionCube Loader
json
libxml
mbstring
mcrypt
mysql
mysqli
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
pgsql
Phar
posix
pspell
Reflection
session
SimpleXML
soap
sockets
SPL
SQLite
sqlite3
standard
suhosin
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]
eAccelerator
the ionCube PHP Loader
But they don't show up in phpinfo page which is loaded through the browser.

I tried changing php versions from Easy apache but no luck. I tried php 5.2.9, 5.2.17 and now I'm at php 5.3.5.
I even tried to build php without gd from easy apache and than tried to install gd through /scripts/installgd I come to the same problem gd does not show in php info page unless I install it through EasyApache from the beginig.

All the installation for ffmpeg, lame etc goes fine the only problem is that you can't seem to see php extensions in the phpinfo page.

Please can someone guide me I'm totally stuck here. I googled but could not find a solution. I almost tried everything I could find on the net. It is something to do with the way easyapche builds php. I don't know how to hard code these exensions into php when php compiles through easyapache or what other way to use to install these.:(
 

BigBigBoss

Member
Mar 16, 2011
9
0
51
I think so becuase it changes everytime I recompile it with easyapache here is the version info from command
Code:
[~]# php -v
PHP 5.3.5 (cli) (built: Mar 16 2011 20:01:00) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
    with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd.
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
And here is copy paste from phpinfo page

PHP Version 5.3.5
Build Date Mar 16 2011 20:10:01
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd.


It seems same the same to me
 

BigBigBoss

Member
Mar 16, 2011
9
0
51
I'm using suphp I guess because thats what Easyapache recomends. Should I disable cgi and re compile php?

Copy paste from WHM >>Main >> Service Configuration >> Configure PHP and SuExec

Current Configuration

Option Configured Value
Default PHP Version (.php files) 5
PHP 5 Handler suphp
PHP 4 Handler none

Apache suEXEC on
 

BigBigBoss

Member
Mar 16, 2011
9
0
51
Easyapache and other php modules is not a problem here. Are you sure there is only one PHP version on your server and the URL you are browsing is using the PHP version that you see via the command prompt?
It looks like it is the same here is copy paste from phpinfo page

PHP Version 5.3.5
Build Date Mar 16 2011 20:10:01
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd.


and here is the output of php -v
Code:
[~]# php -v
PHP 5.3.5 (cli) (built: Mar 16 2011 20:01:00) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
    with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd.
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
It seems the same as it changes as I recompile to different version from easyapache
 

LinuxTechie

Well-Known Member
Jan 22, 2011
502
10
68
cPanel Access Level
Root Administrator
Hey!

I don't thinks you need to recompile php.
Now need to check whether the extension is added correctly.
Can you check the the apache log for errors?

tail -f /usr/local/apache/logs/error_log

Also make sure the browser cache isn't causing these confusions.
 
Last edited:

BigBigBoss

Member
Mar 16, 2011
9
0
51
Hey!

If you are using suphp it should appear in phpinfo and I don't thinks you need to recompile php.
Now need to check whether the extension is added correctly.
Can you check the the apache log for errors?

tail -f /usr/local/apache/logs/error_log

Also make sure the browser cache isn't causing these confusions.
It is not cash as I cleared the cash plus it changes when I recompile from Easyapache to different version of php
Here is the apache error log. I restarted apache and got this

[~]# tail -f /usr/local/apache/logs/error_log
[Thu Mar 17 03:34:32 2011] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)
[Thu Mar 17 03:34:33 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.4 Perl/v5.8.8 configured -- resuming normal operations
[Thu Mar 17 03:34:47 2011] [notice] caught SIGTERM, shutting down
[Thu Mar 17 03:34:49 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
[Thu Mar 17 03:34:49 2011] [notice] ModSecurity for Apache/2.5.13 (ModSecurity: Open Source Web Application Firewall) configured.
[Thu Mar 17 03:34:50 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.4 Perl/v5.8.8 configured -- resuming normal operations
[Thu Mar 17 04:26:32 2011] [notice] caught SIGTERM, shutting down
[Thu Mar 17 04:26:35 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
[Thu Mar 17 04:26:35 2011] [notice] ModSecurity for Apache/2.5.13 (ModSecurity: Open Source Web Application Firewall) configured.
[Thu Mar 17 04:26:36 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.4 Perl/v5.8.8 configured -- resuming normal operations


I replied earlier to madaboutlinux but the post went to moderator and has not showed up and the later one showed up strange..
 

BigBigBoss

Member
Mar 16, 2011
9
0
51
I see on error and noticed that apache is giving this error
[error] (9)Bad file descriptor: apr_socket_accept: (client socket)

Plus I noticed now that apache is doing a graceful restart by itself
[notice] Graceful restart requested, doing restart

I never did a restart and it shows that it restarted.
 

madaboutlinux

Well-Known Member
Jan 24, 2005
1,051
2
168
Earth
First of all, there is no need to execute easyapache unless you are looking to change the PHP version. If php -i | grep ffmpeg is showing the correct output there is nothing to worry, ffmpeg should work as expected. BTW, was it showing before on the phpinfo page OR it never worked that at all?
 

BigBigBoss

Member
Mar 16, 2011
9
0
51
It never showed on phpinfo page. so it is not important that phpinfo page shows it. if it's showing at terminal it should work fine?
 

BigBigBoss

Member
Mar 16, 2011
9
0
51
I re compiled apache & PHP and was looking at the logs to see for errors. Now it started to do a Graceful restart again and the same error showed up

[Thu Mar 17 09:07:07 2011] [notice] Graceful restart requested, doing restart
[Thu Mar 17 09:07:07 2011] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)
[Thu Mar 17 09:07:08 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 configured -- re
 

BigBigBoss

Member
Mar 16, 2011
9
0
51
The culprit here is SuPHP. If we change the handler to DSO, all extension show up in phpinfo page and when SuPHP is the handler they don't.

Thank you cPtechie & madaboutlinux for helping me out.