Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104463 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 65037 invoked from network); 19 Feb 2019 01:46:56 -0000 Received: from unknown (HELO mail-wm1-f53.google.com) (209.85.128.53) by pb1.pair.com with SMTP; 19 Feb 2019 01:46:56 -0000 Received: by mail-wm1-f53.google.com with SMTP id y15so628212wma.0 for ; Mon, 18 Feb 2019 14:31:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :in-reply-to:user-agent; bh=y2SVpfx5qfhQBYVmIcHhgAYfKXJ+ETk1vX7ITFP08gU=; b=mnh6j4LQS4HMkZp3TGuJEIJHbpQwW0YROLbohysBQWhgSqAcQcSZMHpyhfoWLZIUke VicgZRjuLsC5nSfRy6+p5eu7Osx4nZni6okUafIpfdVDH8cX/GVAAk41z9/OwfdKRn6w si0Ftm4T35kPVEcoCAnj5oLUEQxX0pgodt2YMkuIWCRx6no+Wq0wbD1hE1z7AbtQQ03H rsMde4qY4skDp019qeuaGsDcCIaH2qO03yt+KXPsCK2Mp33KEQFdbMvgwHw3PIC/NNBI Cyu4y+CIOvo3tcuflR9tqjy/w9BFC2/oO0HjJDjQikK1VUkZ2fn40+s9fre7S2c7Se5l /4pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:in-reply-to:user-agent; bh=y2SVpfx5qfhQBYVmIcHhgAYfKXJ+ETk1vX7ITFP08gU=; b=hqQKL9RESGhxj7R85KwcynbqYKG2vhz1pDL347cWUdQymaloEyh9OnmsPKvyhjbOGu BuQwcldRV++CNBZlvqMCTOB08lBbL0vGTqSb1qTneFp3jskeEYMZpsYDNwlEGoCPhwZh jtsRN40v9+VdXy1QfUZH6Cju+zPXHYWC+vFNTwouVOGcHCXA3xcgZTm9UZ2h5PiS91RO kQlIVvgzJCZSSDTbezZySswPwFGVQvDXTa8hpfg1FRiQXdePSUbPmi5I9m81l8pqC/dU oCfZr75EFWWyzD7XRdVLljmY6DbzmctZ61mVXqUBH21EnOstEQfJX9kiD1uQ/OEXf2UL IAZA== X-Gm-Message-State: AHQUAuaukYjSrlfuzOFs93xbAIr/76cT17kqvh1R9dxwwhSN8+ApAlZu ixEiKY4kewv5XubKJnhZvr+SXvTgcqY= X-Google-Smtp-Source: AHgI3IZ/SAqhC2hz/eCs83NT2E5v7A4/QNZSZmNFAy5vEP/VtPv5zgHYdeK/uygb8EVixJN7xP/P4Q== X-Received: by 2002:a1c:a789:: with SMTP id q131mr626673wme.82.1550529084043; Mon, 18 Feb 2019 14:31:24 -0800 (PST) Received: from Gabriels-MBP.fritz.box ([2001:a61:597:2401:2de7:35a0:efa:52e4]) by smtp.gmail.com with ESMTPSA id y5sm548977wmg.31.2019.02.18.14.31.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 14:31:23 -0800 (PST) Date: Mon, 18 Feb 2019 23:31:21 +0100 To: internals@lists.php.net Message-ID: <20190218222842.GA43551@Gabriels-MBP.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <219A13D1-B084-4874-A7DB-E96962EBCE47@gmail.com> User-Agent: Mutt/1.11.3 (2019-02-01) Subject: Re: phpenmod/phpdismod From: gadelat@gmail.com (Gabriel Ostrolucky) References: <219A13D1-B084-4874-A7DB-E96962EBCE47@gmail.com> I'm fan of this idea. I miss this in any other non-debian distro. What nobody mentioned yet, similar script (dockerphp-ext-enable) is used in PHP docker images. You can check them out at https://github.com/docker-library/php/blob/master/7.3/alpine3.9/cli/docker-php-ext-enable However, enabling extensions in PHP via CLI is easy. It's just php -dextension=extension.so. What isn't easy, is DISABLING them. This is very important to do when you have profiling/debugging extensions like xdebug enabled. Currently, PHP community needs to do workaround gymnastics because of this missing functionality. Check https://stackoverflow.com/questions/31083195/disabling-xdebug-when-running-composer and xdebug-handler created as a result https://github.com/composer/xdebug-handler/blob/master/src/XdebugHandler.php Now, authors of CLI tools ship this xdebug-handler and unload it by default. This makes their software faster by default, but all the CLI tool authors must depend on this. And users are less aware of what's going on. If you are a consumer and your CLI tool does not depend on it, you are out of luck, back to editing .ini files by hand - or wondering why is the tool slow or even abandoning it because of that. If you are a consumer and want to debug your CLI tool using it, you will spend some time figuring out why it doesn't work. I know I went little offtopic here, since this thread is mainly about script which persists these settings, instead of just CLI switch, but I think this was worth mentioning, as it complements it. IMO hard to edit ini files are frustrating mainly because of lacking quick way for disabling extensions. Having a CLI swith do not only ENABLE extension, but also DISABLE it, would help a lot and shipping script for modifying ini files might be a lot smaller necessity after that.