Larger Media upload 1.8.0 xibo docker

Hey Community,
i try to upload lager files.

System: xibo cms 1.8.1 docker.

I’ve change all the php.ini files which exist on the linux server.
But now there are an error, that the upload is abort.

have you any idea why it doesn’t work?

Thanks!

Unfortunately the version of PHP used in the container currently doesn’t support it, when we will move to PHP7 then it should be possible at that point - we do not have any date set for that at the moment.

Actually, that problem was addressed in PHP 5.6.0 (Changelog):

Uploads equal or greater than 2GB in size are now accepted.

Are you setting both upload_max_filesize and post_max_size to the desired upload limit? Both would be required for this purpose.

It may also be necessary to set mbstring.func_overload to 0 and memory_limit to something reasonable. Note that memory_limit will need to be less than 1G if you’re using the Xibo docker-compose since it creates an artificial hard limit for the container.

The container ships PHP 5.5.9 + security fixes, which is what comes with the Ubuntu 14.04 system on which the container is based.

If you wanted to upgrade to PHP 5.6 then yes that will probably resolve the issue, however given there’s also the possibility of that generating new issues etc, I’m not planning on releasing official containers with a different base until we hit PHP 7.

If someone wants to build unofficial PHP 5.6 series containers, then they are very welcome to do so, and can use the official Docker files as a base. Note however as far as I’m aware the ZeroMQ module for PHP 5.6 isn’t included in most binary distributions for Ubuntu, so that would need to be built via PEAR or similar (rather than installed from my PPA - since that doesn’t build for PHP 5.6).

Oh wow, I knew we were on PHP 5, but I didn’t realize it was 5.5. Then I stand corrected, it can’t be done without a custom CMS container, as @alex suggested.

This is unfortunate…

Is this still the case that Xibo’s preferred installation method does not support large files?

I ran into this yesterday before a presentation using version 1.8.2 Docker, only to find, I can’t do it. If Docker is the preferred method of running Xibo, then I think the large file problem should be addressed. My file was 150MB and through a Memory Limit error. Our custom back end took the file no problem. What is one to do with 4K files?

As I understand, this is a limitation of PHP 5.5.9, which was fixed in PHP 5.6.0. The docker container provided by the Xibo team run PHP 5.5.9, although you could build your own docker container (not supported, but possible).

I believe the Xibo team plans to move from PHP 5.5.9 to PHP 7 instead of incrementally upgrading from PHP 5.5.9 to 5.6.0 due to the potential to introduce new bugs, they’d rather work on upgrading to PHP 7.

I’m not sure what the time-frame is on that or whether PHP 7 will be introduced in Xibo 1.9.0 or a later revision?

One way of working around this limitation with 4K files would be cutting the large videos up into smaller files that can be uploaded into the CMS and then setting your layouts and campaigns to play the video clips in order. I’m not sure how seamless that would be in practice though.

Thank you for the reply, and I do appreciate your response as all points are completely valid. However, in the near future, as 4K becomes more relevant, displaying content with files of larger size becomes a more pressing issue and proves to be… well problematic. There are of course work-arounds at the current moment.

So, In short I would say that the urgency of supporting PHP7 should then have more weight moving forward?

I’ve pushed up today a container using PHP 5.6 for those that want to use it.

I’d greatly appreciate some feedback as to how that works out for people, as we’ll move to it by default if the feedback is generally good for the 1.8.3 release.

To use these, ensure you are already running 1.8.2 release, and then simply edit the image: lines in your docker-compose.yml (or variant) file, and append _5.6 for both the cms-web and cms-xmr containers. The cms-db container is unchanged)

So for example:

version: "2.1"

services:
    cms-db:
        image: mysql:5.6
        volumes:
            - "./shared/db:/var/lib/mysql"
        restart: always
        environment:
            - MYSQL_DATABASE=cms
            - MYSQL_USER=cms
            - MYSQL_RANDOM_ROOT_PASSWORD=yes
        mem_limit: 1g
        env_file: config.env
    cms-xmr:
        image: xibosignage/xibo-xmr:release_1.8.2_5.6
        ports:
            - "9505:9505"
        restart: always
        mem_limit: 256m
        env_file: config.env
    cms-web:
        image: xibosignage/xibo-cms:release_1.8.2_5.6
        volumes:
            - "./shared/cms/custom:/var/www/cms/custom"
            - "./shared/backup:/var/www/backup"
            - "./shared/cms/web/theme/custom:/var/www/cms/web/theme/custom"
            - "./shared/cms/library:/var/www/cms/library"
            - "./shared/cms/web/userscripts:/var/www/cms/web/userscripts"
        restart: always
        links:
            - cms-db:mysql
            - cms-xmr:50001
        environment:
            - XMR_HOST=cms-xmr
        env_file: config.env
        ports:
            - "80:80"
        mem_limit: 1g

Edit your config.env file, and add lines as follows to the end:

CMS_PHP_POST_MAX_SIZE=4G
CMS_PHP_UPLOAD_MAX_FILESIZE=4G
CMS_PHP_MAX_EXECUTION_TIME=300

That will configure a 4G limit.

Then docker-compose up -d should switch your PHP version. If you hit issues, removing the _5.6 from both image: lines, and then docker-compose up -d should switch you back again.

Please can you also keep an eye on your daily automated backups using this version. It should generate a latest.sql.gz file each day as before, and also a previous.sql.gz file, only rotating them if the backup is successful. That addresses the following issue:

We are actively testing for PHP 7, but it’s taking longer than we’d hoped it would, hence this interim solution.

150MB should be well within what the release containers can take.

They’re configured by default to allow uploads up to 2GB. Unless you’re uploading feature film length content, then that’s adequate in my experience for the vast majority of scenarios.

Hey Alex,

Just wanted to follow up regarding the interim PHP 5.6 release, so far no issues relating to the PHP upgrade have been noticed.

I’ll report back if we run into anything.

Thanks,

Taylor

1 Like

the media upload works fine!
Update Xibo 1.8.3

1 Like

Does anyone know if there is a hard limit to max file size with PHP 5.6?

Was running 1.8.2_5.6, but am currently running 1.8.3 and attempting to upload a test video that is 6.74GB.
I’ve set the upload limit to 10G and set the php max execution time to 600.
Upload progress bar does not move on either 1.8.2_5.6 or 1.8.3 and eventually the login times out.

I’ve not had issues with smaller files, this is the largest file I’ve tested so far.

If it could be so easy i think developers could do it in 1.8.
Also need this feature…need to translate 5.6gb video on android devices.