Bug #77687 [Fbk->Opn]: failed disable function ini_get() using php.ini
| From: | ena dot melia dot ymail at gmail dot com | Date: | Thu, 07 Mar 2019 00:43:10 +0000 |
| Subject: | Bug #77687 [Fbk->Opn]: failed disable function ini_get() using php.ini | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-219874@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77687&edit=1
ID: 77687
User updated by: ena dot melia dot ymail at gmail dot com
Reported by: ena dot melia dot ymail at gmail dot com
Summary: failed disable function ini_get() using php.ini
-Status: Feedback
+Status: Open
Type: Bug
Package: PHP options/info functions
Operating System: linux
PHP Version: 7.3.2
Block user comment: N
Private report: N
New Comment:
opcache disabled
chr, count, trim, array_keys //working
opcache enabled
chr, count, trim, array_keys //only chr is not working
Previous Comments:
------------------------------------------------------------------------
[2019-03-07 00:21:54] requinix@php.net
What about disabling: chr, count, trim, array_keys? With and without opcache enabled?
------------------------------------------------------------------------
[2019-03-07 00:08:57] ena dot melia dot ymail at gmail dot com
No. php has been restarted repeatedly and I have disabled cache in the browser
#opcache disabled
1. opcache.enable=0 in /etc/php/7.3/fpm/php.ini
2. service php7.3-fpm restart
3. open webpage
<?php
echo ini_get('disable_functions');
echo disk_total_space("/");
echo getcwd();
//etc
?>
refresh page repeatedly
all is well
disable ini_get and others is working
#opcache enable
1. opcache.enable=1 in /etc/php/7.3/fpm/php.ini
2. service php7.3-fpm restart
3. open webpage
<?php
echo ini_get('disable_functions');
echo disk_total_space("/");
echo getcwd();
//etc
?>
refresh page repeatedly
disable ini_get does not work but other functions like getcwd, is_dir, etc. are working
I disabled almost all functions on php.ini
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,.....and more........
i try put about one thousand function in there
disable all functions is work except ini_get
my php.ini
[PHP]
engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = -1
disable_functions = ini_get,ini_get_all,ini_set
disable_classes =
zend.enable_gc = On
expose_php = Off
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
error_reporting = E_ALL
display_errors = On
display_startup_errors = On
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
html_errors = On
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 8M
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
doc_root =
user_dir =
enable_dl = Off
file_uploads = On
upload_max_filesize = 2M
max_file_uploads = 20
allow_url_fopen = Off
allow_url_include = Off
default_socket_timeout = 60
[CLI Server]
cli_server.color = On
[Date]
[filter]
[iconv]
[imap]
[intl]
[sqlite3]
[Pcre]
[Pdo]
[Pdo_mysql]
pdo_mysql.default_socket=
[Phar]
[mail function]
SMTP = localhost
smtp_port = 25
mail.add_x_header = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[Interbase]
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"
[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[mysqlnd]
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = Off
[OCI8]
[PostgreSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = files
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = sesi_user
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.cookie_samesite =
session.serialize_handler = php
session.gc_probability = 0
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.sid_length = 26
session.trans_sid_tags = "a=href,area=href,frame=src,form="
session.sid_bits_per_character = 5
[Assertion]
zend.assertions = -1
[COM]
[mbstring]
[gd]
[exif]
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5
[sysvshm]
[ldap]
ldap.max_links = -1
[dba]
[opcache]
opcache.enable=1
[curl]
[openssl]
------------------------------------------------------------------------
[2019-03-05 21:49:31] spam2 at rhsoft dot net
there is nothing relevant to opcache, you simply didn't reload your config
------------------------------------------------------------------------
[2019-03-05 21:48:32] ena dot melia dot ymail at gmail dot com
thanks...
------------------------------------------------------------------------
[2019-03-05 21:47:48] ena dot melia dot ymail at gmail dot com
yeah. its work now
I am sorry. maybe that was my mistake.
I disabled opcache via php.ini and waited for 1 day. then I tried to see the results and ini_get was
successfully disabled.
so my conclusion is that the failure to disable the "ini_get" function because the results
from the "echo ini_get()" command are still cached by Opcache.
thank you for all the responses ^_^
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=77687
--
Edit this bug report at https://bugs.php.net/bug.php?id=77687&edit=1