[OJS 3.4.0.3] Can't upload image on setup site

Hello everyone, I am trying to upload a JPG image in the “Website Settings → Setup → Homepage Image” area but it is an example because I have tried in other parts it shows me the same error, I attach the screen

I checked the various permissions and everything is ok, what can give this error?
Thanks

Bye
Tiziano

Hello @Tiziano

The best bet is to check the error logs to see what’s registered there at the moment you save the form.

If the image format is JPG and the ‘public’ directory is writable by the webserver… it could be the image’s ‘weight’ in MBytes, or PHP configuration, or some other cause …

Try to fill any text to alternate text field

From the log file only these lines:

[06-Oct-2023 13:53:09 UTC] PHP Deprecated:  Using php-function "trim" as a modifier is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in /home/gp4st86z/ojstest.qrmh.org/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php on line 114
[06-Oct-2023 13:53:09 UTC] PHP Deprecated:  Using php-function "trim" as a modifier is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in /home/gp4st86z/ojstest.qrmh.org/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php on line 114
[06-Oct-2023 13:53:09 UTC] PHP Deprecated:  Using php-function "mb_convert_encoding" as a modifier is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in /home/gp4st86z/ojstest.qrmh.org/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php on line 114
[06-Oct-2023 13:53:09 UTC] PHP Deprecated:  Using php-function "trim" as a modifier is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in /home/gp4st86z/ojstest.qrmh.org/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php on line 114
[06-Oct-2023 13:53:22 UTC] PHP Deprecated:  Using php-function "substr_replace" as a modifier is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in /home/gp4st86z/ojstest.qrmh.org/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php on line 114
[06-Oct-2023 13:53:22 UTC] PHP Deprecated:  Using php-function "trim" as a modifier is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in /home/gp4st86z/ojstest.qrmh.org/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php on line 114
[06-Oct-2023 14:22:58 UTC] PHP Deprecated:  Using php-function "substr_replace" as a modifier is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in /home/gp4st86z/ojstest.qrmh.org/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php on line 114
[06-Oct-2023 14:22:58 UTC] PHP Deprecated:  Using php-function "trim" as a modifier is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in /home/gp4st86z/ojstest.qrmh.org/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php on line 114

If instead I type in the “alternate text field” when I load the image it is saved and does not give an error.
Can it help? the OJS installation is on a server with cPanel if that helps.

Thanks
Bye
Tiziano

@Tiziano,

You mean your problem is solved or do you get another error after filling the alternate text and saving the image?

Best,
Josh

HI @satuh1 and @jnoronha the problem was solved by writing text in the alternate text field, In fact, it would appear that uploading the image alone gives an error but filling in the text field accepts it and uploads it.

I wasn’t then able to work on it anymore

Thanks
Bye
Tiziano