You are not logged in.

#1 2022-10-04 07:15:43

eugene.flash.83
Member
Registered: 2022-10-04
Posts: 4

disable phar

HI,

I need to disable phar module, but I can't.

grep -R "phar" /etc/php/*
/etc/php/php.ini:;extension=phar.so
/etc/php/php.ini:; http://php.net/phar.readonly
/etc/php/php.ini:;phar.readonly = On
/etc/php/php.ini:; http://php.net/phar.require-hash
/etc/php/php.ini:;phar.require_hash = On
/etc/php/php.ini:;phar.cache_list =
php --ri Phar

Phar

Phar: PHP Archive support => enabled
Phar API version => 1.1.1
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
gzip compression => enabled
bzip2 compression => enabled
Native OpenSSL support => enabled


Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Directive => Local Value => Master Value
phar.readonly => On => On
phar.require_hash => On => On
phar.cache_list => no value => no value

How to disable it?

Offline

#2 2022-10-04 08:24:45

philo
Member
Registered: 2015-01-26
Posts: 275

Offline

#3 2022-10-04 10:12:04

eugene.flash.83
Member
Registered: 2022-10-04
Posts: 4

Re: disable phar

No, php doesn't know about it.

php --disable-phar
Error in argument 1, char 1: no argument for option -

Last edited by eugene.flash.83 (2022-10-04 10:12:27)

Offline

#4 2022-10-04 13:28:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,480
Website

Re: disable phar

That's a configure flag not a run-time php flag.  You can rebuild php from the ABS and add the --disable-phar flag to the _phpconfig variable in the build function.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2022-10-04 13:46:03

eugene.flash.83
Member
Registered: 2022-10-04
Posts: 4

Re: disable phar

Trilby wrote:

That's a configure flag not a run-time php flag.  You can rebuild php from the ABS and add the --disable-phar flag to the _phpconfig variable in the build function.

Could you plz tell me how to do it exactly, I never did it before.

Offline

#6 2022-10-04 14:06:26

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,480
Website

Re: disable phar


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2022-10-04 14:08:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,263

Re: disable phar

Get the PKGBUILD https://wiki.archlinux.org/title/Arch_B … ILD_source of php and add the flag to the relevant variable and rebuild the package.

Offline

#8 2022-10-04 14:10:07

eugene.flash.83
Member
Registered: 2022-10-04
Posts: 4

Re: disable phar

Ok, thanks, I'll try.

Offline

#9 2022-10-04 14:58:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,480
Website

Re: disable phar

Note that just giving you the link shouldn't suggest that I/we wouldn't help if you get stuck along the way.  But when you are given the relevant search terms to get started, it is expected that you make an effort to learn and follow the steps yourself.  Asking to be led step by step through a process is not a good follow-up question - but in contrast, coming back with a specific issue (like "I tried followed steps A and B, but I think something went wrong as I am getting error C") will result in the needed support.

We're here to help you through the process, but you need to take the lead and learn.

Last edited by Trilby (2022-10-04 14:59:00)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB