Bobcares

How to fix PHP FFmpeg error “Unable to load dynamic library ‘/usr/local/lib/php/extensions/no-debug-non-zts-20090626/ffmpeg.so'”

by | Aug 19, 2016

Server wide errors are always a panic situation for server owners. A single server wide error can affect multiple websites in a split-second.

To maintain business credibility, its therefore crucial to fix server wide errors promptly. At Bobcares, we do this for our shared hosting customers, with our technical support services.

Recently we were contacted by a server owner, with this concern – “Hi, All my PHP sites show the same error:”

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/ffmpeg.so' - libavformat.so.54: cannot open shared object file: No such file or directory in Unknown on line 0

What this error means?

FFmpeg is a module that helps to record, convert and stream audio and video in websites. Many websites require this PHP module for audio and video streaming.

For any PHP module to work fine, it should be compiled and configured correctly. If not, it would give errors when the websites try to use these modules.

The error shown here says that PHP is unable to load the dynamic library for FFmpeg module. This error is a server wide one and can affect all websites using this module.

How to debug this error?

FFmpeg error can happen in PHP sites if the module is not properly installed or if there are any configuration issues.

Today we’ll see which all factors can trigger this error and how to fix them one by one.

1. FFmpeg module is not properly installed

The first step is to check that the FFmpeg module is properly installed in the server. The command ‘which ffmpeg’ helps to know if its installed.

If the module is not installed, you can install it using:

yum install ffmpeg ffmpeg-devel

2. The path to the library is wrong

By default, all required libraries for FFmpeg would be installed under /usr/local/lib/ directory. But if the FFmpeg binary looks in a different path, these libraries would not be found.

Using the command 'ldd which ffmpeg', it is possible to know the path to the library to which ffmpeg binary is linked to.

To make ffmpeg check the libraries in the correct path, do the following steps:

export LD_LIBRARY_PATH=/usr/local/lib/ echo /usr/local/lib > /etc/ld.so.conf.d/custom-libs.conf ldconfig

It is also possible to correct this error by adding symbolic links to the library files.

3. Library files missing

This error can also happen due to related libraries for FFmpeg missing. Installing the ‘ffmpeg-devel’ module will install all the required libraries for FFmpeg.

4. Configuration errors in php.ini

Improper settings in the php.ini file can cause the FFmpeg module of PHP to show errors. So its important to verify that the settings in the php.ini file, say ‘/usr/local/lib/php.ini’, are correct.

Make sure that the FFmpeg module is added correctly in the php.ini.

[ffmpeg]
extension=ffmpeg.so

Also confirm that the extension_dir in php.ini is set correctly, which should ideally be ” ” (empty).

extension_dir = " "

Once the settings are corrected, restart apache. You can confirm that FFmpeg is now enabled with php, using a phpinfo() file.

In short..

Here we discussed some of the basic reasons why FFmpeg errors can happen and what are the checks to be performed to fix the error.

During our support experience, we have also noticed that other issues like dependency errors during install, module added twice, wrongly set paths, extension directory, etc., cause FFmpeg errors.

Bobcares engineers debug server errors using a step-by-step approach, ruling out all possible causes, in the order of its priority and probability.

This helps us pinpoint the actual issue and come up with a permanent solution for the errors. If you’d like to know how to fix you server errors, we’d be happy to talk to you.

 

Get a FREE consultation

Do you spend all day answering technical support queries?

Wish you had more time to focus on your business? Let us help you.

We free up your time by taking care of your customers and servers. Our engineers monitor your servers 24/7, and support your customers over help desk, live chat and phone.

Talk to our technical support specialist today to know how we can keep your service top notch!

TALK TO AN EXPERT NOW!


var google_conversion_label = "Blp0CLCojHIQ0aD71QM";

Bobcares provides Outsourced Hosting Support for online businesses. Our services include Outsourced Web Hosting Support, Outsourced Server Support, Outsourced Help Desk Support, Outsource Live Chat Support and Phone Support Services.

4 Comments

  1. senior developer

    How can I solve this problem?
    pls help me.

    Reply
    • Sijin George

      Hello,
      We can help you with the FFmpeg error. If you still have errors and need help, we’ll be happy to talk to you on chat (click on the icon at right-bottom).

      Reply
  2. Andrew

    I have USBServr v.10, its portable version for Win. Can You show me step by step how install ffmpeg? thnks.

    Reply
    • Hiba Razak

      Hello,
      Please contact our support team via live chat(click on the icon at right-bottom).

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF