• 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.
  • Chevereto Support CLST

    Support response

    Support checklist

Create Account 500 Error

chris-thompson

Chevereto Member
After filling in details on sign up page and clicking "Create Account" getting 500 error response.

The rest of the site has been fine testing with my admin account and have uploaded a couple hundred photos fine.
Went to test using the site as a fresh user and first error I have come across.

Any help would be most appreciated thanks.
 
Dear user,

Could you kindly provide some context? Like versions, specs, etc.
 
Dear user,

Could you kindly provide some context? Like versions, specs, etc.
Thanks for your reply.

It is a fresh install using Softaculous on litespeed based shared hosting.
Chevereto (Free): 1.3.0
PHP version: 7.4.11
MySQL version: 5.7.33

I don't seem to get any other errors using the site, just when trying to setup a new user from the signup page.

Please let me know if there is any other info that would be useful.
 
I have done some more troubleshooting and once got the PHP errors showing found the attached error showing.
2021-01-25 15_55_36.png
It seems to only be when stopforumspam setting is enabled. Have confirmed the signup page works with it turned off.
Would prefer to have it enabled though if it helps reduce spam.

I have contacted my webhost provider and they have confirmed that the php json extension is installed and works fine in testing.

Any further advice regarding this would be most appreciated.
 
The error is very clear, your installation (php) isn't providing the json_encode function so it looks for it in the Guzzle namespace but Guzzle doesn't define that function, as it uses the one at the root namespce, provided by your php installation.

Chevereto also uses that function, other functionality in your website should be also broken.

This is not Chevereto related, you need to check your server.
 
The error is very clear, your installation (php) isn't providing the json_encode function so it looks for it in the Guzzle namespace but Guzzle doesn't define that function, as it uses the one at the root namespce, provided by your php installation.

Chevereto also uses that function, other functionality in your website should be also broken.

This is not Chevereto related, you need to check your server.
Thank you for the additional info.
My hosting provider has confirmed that while the json php extension is installed and enabled the json_encode function is disabled on their shared hosting...

I'm disappointed that I will not be able to use Chevereto as it seems like a great piece of software but happy that got to the bottom of the issue.

Thanks very much for your assistance with this.
 
Definitely look for better providers, what's that stuff about limiting what the user can do? Anyway, you can easily add the missing function with pure PHP: https://github.com/itspriddle/json-php

You only need to define that (let's say in the app/settings.php file for now) and it will work.
 
Definitely look for better providers, what's that stuff about limiting what the user can do? Anyway, you can easily add the missing function with pure PHP: https://github.com/itspriddle/json-php

You only need to define that (let's say in the app/settings.php file for now) and it will work.
Thanks for the additional tip.
Think I will be shopping around when the hosting comes up for renewal.

I am getting the following error.

Fatal error: Cannot redeclare json_decode()

Could you point out where it is originally defined please?
I've had a look through the applications files to comment out where it's originally defined but having trouble pinning where it is.
 
I have done some more testing and it looks like the issue might be with how the application is calling json_decode.
If I create a example php file using an example from PHP: json_decode - Manual like below

<?php
$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';

var_dump(json_decode($json));
var_dump(json_decode($json, true));
?>

I get a result back as expected.

2021-01-26 14_54_35.png

If I change the example to call the function like the application does like below

<?php
$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';

var_dump(GuzzleHttp\json_decode($json));
var_dump(GuzzleHttp\json_decode($json, true));
?>

I get the same error that the application gets.
2021-01-26 14_53_39.png
It looks like the hosting provider has mislead me about what the server is capable of as the function is both installed and available to use from my testing.
 
Could it be that Softaculous has not included everything the app has needed?
If I do a search on my file manager for GuzzleHttp I see that other applications I have running have a folder for it whereas there is not one present in any of the chevereto application folders.
 
Very odd, it seems that your host block the call not the provisioning of the function as by manually importing it works. Good knows how many stuff they could be sniffing, beware dear user.
 
Back
Top