URGENT : File Upload Issues
Permalink
Hello !
My client (and now I) have issues uploading files to a website I developed for them. The url ishttp://trois-petits-points.ch (/info.php for phpinfo if needed).
When I try tu directly upload a file, I get either an error saying "Unable tu copy file to "Default" storage location (…)" or a full error :
This is pretty urgent. I don't know what to do anymore about this issue…
My client has admin permissions, and I am logged in as admin. the directories on the server are all writable as they should. This is a complete mystery.
Please help !
Cheers
^Q
My client (and now I) have issues uploading files to a website I developed for them. The url ishttp://trois-petits-points.ch (/info.php for phpinfo if needed).
When I try tu directly upload a file, I get either an error saying "Unable tu copy file to "Default" storage location (…)" or a full error :
{"error":{"type":"Whoops\\Exception\\ErrorException","message":"Uncaught exception 'Whoops\\Exception\\ErrorException' with message 'json_encode(): Invalid UTF-8 sequence in argument' in \/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/src\/Error\/Handler\/JsonErrorHandler.php:48\nStack trace:\n#0 [internal function]: Whoops\\Run->handleError(2, 'json_encode(): ...', '\/var\/www\/vhosts...', 48, Array)\n#1 \/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/src\/Error\/Handler\/JsonErrorHandler.php(48): json_encode(Array)\n#2 \/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/vendor\/filp\/whoops\/src\/Whoops\/Run.php(248): Concrete\\Core\\Error\\Handler\\JsonErrorHandler->handle(Object(Whoops\\Exception\\ErrorException))\n#3 [internal function]: Whoops\\Run->handleException(Object(Whoops\\Exception\\ErrorException))\n#4 {main}\n thrown","file":"\/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/src\/Error\/Handler\/JsonErrorHandler.php","line":48,"trace":[{"file":"\/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/src\/Error\/Handler\/JsonErrorHandler.php","line":48,"function":null,"class":null,"args":[]}]},"errors":["Uncaught exception 'Whoops\\Exception\\ErrorException' with message 'json_encode(): Invalid UTF-8 sequence in argument' in \/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/src\/Error\/Handler\/JsonErrorHandler.php:48\nStack trace:\n#0 [internal function]: Whoops\\Run->handleError(2, 'json_encode(): ...', '\/var\/www\/vhosts...', 48, Array)\n#1 \/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/src\/Error\/Handler\/JsonErrorHandler.php(48): json_encode(Array)\n#2 \/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/vendor\/filp\/whoops\/src\/Whoops\/Run.php(248): Concrete\\Core\\Error\\Handler\\JsonErrorHandler->handle(Object(Whoops\\Exception\\ErrorException))\n#3 [internal function]: Whoops\\Run->handleException(Object(Whoops\\Exception\\ErrorException))\n#4 {main}\n thrown"]}
This is pretty urgent. I don't know what to do anymore about this issue…
My client has admin permissions, and I am logged in as admin. the directories on the server are all writable as they should. This is a complete mystery.
Please help !
Cheers
^Q
Are you able to access the PHP Error Logs on the server? Is it possible that the site is out of file storage space on the server?
Server storage is using only 20% of total space so it shouldn't be an issue here.
I have access to the server logs indeed. What should I be looking for ?
I have access to the server logs indeed. What should I be looking for ?
Try doing an upload and then look at the error logs and see if there are any errors related to the file upload.
Otherwise, if you are using Chrome open your Developer Tools and look at the Network Tab (select XHR) and see what is coming back from the /upload request when you try to upload a file, you should be able to see this in the response tab for that request.
Otherwise, if you are using Chrome open your Developer Tools and look at the Network Tab (select XHR) and see what is coming back from the /upload request when you try to upload a file, you should be able to see this in the response tab for that request.
Here's all the logs
It seems normal on the server logs, but obviously it isn't with Chrome Network monitoring
It seems normal on the server logs, but obviously it isn't with Chrome Network monitoring
When you are looking at your Chrome Inspector and you see the POST request in the Network tab, click on that and it will open up a new panel, in that panel there will be a "Response" tab, click that and you should be able to see the error that is being returned. Your server Access Log is not helpful, you need the Error Log.
Sorry, my bad…
Just above all that there should be a "Response" tab you can click, which will give you the error returned.
Really sorry again…
It's the same error as the one I uploaded in the first post
It's the same error as the one I uploaded in the first post
{ "error": { "type": "Whoops\\Exception\\ErrorException", "message": "Uncaught exception 'Whoops\\Exception\\ErrorException' with message 'json_encode(): Invalid UTF-8 sequence in argument' in \/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/src\/Error\/Handler\/JsonErrorHandler.php:48\nStack trace:\n#0 [internal function]: Whoops\\Run->handleError(2, 'json_encode(): ...', '\/var\/www\/vhosts...', 48, Array)\n#1 \/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/src\/Error\/Handler\/JsonErrorHandler.php(48): json_encode(Array)\n#2 \/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/vendor\/filp\/whoops\/src\/Whoops\/Run.php(248): Concrete\\Core\\Error\\Handler\\JsonErrorHandler->handle(Object(Whoops\\Exception\\ErrorException))\n#3 [internal function]: Whoops\\Run->handleException(Object(Whoops\\Exception\\ErrorException))\n#4 {main}\n thrown", "file": "\/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/src\/Error\/Handler\/JsonErrorHandler.php", "line": 48, "trace": [{ "file": "\/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/src\/Error\/Handler\/JsonErrorHandler.php", "line": 48, "function": null, "class": null, "args": [] }] }, "errors": ["Uncaught exception 'Whoops\\Exception\\ErrorException' with message 'json_encode(): Invalid UTF-8 sequence in argument' in \/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/src\/Error\/Handler\/JsonErrorHandler.php:48\nStack trace:\n#0 [internal function]: Whoops\\Run->handleError(2, 'json_encode(): ...', '\/var\/www\/vhosts...', 48, Array)\n#1 \/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/src\/Error\/Handler\/JsonErrorHandler.php(48): json_encode(Array)\n#2 \/var\/www\/vhosts\/trois-petits-points.ch\/httpdocs\/concrete\/vendor\/filp\/whoops\/src\/Whoops\/Run.php(248): Concrete\\Core\\Error\\Handler\\JsonErrorHandler->handle(Object(Whoops\\Exception\\ErrorException))\n#3 [internal function]: Whoops\\Run->handleException(Object(Whoops\\Exception\\ErrorException))\n#4 {main}\n thrown"]
Viewing 15 lines of 16 lines. View entire code block.
I'm sorry, I was thinking maybe that was coming after the return was not able to be json_encoded, can you access the server Error logs to see if there is anything in there to indicate the issue?
Don't apologize, thank you for helping me !
Here's all I could find in the server logs (Plesk hosting)
Here's all I could find in the server logs (Plesk hosting)
Well that is not helpful either. I'm not sure what else to tell you, the only way I can think of to figure this out would be to go into the /ccm/system/file/upload and start adding comments/var_dumps to see what is coming back that can't be json_encoded
Sadly no…
Right, thank you for the suggestion, but this is way beyond my skills, so I wouldn't even know what I am looking for…
Let's hope somebody has an other suggestion…
Thanks a lot for helping me anyway !
^Q
Right, thank you for the suggestion, but this is way beyond my skills, so I wouldn't even know what I am looking for…
Let's hope somebody has an other suggestion…
Thanks a lot for helping me anyway !
^Q
I could be way off, but I wonder if the JSON exception could be a side-effect. It seems to me that the server 500 is occurring first, and perhaps c5 is just having difficulty converting the error response. Things to try (if you haven't already):
* try to upload a simple and small file
* change the file storage location
* try to ftp something into the default file storage location
* check directory permissions
* harrass web host
* try to upload a simple and small file
* change the file storage location
* try to ftp something into the default file storage location
* check directory permissions
* harrass web host