# FreeBsd, ffmpeg and PHP cli



## Palleas (Sep 15, 2009)

Hello !

I'm having some issues with PHP cli. When I use the php commande, I have theses error messages : 



> PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20                                                                         060613/ffmpeg.so' - Shared object "libavformat.so.1" not found, required by "ffm                                                                         peg.so" in Unknown on line 0
> 
> Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/2006061                                                                         3/ffmpeg.so' - Shared object "libavformat.so.1" not found, required by "ffmpeg.s                                                                         o" in Unknown on line 0



As I'm more confortable with Ubuntu I must admit I'm kind of lost here...
Ffmpeg is not in my php.ini nor loaded as a module (according to my "php -m"), I'm really stuck...

Has anybody ever met this issue ?

Thanks!


----------



## DutchDaemon (Sep 15, 2009)

I think PHP will simply try to load anything in the /usr/local/lib/php/20060613/ directory, whether you tell php.ini to or not. 

What is the output of [cmd=]pkg_info -W /usr/local/lib/php/20060613/ffmpeg.so[/cmd]? That will tell you which package/port installed ffmpeg.so (probably graphics/php5-ffmpeg, though it lacks a file list).

I can tell you that the missing libavformat.so.1 belongs to multimedia/ffmpeg. You could just install that one, restart Apache, and be done with it.


----------



## DutchDaemon (Sep 15, 2009)

Palleas said:
			
		

> Ffmpeg is not ... loaded as a module (according to my "php -m")



No, of course not. After all, it _failed to load_


----------



## aragon (Sep 15, 2009)

```
cd /usr/local/etc/php && grep -v ffmpeg.so extensions.ini > e && mv e extensions.ini
```


----------



## Palleas (Sep 16, 2009)

DutchDaemon said:
			
		

> I can tell you that the missing libavformat.so.1 belongs to multimedia/ffmpeg. You could just install that one, restart Apache, and be done with it.



It has nothing to do with apache, because I'm using PHP in cli mode, but thx anyway 



			
				Aragon said:
			
		

> cd /usr/local/etc/php && grep -v ffmpeg.so extensions.ini > e && mv e extensions.ini



It worked! 

Thanks a lot guys !


----------



## DutchDaemon (Sep 16, 2009)

Ok, then you may as well pkg_delete the port that installed that .so


----------



## Palleas (Sep 16, 2009)

```
[root@server]/usr/ports/multimedia(204): pkg_delete ffmpeg
pkg_delete: no such package 'ffmpeg' installed
```

That's strange oO


----------



## DutchDaemon (Sep 16, 2009)

http://forums.freebsd.org/showpost.php?p=41411&postcount=2


----------

