Hi,
I have kaltura 11.7 installed and running.
I’m trying to switch the installation (for performance) to php-fpm, any recommendation for doing that?
Ofer
Hi,
I have kaltura 11.7 installed and running.
I’m trying to switch the installation (for performance) to php-fpm, any recommendation for doing that?
Ofer
Hi,
We did that just last week and everything works but you need to make 3 changes:
You need to edit this file:
html5lib/$YOUR_VERSION/modules/KalturaSupport/RequestHelper.php
Go to $requestHeaders = getallheaders(); and patch the code this way:
<?php
if (!function_exists('getallheaders')) {
function getallheaders() {
$headers = [];
foreach ($_SERVER as $name => $value) {
if (substr($name, 0, 5) == 'HTTP_') {
$headers[str_replace(' ', '-', ucwords(s
trtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
}
}
return $headers;
}
}
$requestHeaders = getallheaders();
Be careful because you need to do it for every active player or each time you update your player.
#php_value session.save_handler "files"
#php_value session.save_path "/var/lib/php/session"
#php_flag engine off
Be careful because it is a security setting and everyone can upload a php executable !!
So far it has worked well and it’s a great relief from the archaic apache pre_fork model which really gave us a lot of performance headaches.
regards,
David
Didn’t you need to change configuration in the kaltura conf files, only apache generic files?
Which apache version do you use?
Sorry,
I pressed Enter by mistake before finishing my post.
regards
One last thing:
On enabled.kaltura.conf we added the cgi handler after the last Directory statement:
# Handler for PHP-FPM
<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>
Regards
I used Apache 2.4 and standard php 5.4 and php-fpm under Centos 7.
Regards
Hi all,
Following up on this since I’m about to release a version for CentOS/RHEL 8 where FPM is the default PHP SAPI.
Please see this pull for the configuration changes:
In particular, look at https://github.com/kaltura/server/pull/8942/files#diff-5ba96347d2f7e5465a08d0f1190931cdR251
This provides the same defense as the php_flag
directive.