Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104468 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 30243 invoked from network); 19 Feb 2019 06:42:55 -0000 Received: from unknown (HELO mail-it1-f193.google.com) (209.85.166.193) by pb1.pair.com with SMTP; 19 Feb 2019 06:42:55 -0000 Received: by mail-it1-f193.google.com with SMTP id h6so3002448itl.1 for ; Mon, 18 Feb 2019 19:27:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qsKocvRTJ7pLLa/aRjr6DXCcBTPeZ4sUOHk/81CaW0I=; b=oIGrfTUQbjfS2RFzCBZ2brba8XccGC75pCBxHNp+wzqsp2wTQFiIZf3n7UzJy8oizj 20g3n8vlRI0+PAPcN4gvZf65FW1NcexBXHu7EoDQE+T74bjaM7/XLZoXiqckMK/ypzsl 1Pl1Y7gJpnm8018ng1Hs4hyLsLxuCxVVyGTj+9YKEHEdYFn0OKSb/jXHVnjJFislqDoX qQkPqS5/6cJ49wkiUClUG0zWjuockm8AjUI52ZMoW5zPIl4P9/8wFJonZ8dyOMzwzxJ1 6o/xGISptYScUcHIs0FXFsqrWOxmthEOGSNuKuiyZha1+BSXUN3FDweJpDcZ1KSBP69T S6Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qsKocvRTJ7pLLa/aRjr6DXCcBTPeZ4sUOHk/81CaW0I=; b=Hmu+I3vxUeYss0LCpnMEcnpt9ry3MT09XTNe2G4GUa0SHye3zNLaWS6qsOoRV01Qxd WPChrRbL5CY9FOoBs45sw2gTM5gX+gJY1erPnQq1Kws993OwERqUusmBl80hhLJ2KYuB /gFr0WATTGOkWRSiBWpIB2cyGBcWxzFhioeAtHyZhO/wn8qQO/fmVZX8OuHJS3TU9qWB NHsYWvgbHFdiRvy1xGlzaJRupv/7t566lr6Du7FJH5bYzce764PKSJxZ3SzACXqI3Q4F FXtnzps9P1HOZ5fwA+WR0eHaBjo4sMqqFB9LkKc0Y6eZ9Oykqi34W5CPKtM/uvF29vzq NLYw== X-Gm-Message-State: AHQUAuaPuS8QB5TGC2LFJQhs8lxj+kPHhKsasbe76e9x9oUiX8CVPnH8 oXzS06tbFBuXhv2yn7eIWA5ZUT5Dv6lcbGCvZvY= X-Google-Smtp-Source: AHgI3IYNiSEZPBZfil+xu3+M0YWlHPVYxQHrslbD2LXQetF5QKLiwhuNF+gOtovbNm+1LbEdySW6tksn1/SCZj5N+x4= X-Received: by 2002:a24:53d2:: with SMTP id n201mr1119931itb.141.1550546847186; Mon, 18 Feb 2019 19:27:27 -0800 (PST) MIME-Version: 1.0 References: <5c6b340f.1c69fb81.4d3ae.2773@mx.google.com> In-Reply-To: <5c6b340f.1c69fb81.4d3ae.2773@mx.google.com> Date: Tue, 19 Feb 2019 04:27:14 +0100 Message-ID: To: "Legale.legale" Cc: Gabriel Ostrolucky , PHP Internals List Content-Type: multipart/alternative; boundary="00000000000008c86d058236d287" Subject: Re: [PHP-DEV] Re: phpenmod/phpdismod From: ocramius@gmail.com (Marco Pivetta) --00000000000008c86d058236d287 Content-Type: text/plain; charset="UTF-8" Seems like this still modifies the environment. As a non-privileged user (such as a running production Docker environment) you: 1. cannot touch the filesystem 2. Should be able to add a single flag to the terminal, such as it currently happens with `-dextension=...`, but with opposite effect On Mon, 18 Feb 2019, 23:39 Legale.legale I have made super simple OS independent phpenmod. > > Https://github.com/legale/phpenmod > On Feb 18, 2019 23:31, Gabriel Ostrolucky wrote: > > > > 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. > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > --00000000000008c86d058236d287--