Open cfconsultancy opened 3 years ago
Seeing the same thing when we tried to test php 8 this morning.
@cfconsultancy it upload image via ajax so you can see the error in response message from the server
Maybe we need to wait for the author or some contributor make a pr to make this lib compatible with php 8
Due to the change in PHP 8 changelog, imagecreatefromjpeg() function will return an object instead of resource, so change 2 line of code in this following file will make the upload function work
/filemanager/include/php_image_magician.php
if ( ! is_resource($this->imageResized))
to
if ( ! $this->imageResized instanceof \GdImage )
Hello, I'm Servet. Here's how to solve the PHP8 problem of Responsive File Manager Library.
Step 1:
config/config.php in
mb_internal_encoding();
mb_http_output();
mb_http_input();
mb_language('uni');
ob_start('mb_output_handler');
Step 2:
This : if ( ! is_resource($this->imageResized))
change to
if ( ! $this->imageResized instanceof \GdImage )
The problem will be solved.
Run a test on php 8 and there are several issues. Started with
mb_http_input('UTF-8'); Fatal error: Uncaught ValueError: mb_http_input(): Argument #1 ($type) must be one of "G", "P", "C", "S", "I", or "L"
Deprecated: usort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in
And uploading fails. No error reporting about any issues and thumbs are not created.
All works fine in the latest php 7.x
The problem is I don't see any error messages, so if anyone knows hot to set error reporting on , or has the filemanager used to many @ ?