PHP not working any more

belltown

New member
I have been getting a lot of errors when trying to run PHP scripts.

Code:
PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/ffmpeg.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/ffmpeg.so: cannot open shared object file: No such file or directory

The errors started at 2014-04-12 14:48:51 PDT on both the PHP scripts I have been running, and have been happening consistently until now.

Is there a missing PHP library???
 

Genesis

Administrator
Staff member
We'll have to ask DJB to check Belltown and it's probably early morning hours in the UK right now. Hopefully he can sort it out soon.
 

admin

Administrator
Staff member
The`re errors for FFMPEG, which is currently not installed. Which script are using?
 

jaran

New member
DJB is right. The problem is coming on yours. You looks missing ffmpeg.so file to load your script.
 

belltown

New member
DJB said:
The`re errors for FFMPEG, which is currently not installed. Which script are using?
I'm not using FFMPEG or any script which might use it. I'm using my own scripts.

Upon further investigation, it appears that my php programs are actually working, although they are are filling up my logs with these error messages. This even happens on scripts that do nothing. The messages are appearing in my "public_html\error_log" file, as well as my own application logs.

Here is a test script which will reproduce the error:

Code:
<?php
ini_set ('display_errors', 1);
error_reporting (E_ALL);
set_error_handler ('errorHandler');					
set_exception_handler ('exceptionHandler');
register_shutdown_function ('shutdownHandler');

function errorHandler ($errNo, $errStr = '', $errFile = '', $errLine = '') {
	
	if (error_reporting () == 0) {
		return;
	}
	
	$errorList = array (
					   E_ERROR				=> 'E_ERROR',
					   E_WARNING			=> 'E_WARNING',
					   E_PARSE				=> 'E_PARSE',
					   E_NOTICE				=> 'E_NOTICE',
					   E_CORE_ERROR			=> 'E_CORE_ERROR',
					   E_CORE_WARNING		=> 'E_CORE_WARNING',
					   E_COMPILE_ERROR		=> 'E_COMPILE_ERROR',
					   E_COMPILE_WARNING	=> 'E_COMPILE_WARNING',
					   E_USER_ERROR			=> 'E_USER_ERROR',
					   E_USER_WARNING		=> 'E_USER_WARNING',
					   E_USER_NOTICE		=> 'E_USER_NOTICE',
					   E_STRICT 			=> 'E_STRICT',
					   E_RECOVERABLE_ERROR	=> 'E_RECOVERABLE_ERROR'
					   );
	if (array_key_exists ($errNo, $errorList)) {
		$errType = $errorList [$errNo];
    }
	else {
		$errType = 'E_EXCEPTION';
    }

	echo (date ('Y-m-d H:i:s ').'*** ERROR: '.$errType.' Line '.$errLine.' '.$errStr.' ***  ');
	exit;
}

function exceptionHandler ($exception) {
	errorHandler ($exception->getCode (), $exception->getMessage (), $exception->getFile (), $exception->getLine ());
}

function shutdownHandler () {
	$lastError = error_get_last ();
	switch ($lastError ['type']) {
		case E_ERROR:
		case E_CORE_ERROR:
		case E_COMPILE_ERROR:
		case E_USER_ERROR:
		case E_RECOVERABLE_ERROR:
		case E_CORE_WARNING:
		case E_COMPILE_WARNING:
		case E_PARSE:
			errorHandler ($lastError ['type'], $lastError ['message'], $lastError ['file'], $lastError ['line']);
	}
}

echo 'Hello World!<br><br>';
?>

You can run it here and see the error: http://belltown.gi9.co/test.php

Here is the contents of my public_html\error_log file after running the script:

Code:
[13-Apr-2014 13:17:54 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/ffmpeg.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/ffmpeg.so: cannot open shared object file: No such file or directory in Unknown on line 0
 

jaran

New member
It only can resolving with disable that extention over php.ini
- Open /usr/local/lib/php.ini
- Then disable the extention become
Code:
;;extension=ffmpeg.so
 

Genesis

Administrator
Staff member
@Chris. Could it be something to do with old php session files in /tmp that need to be deleted or cache emptied out? Hence why the ffmpeg error is showing up when it is no longer installed?
 

un4saken

Administrator
Fixed


edit:

lol
:diablo:
ISAaQ1e.png
 

belltown

New member
It seems to be working perfectly again - no errors since 13:14:26 UTC. Thanks for the help.

Just curious what the problem was?
 

un4saken

Administrator
belltown said:
It seems to be working perfectly again - no errors since 13:14:26 UTC. Thanks for the help.

Just curious what the problem was?

That's a php 5.3 bug with ffmpeg extension. I thought i have fixed it already. :)
 

belltown

New member
un4saken said:
belltown said:
It seems to be working perfectly again - no errors since 13:14:26 UTC. Thanks for the help.

Just curious what the problem was?

That's a php 5.3 bug with ffmpeg extension. I thought i have fixed it already. :)

Thanks for taking care of the problem so quickly.