ffmpeg not in phpinfo

1,399 views
Skip to first unread message

Matt

unread,
May 30, 2008, 10:01:29 PM5/30/08
to ffmpeg-php
I added the extension line "extension=ffmpeg.so" to my php.ini file
and the extension_dir property points to the right place but I cannot
see ffmpeg when I look at a phpinfo file. I have already installed
ffmpeg-php on another machine and it worked fine but for some reason
this one was weird.

I went into the apache (httpd) error logs and saw this line which
seems to be the problem:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/
php/modules/ffmpeg.so' - /usr/lib/php/modules/ffmpeg.so: undefined
symbol: av_free_static in Unknown on line 0

I tried googling for something but the only thing slightly related was
a french website and i'm not exactly brushed up on french enough to
understand any of it. Any ideas??

I'm working with ffmpeg-php-5.2.1 btw.

Todd Kirby

unread,
Jun 1, 2008, 5:54:35 PM6/1/08
to ffmpe...@googlegroups.com
make sure ffmpeg's libararies are installed where ffmpeg-php can find them.

Matt

unread,
Jun 1, 2008, 6:11:18 PM6/1/08
to ffmpeg-php
Here is the configure command I am using for ffmpeg

# ./configure --enable-libmp3lame --enable-shared

Then I do make and make install. I should note though that the first
time I do this configure command, it says something about the TMPDIR
variable not being set correctly. So I tried doing this:

# export TMPDIR=/tmp

but the error was thrown again so I had to do this:

# export TMPDIR=~/ffmpeg/tmp

and created a temporary folder in the root of the extracted ffmpeg
files. I do not know if this will have an effect on the install of
ffmpeg-php but I thought I would throw it in.

But since I am installing to the default location for ffmpeg, shouldnt
ffmpeg-php be able to find them?

On Jun 1, 2:54 pm, "Todd Kirby" <ffmpeg....@gmail.com> wrote:
> make sure ffmpeg's libararies are installed where ffmpeg-php can find them.
>

Todd Kirby

unread,
Jun 2, 2008, 5:09:58 AM6/2/08
to ffmpe...@googlegroups.com
It's gonna install in /usr/local/lib if you don't tell it otherwise. Maybe /usr/local/lib is not in your default library search path.

You could do...

./configure --enable-libmp3lame --enable-shared --prefix=/usr

to be safe.

Kelly

unread,
Jun 2, 2008, 6:04:52 PM6/2/08
to ffmpeg-php
I also have the exact same problem using the latest FFMPEG svn.

I have compile ffmpeg with ./configure --enable-libmp3lame --enable-
shared --prefix=/usr

then compiled ffmpeg-php using:
phpize
./configure
make && make install

Everything compiles perfectly, but when I tried using ffmpeg-php I get
the following error:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/
php/modules/ffmpeg.so' - /usr/lib/php/modules/ffmpeg.so: undefined
symbol: av_free_static in Unknown on line 0

My system is using CentOS 5 and PHP5.

I really hope we can find a fix for this.

Todd Kirby

unread,
Jun 2, 2008, 10:02:18 PM6/2/08
to ffmpe...@googlegroups.com
svn is not stable.

Todd Kirby

unread,
Jun 2, 2008, 10:04:04 PM6/2/08
to ffmpe...@googlegroups.com
sorry, I misread that. I thought you  weer saying ffmpeg-php svn .Disregard.

Matt

unread,
Jun 3, 2008, 4:38:59 AM6/3/08
to ffmpeg-php
Ditto. I tried configuring ffmpeg with the prefix /usr and even made
sure /usr was in the path (not sure if that was the correct path or
not) but same problem both times.

I had installed some other packages prior to this such as flvtool,
libogg, libvorbis and stuff like that. Any chance those could be
causing the problem? My intuition tells me this only has to do with
ffmpeg and ffmpeg-php though.

Thanks for your help, it is much appreciated!

Matt

unread,
Jun 3, 2008, 4:52:48 AM6/3/08
to ffmpeg-php
Has anyone figured this one out yet? I am having the same issue on
the same platform mentioned above, CentOS 5 and PHP 5.

I am glad I am not the only one struggling with this.

