• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Stuck when change profile image (Chevereto running on Windows Server)

xb2016

Chevereto Member
👉 Run our Container based provisioning and document the settings and context that trigger the alleged bug.

*️⃣ Make sure to test the bug in the Docker infra, let us know whatever the bug happens (or not) there.

▶ Reproduction steps
  1. Run Chevereto on Windows Server
  2. Change profile image
😢 Unexpected result
Stuck after uploading
Maybe we should use $target_filename = str_replace('\\', '/', $target_filename); instead

📃 Error log message
> Exception [400]: Can't move source file D:/wwwroot/IMG/content/images/users/MlF/av_1647243121.jpg to D:\wwwroot\IMG/content/images/users/MlF/av_1647243121.jpg: Copy error 8 > Undefined index: SERVER_ADDR
At

Stack trace:
#0 /app/lib/classes/class.storage.php(266): CHV\LocalStorage->put()
#1 /app/lib/classes/class.user.php(320): CHV\Storage::uploadFiles()
#2 /app/routes/route.json.php(71): CHV\User::uploadPicture()
#3 /lib/G/classes/class.handler.php(230): G\Handler->{closure}()
#4 /lib/G/classes/class.handler.php(130): G\Handler->processRequest()
#5 /app/web.php(415): G\Handler->__construct()
#6 /app/loader.php(239): require_once('/app/web.php')
#7 /index.php(20): include_once('/app/loader.php')
 
Run Chevereto on Windows Server
It is not mentioned anywhere for V3, but Chevereto isn't made for Windows OS. You can refer to this remark on V4's documentation where we recommend Docker for Windows users.

Maybe we should use $target_filename = str_replace('\\', '/', $target_filename); instead
Let us know if doing that solves the issue for you, at this time I don't have a Windows setup to try it out in the short term.
 
Change /app/lib/classes/class.localstorage.php:62 $target_filename = str_replace('/.\/', '/', $target_filename); to $target_filename = str_replace('\\', '/', $target_filename); can solves the issue.

I see a comparison at /app/lib/classes/class.localstorage.php:63
if($source_file == $target_filename) {
return;
}
But it doesn't work for file paths on Windows. From the log I can see D:/wwwroot/IMG/content/images/users/MlF/av_1647243121.jpg D:\wwwroot\IMG/content/images/users/MlF/av_1647243121.jpg are the same file, but "\" is different.

In fact I don't know what the original code $target_filename = str_replace('/.\/', '/', $target_filename); does.
 
Try with Docker, we don't design the software for Windows and it is likely that you will encounter more issues.
 
Back
Top