Active
Project:
H5P - Create and Share Rich Content and Applications
Version:
7.x-1.26
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
1 Mar 2017 at 12:10 UTC
Updated:
27 Mar 2023 at 23:24 UTC
Jump to comment: Most recent
Comments
Comment #2
tajakobsen commentedA Jira ticket has been created for tracking this issue.
Comment #3
paalj commentedComment #4
Anonymous (not verified) commentedMy experience with this is that I had created several H5P nodes before enabling S3FS, later enabled S3FS & set it to take over public files (public://), & it broke the whole site. When navigating to an H5P node the site would freeze & in fact PHP-FPM would go into a death spiral, consuming more & more resources until the EC2 instance it was running on became unresponsive & was replaced by the Elastic Load Balancer. I didn't investigate further, since I disabled S3FS at that point. https://h5ptechnology.atlassian.net/browse/HFP-801?focusedCommentId=2032...
Comment #5
matthew.t commentedHi all,
I am just wondering if there was any success from anyone in making H5P working with S3 using s3fs module?
Thank you,
Matt
Comment #6
sksshed commentedWe use S3FS with H5P, we are onily using S3 FS for private file storage though.
Comment #7
jukka792 commentedSame issue with D8, does not work with S3FS module. The site will be broken, and H5P -settings page does not work.
It does not give any errors, only webserver logs shows some Fata PHP errors.
Comment #8
anaconda777 commentedI guess the reason is this:
https://www.drupal.org/project/s3fs/issues/3022812
At least with D8 you can't use S3FS module with H5P. Not sure about the new 2.0 Beta.
Comment #9
keiserjb commentedRunning into this problem, wondering if anyone has solved it.
Comment #10
Youcanlearnit commentedHas anyone yet been able to user H5P with S3 or R2 ?
Quick glance at H5P's code it appears it is hard coded to use public:// and H5P assumes that public:// is local to the server. H5P make several calls similar to code> \Drupal::service('file_system')->realpath('public://');.
Drupal API documentation for realpath():
Only use this function if you know that the stream wrapper in the URI uses the local file system, and you need to pass an absolute path to a function that is incompatible with stream URIs.
S3FS does not support realpath() as it is a remote stream.
This can only be fixed inside of the H5P module.
Comment #11
keiserjb commentedI spent all day trying things that didn't work. I'm running the h5p 2.0.0-alpha2 version in Drupal 9.3.18.
Comment #12
rex.barkdoll commentedCould the maintainers update the version of this request for the 2.X version of the module? This is still a relevant problem and shouldn't be forgotten about as we move into the future.
Our situation is that we run a pretty lean server for our website and do our file storage on S3. We managed to max out our server storage by uploading some courses before we realized that this module doesn't follow the best practices - using Drupal's file storage system. I'm having a hard time seeing how H5P can ever be scalable in its current state.
For others looking into this issue, here are some links all relating directly to this problem:
The issue on H5P.org: https://h5p.org/node/1189#comment-48933
The other H5P Drupal.org issue: https://www.drupal.org/project/h5p/issues/2955095
Here's the H5P Jira ticket related to this issue: https://h5ptechnology.atlassian.net/browse/HFP-801
Comment #13
jukka792 commentedI solved it, just dont use S3 at all. Create your own scalable filesystem, and mount it to your Drupal application servers. Thats maybe not so cheap solution but at least it is not AWS related.