Edit report at https://bugs.php.net/bug.php?id=75411&edit=1
ID: 75411
Updated by: kalle@php.net
Reported by: ben at hakim dot co dot il
Summary: configure options
Status: Analyzed
Type: Bug
Package: *General Issues
Operating System: centos 7
PHP Version: 7.1.10
Block user comment: N
Private report: N
New Comment:
@ben
1) The bug is that --disable-all does not work on SAPIs, so thats why its not working.
2) No, SPL and reflection will not be made possible to be disabled
@reindl
No, SPL and Reflection will not be made possible to be compiled as shared, because, like I stated
earlier, they are built-into the Core. These are some of the essential extensions we have decided
that every install of PHP should have. Some extensions, tho not specifically mentioned, pcre, is
used in the Windows implementation of mail(), the get_browser() function just to name one.
If we were to take out SPL for example, then in the next major version there would be no way to
autoload classes/interfaces/traits, as the __autoload procedural function is going away, thats not
cool.
Instead see these modules as part of the same, tho maybe confusing at first but they are what makes
PHP, well PHP!
Previous Comments:
------------------------------------------------------------------------
[2017-10-21 20:34:01] spam2 at rhsoft dot net
and can at least spl and reflection be also changed to support shared module build which makes a lot
of sense for machines running a webserver as well as cli scripts
libphp7.so and /usr/bin should be only a tiny wrapper loading shared modules instead both contain a
large part identical binary code
------------------------------------------------------------------------
[2017-10-21 20:25:34] ben at hakim dot co dot il
so
1. why it's enable php-cgi and phpdbg? if I did disable-all ?
2. can I disable SPL and Reflection?
------------------------------------------------------------------------
[2017-10-21 18:42:44] kalle@php.net
Hi Ben
To answer your second thing first, some extensions are built into the core, and cannot be disabled,
these include:
- Core (functions defined in Zend/, such as func_get_args())
- date (used in various extensions, like standard)
- pcre (like date, used in various extensions)
- Reflection
- SPL
- Standard (the standard library, like array and string functions)
These is what we considering something that always must be available to anyone.
Back to the real question about --disable-all, it seems like (unlike Windows), that --disable-all
will not disable default enabled SAPIs, why that is I cannot tell but I do know that at least one
SAPI is required to build PHP (at least thats how it is on Windows). Maybe a clever mind can give
some insight on why this is happening.
------------------------------------------------------------------------
[2017-10-21 14:23:51] ben at hakim dot co dot il
Description:
------------
I want to disable all modules . I did use the ./configure --disable-all ,and just enable what I
need.
after "make install"
on /usr/bin
I have:
php php-cgi php-config phpdbg hpize
1. I didn't "enable php-cgi".
2. I didn't enable "phpdbg"
it's only disabled this modules when I add to configure
--disable-cgi
--disable-phpdbg
but it should be with --disable-all
my second thing
[PHP Modules]
calendar
Core
date
json
mysqli
mysqlnd
pcre
PDO
pdo_mysql
Phar
Reflection
session
SPL
standard
why it's build Reflection and SPL?
how can I disable it?
Test script:
---------------
configure options:
./configure \
"--bindir=/usr/bin" \
"--sbindir=/usr/sbin" \
"--includedir=/usr/include" \
"--libexecdir=/usr/lib/php" \
"--libdir=/usr/lib/php" \
"--mandir=/usr/share/man" \
"--with-mysqli=mysqlnd" \
"--with-pcre-regex" \
"--with-pdo-mysql=mysqlnd" \
"--enable-json" \
"--enable-calendar" \
"--enable-pdo" \
"--enable-phar" \
"--enable-session" \
"--disable-all";
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75411&edit=1