Guest images are not automatically deleted...

dr_brown

Core license
License owner
Hello. Help with another problem, after transferring the domain on the server, guest pictures are not deleted in php-cgi and php 7.2.8, the logs are empty, although log_errors = On is set in php.ini, the rights to folders and files are the same as they were before how the domain was set to php mode as apache module ... where to look? In the settings, deletion is enabled after 1 month, also the expiration_date_gmt date is set for the guest pictures.
 

Rodolfo

Chevereto creator
Chevereto Staff
If it was working before then clearly is your new server setup which is giving you issues. What to check? Being honest I don't know, get logs to work to start with, otherwise you are asking us to just try to guess how to help you.
 

dr_brown

Core license
License owner
If it was working before then clearly is your new server setup which is giving you issues. What to check? Being honest I don't know, get logs to work to start with, otherwise you are asking us to just try to guess how to help you.
I don't even write a log. I do not know what's the problem. In php.ini write_log = on ....
 

dr_brown

Core license
License owner
Turned on everything that is possible, displaying all errors. The log is empty, so is the screen. Files are not deleted. What a nonsense ...
 

dr_brown

Core license
License owner
Welcome to servers.

somehow you can manually initiate the deletion of images, can you set what flag in the lock folder?
I want to see errors on the screen...
can make a separate file, with a method call from the Image :: deleteExpired class?
 

dr_brown

Core license
License owner
in other words.....

I have commented out the condition in the following function of the web.php file:

PHP:
if (method_exists('CHV\Image', 'deleteExpired')) {
            try {
                $lock = new Lock('delete-expired-images');
                //if (!$lock->check() && $lock->create()) {
                    Image::deleteExpired(50);
                    $lock->destroy();
                //}
            } catch (Exception $e) {
                error_log($e);
            }
        }

specifically checking the condition

PHP:
if (!$lock->check() && $lock->create())

And I have perfectly deleted all the photos, and physically too, I checked all the folders, they are empty!

What could be the problem?
 

dr_brown

Core license
License owner
I did not move, just change the mode of php to cgi so that php version 7 and higher became available to me. The permissions were the same. I had three files in the lock folder, with the extension lock which disappeared after I commented out the above mentioned code and the images started to be deleted. What creates files in the lock folder?
 

dr_brown

Core license
License owner
I uncommented now, everything works fine. I have suspicions that in the settings - loading and storing data is not stored. As I understand it, when we turn off this feature in the loks folder, .loc files should be added to what is disabled. If enabled, then these files should be deleted.
 

Rodolfo

Chevereto creator
Chevereto Staff
The problem with locking in V3 is that it relies in the filesystem, so any change in permissions, like when you change the php pid will break the locking as the previous locks will be tied to other permission mask. It happens when you move servers or when you change how the php interpreter works.

This has been a long time issue, it has happened to too many users that I will change the system to use a database lock.
 
Top