Loading ffmpeg-php module fails - php

I've been trying this for a couple of days now. I am trying to install ffmpeg-php on my CentOS server.
OS : CentOS 6
PHP : 5.5
ffmpeg : 1.2.1
ffmpeg-php : 0.6.0
The ffmpeg installation went on without a hitch and I am able to convert files back and forth via the CLI.
While installing ffmpeg-php, I encountered errors while making (after configuring) due to time.h references which was corrected by renaming the files creating with an extension .loT to .lo (as rightly pointed out here)
Once this was done, the make process went on smoothly and the make install went through without a hitch. However, after specifying the extension=ffmpeg.so in the php.ini file and after restarting Apache, the module doesn't load or show up in phpinfo().
The Apache error log shows only "PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'ffmpeg.so' in Unknown on line 0" and nothing else.
make test also shows the same error and FAILS the associated tests. I've checked here which wasn't very helpful. Also, I read somewhere that it may be the issue with permissions but the permissions for the ffmpeg.so file is 755.
Any help is appreciated.
Thanks in advance.

After looking up for hours, it seems that time.h for some apparent reason has been used in ffmpeg 1.2.1 (this is what I tested). This caused conflict with the OS's own file of the same name. This causes the installation to break in CentOS 6.x, RHEL 5.6 and RHEL 6.x
While I cannot code in PHP (and can barely read PHP code), I have found a git repo maintained by tony2001 who has made changes to the original project and using his repo has helped me install it successfully on CentOS-6.2, CentOS-6.3 and CentOS-6.4.
You can find the repo here. This seems to solve the issues in CentOS 6.x, RHEL 5.6 and RHEL 6.x.
Hope this helps anyone else trying this in the future (and maybe someone else who lands up here eventually)
PS: Incidentally, at the time of writing this answer ffmpeg 2.0 has been released but I haven't got a chance to test it yet

Related

"Your PHP installation appears to be missing the MySQL extension which is required by WordPress."

I've spent 5 hours trying to resolve this issue. I've used every suggestive link that was relevant to my issue that Google listed. Nothing seems to work.
The OS is CentOS 6.5 and has Apache, PHP, and MySQL installed. I have several WordPress intranet sites working for almost a year with my subdomain xxxxx.xxxx.com.
First of all, I updated PHP 5.3.3 to the latest version. After that I got the error that MySQL extensions were not installed. I followed the different resolutions I could find and could not get a resolve. I therefore decided to remove php and install the older version I originally had. Since that time I am running into three problems.
My domain now only shows the Apache page whereas it use to show my website;
When I try to find out what php version I have by using the command php -v I would get what version was installed. After removing the updated version and installing the older one I get the error "php: command not found";
When I try to remove the older version I can't find it's install location and phpinfo.php doesn't work (may have put it in the wrong place)
Any help resolving this issue would be greatly appreciated
i faced the same problem with my centos 7 installtion with php-fpm ..
the solution was to install php-gd and php-pdo packages. those were the essential packages somehow required to make this all work.. good day
"Your PHP installation appears to be missing the MySQL extension which is required by WordPress."
For others who may run across this same problem. The majority of the help I found Googling the problem dealt with editing the php.ini to uncomment the MySql extensions. Some even go as far as to say that there is only one thing that causes this problem.
However, what resolved my problem was actually downloading and installing php55-mysql to include the extensions. So be sure to take a look at that as well.

Loading PHP MongoDB class with XAMPP on Windows 7

