-
-
Notifications
You must be signed in to change notification settings - Fork 740
Description
Bug Report
I think I brought this up already, In a shared hosting environment, there is trouble on the horizon.
Rector can't make a cache dir when using sys_get temp() as part of the string that is instructing PHP 8 to make a cache dir. In most cases, permission is denied when it comes to deleting the cache as well. Catch 22, I moved the Rector cache but the PHPstan injection dependency cache has to be manually deleted. Very time-consuming...
It seems that the sys_get_temp_dir() function in PHP 8.x currently has a bug! When it returns the tmp dir in the string it is somehow sending false permission. It can write the cache but cannot delete it in some cases, In other cases, it can do neither and it is only in shared hosting environments, which most of us are using.
Super users can't run it either which makes no sense at all...
I have had to modify and do a manual delete of the dependency injection cache for PHPstan and also had to move my Rector cache dir. I can find no way to move the PHPstan cache so I have to delete it every so often so I do not get errors.
The problem is with the sys_get_temp_dir() function in PHP 8.x - root has no problem... running it as a regular user with or without open_base dir protection on PHP 8 is a problem.
I would normally use Fixkit7 to replace the function but that does not work in PHP 8.x
https://www.php-nuke-titanium.86it.us/modules.php?name=Forums&file=viewtopic&p=293#293
https://stackoverflow.com/questions/13186069/sys-get-temp-dir-in-shared-hosting-environment
I have faith in you Tom and know the next composer update that I do will have this fixed as it seems relatively simple. I appreciate all your hard work so I have not minded manually deleting the injection cache and moving the Rector Cach dir over and over :)
You are awesome and I tell everyone I know about Rector, When they tell me about their computer God friends, I tell them they have nothing on you as you are the best! You are my brother in code and I thank you for your service, hard work, and efforts to make our lives more simple.
Cheers Tom
P.S. I sent you an e-mail trying to get in touch, some things I wanted to say would have taken far too long to type.
you can txt me if you like and I will call you 1+ 813-846-2865