I am actually using wamp 2.5 with PHP 5.5.12 and when I try to create a phar file it returns me the following message :
Uncaught exception 'UnexpectedValueException' with message 'creating archive "..." disabled by the php.ini setting phar.readonly'
even if I turn to off the phar.readonly option in php.ini.
So how can I enable the creation of phar files ?
I had this same problem and pieced together from info on this thread, here's what I did in over-simplified explanation:
echo phpinfo();
(which displays a large table with all sort of PHP info) and in the first few rows verify the path of the php.ini file to make sure you're editing the correct php.ini.phpinfo()
table where it says phar.readonly
and note that it is On.phar.readonly
. Mine is on line 995 and reads ;phar.readonly = On
phar.readonly = Off
. Be sure that there is no semi-colon at the beginning of the line. phpinfo()table
again to see that the phar.readonly setting has changed.