-
Notifications
You must be signed in to change notification settings - Fork 129
Description
Description of the problem
We are running PHP 8.1.15 on Windows Server 2016. I set up a new instance of EE 7.3.2. Everything works fine except on the Files screen, where file uploading works fine but thumbnails are not working. On the Windows version of PHP 8, the php_gd2 extension was renamed php_gd. I read that EE 7 uses gd2 to generate thumbnail images, so this might be related.
Bryan Nielson suggested on Slack that I add this to the config.php file: $config['image_resize_protocol'] = 'gd';
I added it, and it didn't help. I also tried both GD and GD 2 as the Protocol under Content & Design > Settings > Image Resizing. Neither of them worked. When I upload a file, EE is creating a 0 KB empty image file in the _thumbs folder.
How To Reproduce
Steps to reproduce the behavior:
- Install PHP 8.1.15 on Windows Server 2016 (to use with IIS Manager)
- Do a clean install of EE 7.3.2 (including setting up a database)
- Add a new folder inside the install named "library" (this is where we will upload an image file)
- In IIS Manager, configure the new site to use PHP 8.1.15
- In IIS Manager, ensure that the php_gd.dll extension is enabled
- Log into the Dashboard of the new site and go to Content > Files and create a new upload directory for the library folder we added in step 3
- Upload any jpg or png file that is at least 50 KB in size. The file will upload fine, but the image thumbnail will display a broken image icon
- Go into the library\thumbs folder. There will be an image file there for the file you just uploaded, and it will be 0 KB, aka an empty file.
Error Messages
Even with Error Visibility set to "Shown to Super Admins only" in Debugging & Output, there is no error message. Also, the PHP error log shows nothing for these file uploads.
Screenshots / Videos / Template Code
Here's what the attempted file upload thumbnails look like:
https://connectplus.pasco.k12.fl.us/web/empty.png)
Environment Details:
- Version: EE 7.3.2
- PHP Version: 8.1.15
- MySQL Version: 5.7.23
- OS: Windows Server 2016
- Web Server: IIS
Possible Solution
I have no ideas on how to solve this, but suspect it has to do with the Windows version of PHP renaming php_gd2 to php_gd.
Additional context
I ran var_dump(gd_info()); in a php file to ensure that the gd extension was functioning, and it is. Here is the output from that:
array(15) { [“GD Version”]=> string(26) “bundled (2.1.0 compatible)” [“FreeType Support”]=> bool(true) [“FreeType Linkage”]=> string(13) “with freetype” [“GIF Read Support”]=> bool(true) [“GIF Create Support”]=> bool(true) [“JPEG Support”]=> bool(true) [“PNG Support”]=> bool(true) [“WBMP Support”]=> bool(true) [“XPM Support”]=> bool(true) [“XBM Support”]=> bool(true) [“WebP Support”]=> bool(true) [“BMP Support”]=> bool(true) [“AVIF Support”]=> bool(true) [“TGA Read Support”]=> bool(true) [“JIS-mapped Japanese Font Support”]=> bool(false) }
I don't see anything else I can try on my end, but I am very happy to test out any possible fixes.