KalturaCE installer miscalculates server root

My issue votes
0
votes
0/20 total votes used
Project:Kaltura Community Edition (CE) - Self Hosted Online Video Platform
Version:partnerServices3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Total votes:0
Description

KalturaCE assumes that the DocumentRoot setting does not have a trailing slash, which AFAIK is valid (although not recommended).

Sites which have a trailing slash on their Apache Document Root are not able to install KalturaCE. The symptoms are that the installer will complete successfully, but doesn't show a meaningful error message after the KalturaClient fails to generate the admin user account in registerLocalAccount.

The Kaltura installer doesn't handle this because it does an rtrim($path,'/') for $CE_abs_path and doesn't do the same for $server_root.

Attached is a patch which resolves this, although an alternate solution is to remove the trailing slash from your Apache2 DocumentRoot setting (it won't hurt). This patch also includes a couple of typo fixes, and the fix from http://www.kaltura.org/database-errors-installation-not-shown although I'm unsure if it's required.

If you are affected by this rtrim bug, you will find that the settings in KALTURA_ROOT/kaltura/alpha/config/kConf.php do not reflect the correct URL; you'll see settings like this instead, and your post-install "Continue" button will point to a 404 page.

                self::$map =
                        array (
                                // take over the symfony config (sfConfig)
                                "sf_debug" => false,
                                "sf_logging_enabled" => true,
                                "sf_root_dir" => SF_ROOT_DIR,
                                "www_host" => "kaltura.lan.grdev.co.nz/var/www/kalturaCE", // shows filesystem path, not URL path
                                "cdn_host" => "kaltura.lan.grdev.co.nz/var/www/kalturaCE", //

@Kaltura team, please consider adding "patch" at the allowed extensions list :)

--
www.giantrobot.co.nz * http://twitter.com/grobot

AttachmentSize
5306-incorrect_server_root.patch_.TXT2.94 KB