Thanks/

Ryan Parman

unread,
Jun 3, 2008, 9:11:48 PM6/3/08
to ffmpeg-php
"Me too."

Fedora 8 running on Amazon EC2 x86. I've been working on a set of
shell scripts that can be used to install nearly all possible FFMPEG
components, followed by the installation of the FFMPEG-PHP extension
in PHP 5.2.x (whatever the latest PHP is). A few weeks ago this worked
with no problems. Today it doesn't. The only variable between then and
now is that I pull FFMPEG from SVN, while everything else is a release
version of some sort.

For a while, we've been getting warnings that av_free_static() was
deprecated. Has it now gone missing?

Todd Kirby

unread,
Jun 3, 2008, 10:33:49 PM6/3/08
to ffmpe...@googlegroups.com

Ryan Parman

unread,
Jun 4, 2008, 12:26:54 AM6/4/08
to ffmpe...@googlegroups.com
So, what does that mean as far as getting it to work? Is it a wait-for-ffmpeg sort of thing? Is it a need-to-fix-ffmpeg-php sort of thing?

Would the simplest/fastest solution be to just check out an older revision and compile against that?

HostOnNet.com

unread,
Jun 4, 2008, 3:07:44 AM6/4/08
to ffmpeg-php
I have installed ffmpeg-php on a server, tried 5.0.1 and 5.0.3 (also
different PHP versions), i am getting

root@server36 [~]# php -v
PHP 5.2.5 (cli) (built: Jun 3 2008 16:42:59)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by
ionCube Ltd., and
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by
Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend
Technologies
php: symbol lookup error: /usr/local/lib/php/extensions/no-debug-non-
zts-20060613/ffmpeg.so: undefined symbol: av_free_static
root@server36 [~]#

Anyway to fix it ?

Todd Kirby

unread,
Jun 4, 2008, 3:08:25 AM6/4/08
to ffmpe...@googlegroups.com
You could check out ffmpeg from last week and probably be good. Or you can remove the call to av_free_static() in ffmpeg-php.c since it isn't really needed anymore and just rebuild ffmpeg-php.

I'm gonna put out an update with the fix and a few other minor fixes tonight or tomorrow.

-T-

Matt

unread,
Jun 4, 2008, 6:04:44 AM6/4/08
to ffmpeg-php
Thanks Todd!!

For reference, I just went into the ffmpeg-php.c file and commented
out the one instance of av_free_static (its a method call) and rebuilt
and everything worked!

Not sure what I will be missing without that but everything seems to
be working for the time being

On Jun 4, 12:08 am, "Todd Kirby" <ffmpeg....@gmail.com> wrote:
> You could check out ffmpeg from last week and probably be good. Or you can
> remove the call to av_free_static() in ffmpeg-php.c since it isn't really
> needed anymore and just rebuild ffmpeg-php.
>
> I'm gonna put out an update with the fix and a few other minor fixes tonight
> or tomorrow.
>
> -T-
>
> On Tue, Jun 3, 2008 at 6:26 PM, Ryan Parman <ryan.lists.warpsh...@gmail.com>

Ryan Parman

unread,
Jun 4, 2008, 10:33:58 AM6/4/08
to ffmpe...@googlegroups.com
Thanks Todd.

And Matt, thanks for the heads-up. I'll recompile everything today
(since Amazon EC2 only exists in the ether until you generate a new
image with what you have).

--
Ryan Parman
<http://ryanparman.com>

Todd Kirby

unread,
Jun 4, 2008, 5:08:40 PM6/4/08
to ffmpe...@googlegroups.com
On Wed, Jun 4, 2008 at 12:04 AM, Matt <mdaw...@gmail.com> wrote:

Thanks Todd!!

For reference, I just went into the ffmpeg-php.c file and commented
out the one instance of av_free_static (its a method call) and rebuilt
and everything worked!

Cool, I'll put out a fix today hopefully.

Not sure what I will be missing without that but everything seems to
be working for the time being

I looked at all the places where they updated code in ffmpeg (ffmpeg.c and output_example.c) and all they did was delete the av_free_static() call. They didn't replace it with anything, so I'm assuming it's obsolete.

