Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

writeFile() results in Request Too Large error #31

Open
Chris92de opened this issue Jan 21, 2019 · 1 comment
Open

writeFile() results in Request Too Large error #31

Chris92de opened this issue Jan 21, 2019 · 1 comment

Comments

@Chris92de
Copy link

Chris92de commented Jan 21, 2019

Trying to upload a map via a simple script similar to this always results in "Request Too Large" errors when map size exceeds certain value.
public function TryWriteFile(){ $conn = $this->connect(); $filename = "OTHERWORLD.Map.Gbx"; $file = file_get_contents($filename); try{ $conn->writeFile($filename, base64_encode($file)); $conn->addmap($filename); } catch (Exception $ex){ echo $ex->getMessage(); } }

Map used: https://tm.mania-exchange.com/tracks/136892/otherworld
This map file is roughly 1.4MB, but the strlen of the final XML call ends up being 2505340, which is larger than the MAX_REQUEST_SIZE - 8 (0x200000 - 8)

Even if I workaround the error by increasing the const in GbxRemote.php, the linux dedicated server then says it can't write the file, even though directory permissions are 777 and server is ran as root (just to test).

Not sure where the exact error here is, but I'm assuming it's in both the library and the Dedicated Server itself.

@Chris92de
Copy link
Author

Disregard, wasn't using "dev-master" branch in composer.json, but I'm still getting the couldn't write file /path/to/UserData/Maps error now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant