• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

API Returns 500 Internal Server Error

Status
Not open for further replies.

BigBoiJefe

Chevereto Member
Website URL
<private>

Chevereto version
3.10.3

Description of the issue
Hi there,

I'm running 3.10.3 on Ubuntu 16.04, with nginx 1.10.3 and PHP 7.0 FPM. When I use the API to upload an image the page returns an 500 Internal Server Error. All other aspects of Chevereto work great, and as expected.


Thanks for your help!
 
Here's what's showing in the log

2017/09/26 12:13:19 [error] 14824#14824: *34375 FastCGI sent in stderr: "PHP message: PHP Fatal error: Switch statements may only contain one default clause in /var/www/html/mysite.com/app/routes/overrides/route.api.php on line 114" while reading response header from upstream, client: 172.116.121.126, server: mysite.com, request: "GET /api/1/upload HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mysite.com"
 
So, the problem is in your PHP override code. Since you provided server access, I was able to check your routes/overrides/route.api.php code and I found that your override code is outdated. Where did you get that route.api.php code?

upload_2017-9-26_16-31-2.png

That double default was taken away like in 3.7.X so I wonder how it got there in the first place.
 
I customized that route from probably around that time and I didn't change it with the updated code. I'll have to fix it.
 
Status
Not open for further replies.
Back
Top