Rpet

unread,
Jun 6, 2008, 12:37:29 PM6/6/08
to ffmpeg-php
I just had the same problem today, and once I commented out the call
it works great...


On Jun 4, 5:08 pm, "Todd Kirby" <ffmpeg....@gmail.com> wrote:

sumith

unread,
Jun 10, 2008, 10:09:32 AM6/10/08
to ffmpeg-php
Todd thanks a lot

commenting "av_free_static()" in ffmpeg-php.c worked for me also
thanks a lot keep the gud work

Brent

unread,
Jun 12, 2008, 1:43:30 PM6/12/08
to ffmpeg-php
I just went ahead and used the ffmpeg-php.class written in native php.
Screw ffmpeg-php, it's so very rarely updated....

Todd Kirby

unread,
Jun 12, 2008, 4:02:34 PM6/12/08
to ffmpe...@googlegroups.com
It's called PHP Video Toolkit now for those who are interested.

http://sourceforge.net/projects/phpvideotoolkit/

-T-

Todd Kirby

unread,
Jun 12, 2008, 4:05:52 PM6/12/08
to ffmpeg-php
ffmpeg;-php-0.5.3.1 fixes this issue.

On Jun 12, 10:02 am, "Todd Kirby" <ffmpeg....@gmail.com> wrote:
> It's called PHP Video Toolkit now for those who are interested.
>
> http://sourceforge.net/projects/phpvideotoolkit/
>
> -T-
>

Farrukh Ahmed

unread,
Jun 21, 2008, 6:25:33 PM6/21/08
to ffmpeg-php
Dear Todd,

I have used latest stable ffmpeg-php source code. Every thing went
fine however when i access phpinfo page i did not see ffmpeg
extension.

http://72.47.214.141/phpinfo.php

FYI,

[root@coolertalk ~]# php -r 'phpinfo();' | grep ffmpeg
ffmpeg
ffmpeg support (ffmpeg-php) => enabled
ffmpeg-php version => 0.5.3.1
ffmpeg-php gd support => enabled
ffmpeg.allow_persistent => 0 => 0
ffmpeg.show_warnings => 0 => 0

Also this one

[root@coolertalk ~]# php -i | grep ffmpeg
ffmpeg support (ffmpeg-php) => enabled
ffmpeg-php version => 0.5.3.1
ffmpeg-php gd support => enabled
ffmpeg.allow_persistent => 0 => 0
ffmpeg.show_warnings => 0 => 0

Also this one

[root@coolertalk httpdocs]# php phpinfo.php | grep ffmpeg
ffmpeg
ffmpeg support (ffmpeg-php) => enabled
ffmpeg-php version => 0.5.3.1
ffmpeg-php gd support => enabled
ffmpeg.allow_persistent => 0 => 0
ffmpeg.show_warnings => 0 => 0
OLDPWD => /usr/src/ffmpeg-php-0.5.3.1
_SERVER["OLDPWD"] => /usr/src/ffmpeg-php-0.5.3.1
_ENV["OLDPWD"] => /usr/src/ffmpeg-php-0.5.3.1
[root@coolertalk httpdocs]#

Best Regards.
---
Farrukh Ahmed

ScriptInstallation.in

unread,
Jun 21, 2008, 6:29:18 PM6/21/08
to ffmpeg-php


On Jun 22, 3:25 am, Farrukh Ahmed <f4fah...@gmail.com> wrote:
> Dear Todd,
>
> I have used latest stable ffmpeg-php source code. Every thing went
> fine however when i access phpinfo page i did not see ffmpeg
> extension.
>
> http://72.47.214.141/phpinfo.php
>
> FYI,
>
> [root@coolertalk ~]# php -r 'phpinfo();' | grep ffmpeg
> ffmpeg
> ffmpeg support (ffmpeg-php) => enabled
> ffmpeg-php version => 0.5.3.1
> ffmpeg-php gd support => enabled
> ffmpeg.allow_persistent => 0 => 0
> ffmpeg.show_warnings => 0 => 0
>

cli version of php may be using different php.ini

try

php -i|grep php.ini

Todd Kirby

