Disabledbythephp. inisettingphar. readonly

Source: Internet
Author: User
Disabledbythephp. inisettingphar. readonly 1. Recently, I checked the phar module, which means that the packaging result of php is similar to that of jar in java.

But I will simply execute a line

New Phar ('My-demo. phar ');

Error:

Error message: Uncaught exception 'unexpectedvalueexception' with message 'creating archive "my-demo.phar" disabled by the php. ini setting phar. readonly' in

In the past, we had to set phar. readonly in php. ini to 0.

I just want to use

$ R = ini_set ("phar. readonly", 0 );

No, but the returned result is false.

I'm wondering. let's take a look at the php official website.

Not all valid varname options can be changed with ini_set. Here is an appendix to the list of valid options.

Oh, it turns out

Ini_set can set not all php. ini

It seems that you can only add it to php. ini.

[Phar]; http://php.net/phar.readonlyphar.readonly = Off

Problem solved

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.