JamesHeinrich / phpThumb

phpThumb() - The PHP thumbnail generator
Other
315 stars 141 forks source link

Images are broken on initial page load php 8.1 #189

Open sks1024 opened 2 years ago

sks1024 commented 2 years ago

Images are broken on initial page load of new image until a page refresh is done. Only happens on php 8.1 not on 8.0 I have tried this test on different servers with php 8.1 and this is the result. Cache directory does fill up, but the image is broken in browser.

Jfmagnet commented 1 year ago

I have the same problem too.

sks1024 commented 1 year ago

I found a fix for now. Change this line in the config file from 'true' to 'false' and give it a try. Clear cache directory to let app make fresh cache files as well.

$PHPTHUMB_CONFIG['cache_force_passthru'] = true; //This is default. Change it to true

Jfmagnet commented 1 year ago

I found a fix for now. Change this line in the config file from 'true' to 'false' and give it a try. Clear cache directory to let app make fresh cache files as well.

$PHPTHUMB_CONFIG['cache_force_passthru'] = true; //This is default. Change it to true

Your fix works well for me thanks !

Jfmagnet commented 1 year ago

Another problem i have is the cache folder does not follow the culling's functions, nothing is delete in the cache folder now…

micker commented 1 year ago

question this is a fix or just a workarround ?

micker commented 1 year ago

Plesase some news or just need to change params

deni2s commented 1 year ago

Related to https://github.com/JamesHeinrich/phpThumb/issues/205. Please see my comment under that issue.