unread,
Jun 22, 2008, 2:33:48 AM6/22/08
to ffmpe...@googlegroups.com
did you restart apache?

Farrukh Ahmed

unread,
Jun 22, 2008, 6:06:26 AM6/22/08
to ffmpeg-php
Dear Todd,

Yes, i have restarted apache.

Best Regards.
---
Farrukh Ahmed

>
> On Sat, Jun 21, 2008 at 12:29 PM, ScriptInstallation.in <flash...@gmail.com>

Farrukh Ahmed

unread,
Jun 22, 2008, 6:07:58 AM6/22/08
to ffmpeg-php
Dear Script,

Sorry for calling you script i do not know your name.

I have checked it and found that both php cli and php cgi are using
same /etc/php.ini and /etc/php.d/

Best Regards.
---
Farrukh Ahmed

On Jun 22, 3:29 am, "ScriptInstallation.in" <flash...@gmail.com>
wrote:

Todd Kirby

unread,
Jun 22, 2008, 3:47:49 PM6/22/08
to ffmpe...@googlegroups.com
Check apache error log and startup log to see if there's problems loading the extension.

-T-

Farrukh Ahmed

unread,
Jun 22, 2008, 10:26:43 PM6/22/08
to ffmpeg-php
Dear Todd,

I have checked logs and did not found any error regarding php
extension.

[Sun Jun 22 19:25:19 2008] [notice] caught SIGTERM, shutting down
[Sun Jun 22 19:25:20 2008] [notice] suEXEC mechanism enabled
(wrapper: /usr/sbin/suexec)
[Sun Jun 22 19:25:20 2008] [warn] RSA server certificate CommonName
(CN) `plesk' does NOT match server name!?
[Sun Jun 22 19:25:20 2008] [warn] RSA server certificate CommonName
(CN) `plesk' does NOT match server name!?
[Sun Jun 22 19:25:20 2008] [warn] Init: SSL server IP/port conflict:
default-72-47-214-141:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:78)
vs. webmail:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:133)
[Sun Jun 22 19:25:20 2008] [warn] Init: SSL server IP/port conflict:
coolertalk.com:443 (/var/www/vhosts/coolertalk.com/conf/httpd.include:
12) vs. webmail:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:133)
[Sun Jun 22 19:25:20 2008] [warn] Init: You should not use name-based
virtual hosts in conjunction with SSL!!
[Sun Jun 22 19:25:20 2008] [notice] Digest: generating secret for
digest authentication ...
[Sun Jun 22 19:25:20 2008] [notice] Digest: done
[Sun Jun 22 19:25:20 2008] [notice] mod_bw : Memory Allocated 0 bytes
(each conf takes 28 bytes)
[Sun Jun 22 19:25:20 2008] [notice] mod_bw : Version 0.8 - Initialized
[0 Confs]
[Sun Jun 22 19:25:21 2008] [notice] mod_python: Creating 4 session
mutexes based on 50 max processes and 0 max threads.
[Sun Jun 22 19:25:21 2008] [warn] RSA server certificate CommonName
(CN) `plesk' does NOT match server name!?
[Sun Jun 22 19:25:21 2008] [warn] RSA server certificate CommonName
(CN) `plesk' does NOT match server name!?
[Sun Jun 22 19:25:21 2008] [warn] Init: SSL server IP/port conflict:
default-72-47-214-141:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:78)
vs. webmail:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:133)
[Sun Jun 22 19:25:21 2008] [warn] Init: SSL server IP/port conflict:
coolertalk.com:443 (/var/www/vhosts/coolertalk.com/conf/httpd.include:
12) vs. webmail:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:133)
[Sun Jun 22 19:25:21 2008] [warn] Init: You should not use name-based
virtual hosts in conjunction with SSL!!
[Sun Jun 22 19:25:21 2008] [notice] Apache/2.2.3 (CentOS) configured
-- resuming normal operations

Best Regards.
---
Farrukh Ahmed

On Jun 23, 12:47 am, "Todd Kirby" <ffmpeg....@gmail.com> wrote:
> Check apache error log and startup log to see if there's problems loading
> the extension.
>
> -T-
>
Reply all
Reply to author
Forward
0 new messages