Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Discussion Unable to upload full WebGL build to 000webhost

Discussion in 'Web' started by JJNCreator, Nov 29, 2023.

  1. JJNCreator

    JJNCreator

    Joined:
    Jul 3, 2012
    Posts:
    28
    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:

    Code (CSharp):
    1. Warning: Undefined array key "gTitle" in /storage/ssd4/217/21521217/public_html/action_page.php on line 4
    2.  
    3. Warning: Undefined array key "gDesc" in /storage/ssd4/217/21521217/public_html/action_page.php on line 5
    4.  
    5. Warning: Undefined array key "gPub" in /storage/ssd4/217/21521217/public_html/action_page.php on line 6
    6.  
    7. Warning: Undefined array key "gLogo" in /storage/ssd4/217/21521217/public_html/action_page.php on line 7
    8.  
    9. Warning: Trying to access array offset on value of type null in /storage/ssd4/217/21521217/public_html/action_page.php on line 7
    10.  
    11. Warning: Undefined array key "gBuild" in /storage/ssd4/217/21521217/public_html/action_page.php on line 8
    12.  
    13. Warning: Trying to access array offset on value of type null in /storage/ssd4/217/21521217/public_html/action_page.php on line 8
    14.  
    15. Warning: Undefined array key "gLogo" in /storage/ssd4/217/21521217/public_html/action_page.php on line 18
    16.  
    17. Warning: Trying to access array offset on value of type null in /storage/ssd4/217/21521217/public_html/action_page.php on line 18
    18.  
    19. Warning: Undefined array key "gLogo" in /storage/ssd4/217/21521217/public_html/action_page.php on line 18
    20.  
    21. Warning: Trying to access array offset on value of type null in /storage/ssd4/217/21521217/public_html/action_page.php on line 18
    22. Game logo upload failed
    23. Warning: Undefined array key "gBuild" in /storage/ssd4/217/21521217/public_html/action_page.php on line 27
    24.  
    25. Warning: Trying to access array offset on value of type null in /storage/ssd4/217/21521217/public_html/action_page.php on line 27
    26.  
    27. Warning: Undefined array key "gBuild" in /storage/ssd4/217/21521217/public_html/action_page.php on line 27
    28.  
    29. Warning: Trying to access array offset on value of type null in /storage/ssd4/217/21521217/public_html/action_page.php on line 27
    30. 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?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,467
    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.
     
  3. JJNCreator

    JJNCreator

    Joined:
    Jul 3, 2012
    Posts:
    28
    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.