[GH-ISSUE #79] return 500 when uploading image in browser #59

Closed
opened 2026-02-25 23:40:32 +03:00 by kerem · 2 comments
Owner

Originally created by @piliplaker on GitHub (Dec 29, 2018).
Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/79

I installed pictshare on my vps by unpacking the zip file. And I use caddy to host the site.

related part of configuration like this:

xxx.xxx {
root /var/service/pictshare
log /var/log/caddy/xxx.xxx.log
errors /var/log/caddy/xxx.xxx..log.error
fastcgi / unix:/var/run/php/php7.2-fpm.sock php
}

and when the error happened , an error log shows like this.

29/Dec/2018:09:06:40 +0000 [ERROR 0 /api/upload.php] PHP message: PHP Warning: fopen(/var/service/pictshare/api/../data/sha1.csv): failed to open stream: No such file or directory in /var/service/pictshare/inc/core.php on line 360
PHP message: PHP Fatal error: Uncaught Error: Call to undefined function mb_strlen() in /var/service/pictshare/inc/core.php:313
Stack trace:
#0 /var/service/pictshare/inc/core.php(124): getRandomString(6)
#1 /var/service/pictshare/content-controllers/image/image.controller.php(39): getNewHash('jpg', 6)
#2 /var/service/pictshare/api/upload.php(43): ImageController->handleUpload('/tmp/phpGP43z9', false)
#3 {main}
thrown in /var/service/pictshare/inc/core.php on line 313

what should I do ?

Originally created by @piliplaker on GitHub (Dec 29, 2018). Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/79 I installed pictshare on my vps by unpacking the zip file. And I use caddy to host the site. related part of configuration like this: xxx.xxx { root /var/service/pictshare log /var/log/caddy/xxx.xxx.log errors /var/log/caddy/xxx.xxx..log.error fastcgi / unix:/var/run/php/php7.2-fpm.sock php } and when the error happened , an error log shows like this. 29/Dec/2018:09:06:40 +0000 [ERROR 0 /api/upload.php] PHP message: PHP Warning: fopen(/var/service/pictshare/api/../data/sha1.csv): failed to open stream: No such file or directory in /var/service/pictshare/inc/core.php on line 360 PHP message: PHP Fatal error: Uncaught Error: Call to undefined function mb_strlen() in /var/service/pictshare/inc/core.php:313 Stack trace: #0 /var/service/pictshare/inc/core.php(124): getRandomString(6) #1 /var/service/pictshare/content-controllers/image/image.controller.php(39): getNewHash('jpg', 6) #2 /var/service/pictshare/api/upload.php(43): ImageController->handleUpload('/tmp/phpGP43z9', false) #3 {main} thrown in /var/service/pictshare/inc/core.php on line 313 what should I do ?
kerem closed this issue 2026-02-25 23:40:32 +03:00
Author
Owner

@geek-at commented on GitHub (Dec 29, 2018):

You need to install php7-mb so the multi byte functions are found. Will update Readme

<!-- gh-comment-id:450480400 --> @geek-at commented on GitHub (Dec 29, 2018): You need to install php7-mb so the multi byte functions are found. Will update Readme
Author
Owner

@piliplaker commented on GitHub (Dec 29, 2018):

It works!!!!
Thank you.

<!-- gh-comment-id:450481731 --> @piliplaker commented on GitHub (Dec 29, 2018): It works!!!! Thank you.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pictshare#59
No description provided.