Wordpress. Validating h5p package failed.

Hi Guys,

I'm hosting with Pantheon and have installed the plugin fine.

When I try to add content via the hub, or upload manually I get this error:

Validating h5p package failed

I've tried several random content types and this happens every time.

Screenshot: https://www.dropbox.com/s/y2wjuz0bqehpwdq/Screenshot%202017-09-28%2009.2...

I also can't upload my own.

I'm running Wordpress 4.8.2, and version 1.9.2 of the H5P plugin.  I have ZipArchive and mbstring available, and am running PHP Version 7.0.23.

My upload limits are also ample.

I've attached my phpinfo() - this is a dev server in a none publi environment.

Any one have any advice?

thomasmars's picture

Your setup looks correct.
Can you check you browser console, network tab and PHP error logs for any additional information that can indicate what is going wrong ?

Thanks Thomas,


Here's the ajax request that's made when the install button is licked (copied as cURL):

curl 'http://dev-zaid-crowe-guitar-lessons.pantheonsite.io/wp-admin/admin-ajax...' -X POST -H 'Authorization: Basic emFpZDpwYW50cw==' -H 'Origin: http://dev-zaid-crowe-guitar-lessons.pantheonsite.io' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36' -H 'Content-Type: text/plain;charset=UTF-8' -H 'Accept: */*' -H 'Referer: http://dev-zaid-crowe-guitar-lessons.pantheonsite.io/wp-admin/admin.php?...' -H 'Cookie: autoptimize_feed=1; wordpress_b4df5bc941b81bfc54205ef7b94c95cd=admin%7C1506782589%7CdolZBXqjvhmJZp5svR5Fz7ehb7UT2RnoQ3uGJxplGgE%7C75ea2d72138b79f03126228ef11050ec88afbec16c819c81e147bac38359d928; DOPBSP_reservations_calendar=1; DOPBSP_reservations_view=list; DOPBSP_reservations_status_pending=false; DOPBSP_reservations_status_approved=false; DOPBSP_reservations_status_rejected=false; DOPBSP_reservations_status_canceled=false; DOPBSP_reservations_status_expired=false; DOPBSP_reservations_payment_methods=; DOPBSP_reservations_per_page=25; DOPBSP_reservations_order=ASC; DOPBSP_reservations_order_by=check_in; wp-settings-1=libraryContent%3Dbrowse%26editor%3Dtinymce%26advImgDetails%3Dshow; wp-settings-time-1=1506084749; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_b4df5bc941b81bfc54205ef7b94c95cd=admin%7C1506782589%7CdolZBXqjvhmJZp5svR5Fz7ehb7UT2RnoQ3uGJxplGgE%7C704674d8c29329ccb911b4bf3ee756056607208efb55d68f92c26a264a40bbd3; SESS2ab478fc5bc5ead66464b05df226dbd5=dcef73c3cd2b36d4b1350e86dc0459bd; _ga=GA1.3.768532483.1505897675; _gid=GA1.3.901931892.1506588098' -H 'Connection: keep-alive' -H 'Content-Length: 0' --compressed


Which returns: {"success":false,"message":"Validating h5p package failed.","errorCode":"VALIDATION_FAILED"}


After Some digging I found this in the logs:


[28-Sep-2017 08:13:36 UTC] PHP Warning:  rename(): Cannot rename a file across wrapper types in /srv/bindings/3e144dd00312486ebe5eb5ed2011dfaa/code/wp-content/plugins/h5p/admin/class-h5p-plugin-admin.php on line 524


It's possible this is something I need speak to my host with as they are pretty specialised, and have some (extremely sensible) restrictions in place.  Are you able to tell me what the plugin is trying to do at this point, so I can go back to them with come back ground?


icc's picture


Could you try to download the content type you wish to install from the examples page, there should be a download button in the lower left corner of the content. And then, try to upload the downloaded file using the form on your WordPress's H5P Libraries page. If this fails it should give you a more detailed error message on what's wrong.

I get the same error, but output to the screen: Warning: rename(): Cannot rename a file across wrapper types in /srv/bindings/3e144dd00312486ebe5eb5ed2011dfaa/code/wp-content/plugins/h5p/admin/class-h5p-plugin-admin.php on line 524

This is the only line I have in my error log also, but I did spot these additional erros from a few days ago:

[27-Sep-2017 10:03:04 UTC] PHP Warning:  Invalid argument supplied for foreach() in phar:///opt/pantheon/wp-launch-check-0.x/wp-launch-check.phar/php/pantheon/checks/cron.php on line 58

[28-Sep-2017 08:13:36 UTC] PHP Warning:  rename(): Cannot rename a file across wrapper types in /srv/bindings/3e144dd00312486ebe5eb5ed2011dfaa/code/wp-content/plugins/h5p/admin/class-h5p-plugin-admin.php on line 524

[28-Sep-2017 08:13:59 UTC] PHP Warning:  rename(): Cannot rename a file across wrapper types in /srv/bindings/3e144dd00312486ebe5eb5ed2011dfaa/code/wp-content/plugins/h5p/admin/class-h5p-plugin-admin.php on line 524

[28-Sep-2017 08:15:48 UTC] PHP Warning:  rename(): Cannot rename a file across wrapper types in /srv/bindings/3e144dd00312486ebe5eb5ed2011dfaa/code/wp-content/plugins/h5p/admin/class-h5p-editor-wordpress-storage.php on line 168

Thanks for the support!


icc's picture

Ah, I see. Could you try to go to line 522 of the wp-content/plugin/h5p/admin/class-h5p-plugin-admin.php file and add the following, and then upload the .h5p file again? This should print some useful information needed to know what's going on.

print $_FILES['h5p_file']['tmp_name'] . ' - ' . $interface->getUploadedH5pPath(); exit;

It looks like the issue is related to the web server setup.

It's showing the path of my s3 bucket.  I'm using a drop in to push all files to s3.

/tmp/phpbzP9Ie - s3://guitar-teacher/uploads/h5p/temp/h5p-59d20bb06ee6b.h5p

Is there a way to get h5p to support this?  Ill look into if this can be by passed for this plugin otherwise.


icc's picture

Ah, yes that is the problem. H5P wants to move the uploaded file and extract it.

What kind of S3 setup are you using? 

I'm using this drop in: https://github.com/humanmade/S3-Uploads

Everything uploads to an s3 bucket, and I'm using cloudfront to serve them back.  Anything more specific I can tell you?

icc's picture

Can this plugin be found in the WordPress Plugin Directory? The plugin appears to rewrite the superglobal $_FILES array, which to me seems like a bit of strange solution. At least, I have not seen it done before.

H5P needs to be able to upload files to a temporary folder and process them, this is not possible if another plugin automatically moves everything out of the server. I think it will require quite a bit of effort to get the H5P plugin to support the behavior of the S3-Uploads plugin.

Do you know it it's commonly used? I cannot find any usage data.

I am installing content type Column but show this message: Validating h5p package failed.

Log error show this line:

PHP Warning:  unlink(/apps/html/ci/wp-content/uploads/h5p/temp/h5p-59f783e3adb3e.h5p): No such file or directory in /apps/html/ci/wp-content/plugins/h5p/admin/class-h5p-editor-wordpress-storage.php on line 228, referer: http://test2.uao.edu.co/ci/wp-admin/admin.php?page=h5p_new

I can install manual this content type?

Any help!



fnoks's picture


H5P require some PHP extensions which are listed here: https://h5p.org/installation/configure-php#php-extensions. Please verify these are installed on your site.

If you read the thread you can see that my issue was an s3 plugin trying to upload h5p packages to my bucket.  h5p doesn't support this.

I'm no means an expert but here's what I suggest your try:

- Are you running an s3 plugins that could be casuing this in the same way mine was?

- Have you checked your file permissions?  The error is at a point in the code where the files are uploaded, but cannot be moved to their desired location.

If you try the instruction given under the title 'Ah, I see. Could you try to' this may help you narrow down the issue :)