Unable to upload full WebGL build to 000webhost

I wrote a website (with 000webhost) that lets you upload WebGL games and play them on there, but I’m having an issue uploading a complete build. My process is:

  • Create a WebGL build
  • Compress it into a zip file
  • Upload the zip file to the server using an HTML form
  • Have the server extract the zip file using PHP code so that the game is playable

When I try to upload a completed game, I get these errors:

Warning: Undefined array key "gTitle" in /storage/ssd4/217/21521217/public_html/action_page.php on line 4

Warning: Undefined array key "gDesc" in /storage/ssd4/217/21521217/public_html/action_page.php on line 5

Warning: Undefined array key "gPub" in /storage/ssd4/217/21521217/public_html/action_page.php on line 6

Warning: Undefined array key "gLogo" in /storage/ssd4/217/21521217/public_html/action_page.php on line 7

Warning: Trying to access array offset on value of type null in /storage/ssd4/217/21521217/public_html/action_page.php on line 7

Warning: Undefined array key "gBuild" in /storage/ssd4/217/21521217/public_html/action_page.php on line 8

Warning: Trying to access array offset on value of type null in /storage/ssd4/217/21521217/public_html/action_page.php on line 8

Warning: Undefined array key "gLogo" in /storage/ssd4/217/21521217/public_html/action_page.php on line 18

Warning: Trying to access array offset on value of type null in /storage/ssd4/217/21521217/public_html/action_page.php on line 18

Warning: Undefined array key "gLogo" in /storage/ssd4/217/21521217/public_html/action_page.php on line 18

Warning: Trying to access array offset on value of type null in /storage/ssd4/217/21521217/public_html/action_page.php on line 18
Game logo upload failed
Warning: Undefined array key "gBuild" in /storage/ssd4/217/21521217/public_html/action_page.php on line 27

Warning: Trying to access array offset on value of type null in /storage/ssd4/217/21521217/public_html/action_page.php on line 27

Warning: Undefined array key "gBuild" in /storage/ssd4/217/21521217/public_html/action_page.php on line 27

Warning: Trying to access array offset on value of type null in /storage/ssd4/217/21521217/public_html/action_page.php on line 27
Game build upload failed

It almost looks like the entire form failed. I took some of the files out of the zip file and was able to successfully upload the file, but that breaks the build. Has anyone had this issue? Is there a way to fix it?

Check that the extracted server-side contents match what you have locally. Perhaps you forgot to specify to extract the zip recursive or extraction is not complete (check any error logs that may be provided).

You could manually transfer the same build via ftp to see if it works. If so, it’s the upload/extract process that’s causing the issue.

Sorry for the late reply. The problem isn’t with the zip extraction. This issue happens before the extraction. Basically, the zip file fails to upload.