Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ovhank's avatar

Forge - file upload error

I have a site I built in laravel/vue where users can import xml/csv files and it adds the contents to a database.

The upload works without error in local dev mode. Now that I've deployed it I can no longer upload files larger than 5mb, but anything less works. I receive a 500 server error.

I have already updated php.ini to allow larger files, both in the server and in Forge's php settings. I've restarted both php and the server after updating.

Any ideas on what I'm missing?

0 likes
1 reply
ovhank's avatar
ovhank
OP
Best Answer
Level 4

Just figured out my error. Had nothing to do with file size. Both of the XML docs I had that were over 5mb had parenthesis in their file names. When I would delete some table data out of file contents making them below 5 mb I would save them as "test.xml" taking away the error.

When I was running in Dev mode there was no issues in the Windows OS, but in Ubuntu, if the file with parenthesis in the name was uploaded, it would wrap the new file name in apostrophes to save it in storage.

I just used str_replace to replace parenthesis with underscores when saving in storage and saved the original file name in the db.

Please or to participate in this conversation.