Okay.
I'm trying to use MongoDB with Node.js and PHP/XAMPP on Windows 7, but I can't seem to install the PHP MongoClient Class at all.
I am a complete beginner with MongoDB and I have to say that if I wasn't committed to solving this I'd have given up by now.
After lots of fiddling around trying to install the correct device driver version etc., I have come across yet another problem. But first, let me explain the steps I have taken so far.
Installed XAMPP v3.2.1, keeping all defaults.
Looked at phpinfo() on localhost:
PHP Version: 5.5.15. PHP Architecture: x86. Thread-Safe: Enabled.
Figured out where to download the software, as well as the correct version, etc.
Went to pecl.php.net/package/mongo/1.5.5/windows/.
At "DLL List" (PHP 5.5), I selected: `5.5 Thread Safe (TS) x86.
Went to PHP.ini (not the development or production version, but the actual one), and added 1 line: extension=php_mongo.dll. (line 887). No semicolon in front.
Started Apache.
Error: PHP Startup: C:\xampp\php\ext\php_mongo.dll could not be found on your computer.
I found out that when you manually type the file extension of a program that is already saved as a specific type, my computer simply prepends it to the existing one. The program was saved with the extension dll.dll. I got rid of that.
Restarted Apache.
Then I got this... Error: PHP Startup: Libsasl.dll is not found on your computer. Unable to load dynamic library C:\xampp\php\ext\php_mongo.dll. Try reinstalling the program.
I reinstalled the program. As I suspected, no missing file was magically created.
I then looked online to try to find this 'dll' file. After some searching, I was able to install Libsasl.dll via dll-files.com.
I restarted Apache.
Next problem:
Error: PHP Startup: Unable to load dynamic library C:\xampp\php\ext\php_mongo.dll - Access is denied.
I tried running XAMPP as an administrator. Same result.
The program is definitely there, but I can't seem to access it for whatever reason.
Why? I am getting quite frustrated with this and I would love everything to start working properly.
I have a hunch that it has something to do with read/write privileges but I don't know where to look.
Some help would be appreciated.
I was facing same issue, then after adding the path of the ".dll" file's folder to the environment variable as a system variable path, it worked. It is then able to find the file. At the end that was the only step which was stopping xampp to load the ".dll" file, although it was present in that folder. Often people miss this step as it is no where pointed out clearly.

PHP intermittently unable to load json.so (PHP 5.4.19 on Ubuntu 12.04 LTS)

I'm using Ubuntu 12.04 LTS and needed PHP 5.4 so I'm using Ondřej Surý's (php5-oldstable) package.
Both phpinfo and the CLI show that JSON is enabled:
#php -i | grep -i json
json
json support => enabled
json version => 1.2.1
My application mostly works. But periodically (approx one page refresh in ten) there is a PHP error. This only happens intermittently.
PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/json.so'
- /usr/lib/php5/20100525+lfs/json.so: cannot open shared object file:
No such file or directory "json.so"
How do I fix this?
I think that possible culprit (as I have answered in email) is that you are loading json extension somewhere from the configuration file.
The JSON extension is compiled in the core for PHP 5.4, so you should not load it by hand.
Please check that you don’t have:
json.ini somewhere in the /etc/php5/{mods-available} left over from previous PHP 5.5 installation
you are not loading JSON extension from the mentioned script, e.g. no dl(json.so).
Make sure you have stopped and started Apache2 (same applies to php5-fpm) when changing major versions. The symptoms might indicate that there was some stuck Apache2 thread with previous PHP from package loaded (that would be PHP 5.5 with json-c based JSON extension in this case).
Since you're saying that the json extension is loaded in phpinfo()'s output you could be dealing with a bug. Have you checked if the module file is actually there in the filesystem?
You have the following options:
Compile PHP 5.4 from source with Apache 2.4
Upgrade to the same repo's stable version which will give you PHP 5.5 + Apache 2.4.
Submit a bug with the Ondrej in Ubuntu's PPAs and wait for it to be resolved.
For more information check the debphp site.
Submitting a bug is a must, since if it is a real one it must be fixed for all users.
You could firstly go with option 2 if you don't conflict with the Migration guidelines like backward compatibility, deprecated functions, etc.. SO check it and decide.
It also strongly varies depending on the machine you have to do this with. If it is a critical production server, you may not want to compile of change versions on it. Go file the bug and see what the package maintainers have to say about this.
Also please write a reply here when your problem is resolved. I am quite curious as to what it is and hopefully was. :D
One point that doesn't diagnose or solve the issue (and seems to refer to PHP 5.5), but might help with tracing its root cause:
This Debian bug report and Phil Sturgeon's blog explain that some Linux distributions have chosen to replace the official PHP implementation of ext/json with the drop-in compatible pecl-json-c. The rationale was that Douglas Crockford's implementation contains a non-free clause in the license ("The Software shall be used for Good, not Evil"). See also this blog post.

EasyPHP 12.1 Unable to load dynamic library

This is one of the errors that I get when I launch php command in my Windows prompt.
I've installed the environment through EasyPHP 12.1 installer. This is a minor problem, since i can use without any problem the full LAMP stack.
I noticed the problem just because ApiGen needs mbstring to create documentation (picture above actually is related to bz2 library, but nothing changes for other missing library). Last path in the warning sounds strange since don't exist nothing PHP related in my LaTex distribution. Any suggest about the problem???
Time ago I have same problem. This work for me.
http://czetsuya-tech.blogspot.cz/2011/02/solving-php-startup-unable-to-load.html

curl is activated but is not showing in phpinfo

I have a problem that curl is not showing in phpinfo as i am using wampserver(64 bit) but when i open php and then php extensions a tick is placed in front of php_curl in my wamp server but still curl is not displayed in phpinfo.
Can anyone help me?
I ran into this issue myself a couple of days ago, the only way I could fix it is by installing apache addon version 2.2.9 and php addon version 5.3.1
Both are available in the addons section of the download page at http://www.wampserver.com/en
EDIT::
This only happened to me on my 64bit laptop, my 32bit desktop runs the latest versions just fine with no issues
Also... if you look in (C):\wamp\logs\apache_error (or whatever path you've installed to) I suspect you will see an error similar to this..
PHP Warning: PHP Startup: Unable to load dynamic library
'c:/wamp/bin/php/php5.4.3/ext/php_curl.dll' - The application has
failed to start because its side-by-side configuration is incorrect.
Please see the application event log or use the command-line
sxstrace.exe tool for more detail.\r\n in Unknown on line 0
Since this question is fairly old now and since I've experienced this issue again on my new laptop, and other users have visited the answer I've given here.. It appears if you use the 32bit installation of wampserver, even on a 64bit platform, this issue doesn't occur and it's the easiest way to avoid it.
I had the same problem with curl library on Windows 7 x64 but i just downloaded fixed version of php_curl.dll library from here: http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/ and it was well.
This is where I finally found my answer:
PHP cURL not working - WAMP on Windows 7 64 bit
There, Matthieu Napoli says:
Go to
http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/
and download the curl version that corresponds to your php version
under "Fixed curl extensions:".
So if you have php 5.3.13, download "php_curl-5.3.13-VC9-x64.zip". Try
the "VC" version first. Then replace the php_curl.dll in ext folder.
This worked for me.

Categories