Cannot create phar: phar.readonly is set to 1
Closed this issue · 5 comments
hello i'm getting two issues the first one is
ERROR: Cannot create phar: phar.readonly is set to 1
the seccend one :
Deprecated: Creation of dynamic property PHPGGC\Enhancement\Enhancements::$enhancements is deprecated in C:\Users\abora\Desktop\test\CVE-2021-3129-main\phpggc-master\lib\PHPGGC\Enhancement\Enhancements.php on line 9
PHP Deprecated: Creation of dynamic property PHPGGC::$enhancements is deprecated in C:\Users\abora\Desktop\test\CVE-2021-3129-main\phpggc-master\lib\PHPGGC.php on line 183
I'm using windows and python 3
Hello! Based on the errors you provided, it looks like you may need to make some changes to your PHP configuration in order to resolve the issues. The message suggests that phar.readonly
is set to 1
or On
in your php.ini file, which is preventing the creation of PHAR archives. To fix this, you should update your php.ini file and change the phar.readonly value to Off like phar.readonly = Off
.
The Deprecated is not a problem, and does not cause any issues yet.
Hello! Based on the errors you provided, it looks like you may need to make some changes to your PHP configuration in order to resolve the issues. The message suggests that
phar.readonly
is set to1
orOn
in your php.ini file, which is preventing the creation of PHAR archives. To fix this, you should update your php.ini file and change the phar.readonly value to Off likephar.readonly = Off
.The Deprecated is not a problem, and does not cause any issues yet.
I did already that before but it doesn't fix it and what about the second issue
Can you tell me what PHP version you use? Maybe I can try to replicate the problem to debug the issue.
PHP 8.2.4 (cli) (built: Mar 14 2023 17:54:25) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.2.4, Copyright (c) Zend Technologies
Thank you.
Regarding the first issue, The code runs phar.readonly=0
before using the PHPGGC which should fix this issue normally. Changing the value manually in php.ini should also fix it normally, I'm not sure why it does not work on your machine.
As for the second issue with the deprecation warnings, I'm afraid I'm not the author of the PHPGGC library, so there's not much I can do to address it. However, I've opened an issue on their GitHub page here. to let them know about the problem. In the meantime, you might try using a different PHP version, such as 8.1, which works fine for me.