Unchanged code now returning internal server error for any POST request

Status
Not open for further replies.

runswimf

New Member
Messages
3
Reaction score
0
Points
1
I'm using a free account on x10hosting to test level sharing in an app I'm developing. 2 nights ago level upload stopped working with a "500 internal server error" while level download continued to work. I've discovered that any POST request now returns this error even though I haven't changed the server side PHP scripts or the client code.
I'm wondering is there an upload limit? At a guess I'd say I've uploaded close to 1GB in the past month.
 

rbxlmadx

Member
Messages
32
Reaction score
1
Points
8
Did you code it like this?:

<form action='' method='POST'>
<input type='password' value='password' name='password'>
<input type='text' value='username' name='username'>
<input type='submit' value='submit' name='submit'>
</form>


Then you have the strings, and the insert into? This is just an example.
 

runswimf

New Member
Messages
3
Reaction score
0
Points
1
I'm using Unity 3D on the client so it's rather more opaque than that I'm afraid. For what it's worth the Unity code looks like this:

WWWForm form = new WWWForm();
print("form created ");
form.AddField("action", "generator upload");
form.AddField("file","file");
form.AddBinaryData ( "file", levelData, fileName,"text/plain");
print("binary data added ");
WWW w = new WWW("http://runswimfly.x10host.com/ImageUpload.php",form);

But this is the same code that's been working without any problems for the past couple of weeks. If you get rid of the "form" argument in the last line above it just turns it into a GET request and it completes without error though obviously without uploading anything. I tried getting the php file to exit immediately without doing anything but it still returns a server error if a POST request is generated as above.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
Regardless of whether or not your PHP script does anything with it, the file is still uploaded to the server, so if you're out of space you'll still get an error. If you weren't uploading images, requesting an upgrade to unmetered space would do the trick, but there's a 1GB limit on media storage -- and game file sharing comes under the "not allowed" part of the terms of service in any case.
 

runswimf

New Member
Messages
3
Reaction score
0
Points
1
Thanks for the reply. I've been deleting files and entries in an associated database regularly during testing and right now there's nothing in there at all. That's why I thought it might be an upload bandwidth limit (GETs still work, as do POSTs with no attached data). But I've only uploaded (and then deleted) a total of around 1 GB and as far as I can tell from the help pages bandwidth is unmetered. I can't see how that could be right though, it would be wide open to abuse.
As for terms of service: I thought I'd be ok here as the product is not released, I'm just using it for testing and the only person accessing it is me.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
As for terms of service: I thought I'd be ok here as the product is not released, I'm just using it for testing and the only person accessing it is me.
x10hosting's TOS has no 'exceptions' for product "not released" and/or "testing"
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
If you've been deleting as you go, it should be okay - that wasn't clear in your original postings. You might want to try uploading directly to the form via the browser rather than your app (you may need to create a cheap & simple UI for that) to carry out some basic diagnostics. There is no upload limit as such, just a storage limit (space on non-upgraded accounts and inodes on all accounts) and entry process and CPU limits that will trigger HRU temporary suspensions.
 

megamaze

New Member
Messages
1
Reaction score
0
Points
1
I've also been running into this issue. I can upload files using my php script through postman but not through Unity.
I wanted to see if x10hosting is a viable solution for my front and backend needs. I wanted to be able to upload leaderboards and user created levels from the game have them accessible from both the game and the website. Learderboard stuff is working but I ran into the 500 error issue when trying to send files from Unity.

Was there a solution? Also, is file uploading from a client machine okay for premium hosting?
 
Status
Not open for further replies.
Top