comphar
comphar copied to clipboard
Permission denied: Disable "phar.readonly" and "phar.require_hash"
I am trying to pack diff-parser
I kept getting Permission denied: Disable "phar.readonly" and "phar.require_hash"
Change ;phar.readonly = On to phar.readonly = Off in your php.ini. Notice the semicolon. Usually you can find this file in /etc/php/7.x/cli/php.ini
The problem is php.ini related, not a library bug. Please feel free to submit the PR that updates documentation! Thanks
Nope! I've tried editing php.ini this is not effective! same error again and again nothing is resolved with php.ini changes.
on windows run command:
where comphar
C:\Users\asus\AppData\Roaming\Composer\vendor\bin\comphar C:\Users\asus\AppData\Roaming\Composer\vendor\bin\comphar.bat
edit comphar.bat find
php "%BIN_TARGET%" %*
replace
php -d phar.readonly=off -d phar.require_hash=off "%BIN_TARGET%" %*
if you are on linux platform which comphar command will do the same job, simply add 2 parameters after php command
php -d phar.readonly=off -d phar.require_hash=off
Good luck ,)
this should only be enabled on dev/staging servers for security reasons