-2

Im using centos os and I have to make some changes in php.ini and set

 phar.readonly  = 0

in order to use phar. I got a php.ini which is in /etc . By changes I restart web server but when I look into phpinfo() , nothing has changed.

when use phar in Terminal :

  Fatal error : Uncaught exception 'UnexpectedValueException' with message 'creating archive "./build/myapp.phar" disabled by the php.ini setting phar.readonly'

Give some tips hints or something please, thanks

EDIT :

Loaded Configuration File: /etc/php.ini

user3754884
  • 87
  • 11

2 Answers2

1

There are multiple php.ini files. Find out which one is being used by running php -i or calling phpinfo()

Kai
  • 2,529
  • 1
  • 15
  • 24
0

IF php.ini file is corrupted it will load defaults.

If you want to know where is php loading php.ini from OR you want to check for php.ini validity, run:

php -i

Run that command and if there is something wrong with the file it will tell you (check image). As well as file location

enter image description here

mrbarletta
  • 902
  • 11
  • 17