Я внес изменения в свой файл php.ini, чтобы увеличить memory limit
с 128M
до 512M
Я нашел правильный файл php.ini с помощью phpinfo ();-> '/opt/php71m/custom/php-fpm.ini'
но изменение igonred.
Даже когда я установил его с помощью ini_set('memory_limit','512M')
;это не работает снова.
php --ini дает мне еще один php.ini
файл '/etc/php.ini'
, а также кучу других ini
файлов, в которых нет этого 'memory_limit
', я тоже внес изменения в этот файлно все равно не помогает.
php -i | grep memory_limit
говорит мне, что он установлен на 512M
Но когда я запускаю свой скрипт, я получаю фатальную ошибку, которая говорит memory
предел составляет 128M
ini_get ('memory_limit') дает мне 128M
в чем проблема?
это содержимое моей конфигурациифайлы: первый файл: '/etc/php.ini'
;;; begin content - please not remove this line
[PHP]
;### MR -- generic (the same on all php 5.x version)
engine = On
short_open_tag = On
asp_tags = Off
precision = 14
y2k_compliance = On
unserialize_callback_func=
disable_classes =
expose_php = On
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
;error_reporting = E_ALL
display_startup_errors = Off
log_errors_max_len = 1024
ignore_repeated_errors = Off
report_memleaks = On
track_errors = Off
variables_order = "EGPCS"
gpc_order = "GPC"
include_path = ".:/usr/share/pear/"
doc_root =
user_dir =
extension_dir = /usr/lib64/php/modules
upload_tmp_dir = /tmp/
default_socket_timeout = 60
date.timezone = Asia/Tehran
default_charset = "utf-8"
;### MR -- certain apps not work if 0 (ex: roundcube)
cgi.fix_pathinfo = 1
;### MR -- certain apps not work if 1 (ex: wordpress in apache or proxy)
cgi.rfc2616_headers = 0
;### MR -- specific for php 5.3+
auto_globals_jit = On
zlib.output_compression = off
zlib.output_compression_level = 6
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 17
zend.enable_gc = On
expose_php = On
max_execution_time = 30
max_input_time = 60
unserialize_callback_func =
ignore_repeated_source = Off
report_memleaks = On
html_errors = On
auto_append_file =
;### MR -- custom setting (handle by kloxo)
disable_functions = exec,passthru,system,proc_open,popen,show_source
display_errors = off
file_uploads = on
upload_max_filesize = 16M
log_errors = off
error_log = /var/log/php-error.log
output_buffering = off
register_argc_argv = on
max_execution_time = 60
max_input_time = 5
post_max_size = 32M
memory_limit = 512M
allow_url_fopen = on
allow_url_include = off
session.save_path = /var/lib/php/session
cgi.force_redirect = on
;sendmail_from =
enable_dl = on
max_input_vars = 3000
;### MR -- deprecated/disabled on php 5.3+
;;register_long_arrays = Off
[Syslog]
define_syslog_variables = Off
[mail function]
SMTP = localhost
smtp_port = 25
sendmail_path = /usr/sbin/sendmail -t -i
[Java]
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[MySQL]
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off
[mSQL]
msql.max_persistent = -1
msql.max_links = -1
[PostgresSQL]
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
[Sybase]
sybase.allow_persistent = On
sybase.max_persistent = -1
sybase.max_links = -1
sybase.min_error_severity = 10
sybase.min_message_severity = 10
sybase.compatability_mode = Off
[Sybase-CT]
sybct.allow_persistent = On
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10
[dbx]
dbx.colnames_case = "lowercase"
[bcmath]
bcmath.scale = 0
[browscap]
;browscap = extra/browscap.ini
[Informix]
ifx.default_host =
ifx.default_user =
ifx.default_password =
ifx.allow_persistent = On
ifx.max_persistent = -1
ifx.max_links = -1
ifx.textasvarchar = 0
ifx.byteasvarchar = 0
ifx.charasvarchar = 0
ifx.blobinfile = 0
ifx.nullformat = 0
[Session]
session.save_handler = files
session.save_path = /var/lib/php/session
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
[MSSQL]
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatability_mode = Off
mssql.secure_connection = Off
[Assertion]
[Ingres II]
ingres.allow_persistent = On
ingres.max_persistent = -1
ingres.max_links = -1
ingres.default_database =
ingres.default_user =
ingres.default_password =
[Verisign Payflow Pro]
pfpro.defaulthost = "test-payflow.verisign.com"
pfpro.defaultport = 443
pfpro.defaulttimeout = 30
[Sockets]
sockets.use_system_read = On
[com]
[Printer]
[mbstring]
[FrontBase]
[Crack]
[exif]
;### MR -- exist on php 5.3+
[CLI Server]
cli_server.color = On
[Date]
[filter]
[iconv]
[intl]
[sqlite]
[sqlite3]
[Pcre]
[Pdo]
[Pdo_mysql]
pdo_mysql.cache_size = 2000
pdo_mysql.default_socket=
[Phar]
[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"
[MySQL]
mysql.allow_local_infile = On
mysql.allow_persistent = On
mysql.cache_size = 2000
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off
[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.cache_size = 2000
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]
[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
[mcrypt]
[dba]
;;; end content - please not remove this line
второй файл' /opt/php71m/custom/php-fpm.ini':
;;; begin content - please not remove this line
[PHP]
;### MR -- generic (the same on all php 5.x version)
engine = On
short_open_tag = On
asp_tags = Off
precision = 14
y2k_compliance = On
unserialize_callback_func=
allow_call_time_pass_reference = Off
;safe_mode_gid = Off
;safe_mode_include_dir =
;safe_mode_exec_dir =
;safe_mode_allowed_env_vars = PHP_
;safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_classes =
expose_php = On
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
;error_reporting = E_ALL
display_startup_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
report_memleaks = On
track_errors = Off
variables_order = "EGPCS"
gpc_order = "GPC"
include_path = ".:/usr/share/pear/"
doc_root =
user_dir =
extension_dir = /opt/php71m/usr/lib/php/modules
upload_tmp_dir = /tmp/
default_socket_timeout = 60
date.timezone = "Europe/London"
default_charset = "utf-8"
;### MR -- certain apps not work if 0 (ex: roundcube)
cgi.fix_pathinfo = 1
;### MR -- certain apps not work if 1 (ex: wordpress in apache or proxy)
cgi.rfc2616_headers = 0
;### MR -- custom setting (handle by kloxo)
;disable_functions = exec,passthru,shell_exec,system,proc_open,popen,show_source
;register_globals = off
display_errors = off
file_uploads = on
upload_max_filesize = 64M
;upload_max_filesize = 2000M
log_errors = off
error_log = /var/log/php71m-error.log
output_buffering = off
register_argc_argv = on
;magic_quotes_gpc = off
;magic_quotes_runtime = off
;magic_quotes_sybase = off
mysql.allow_persistent = off
max_execution_time = 60
max_input_time = 60
memory_limit= 256M
post_max_size = 64M
;max_execution_time = 3000000
;max_input_time = 60000
;memory_limit = -1
;post_max_size = 2000M
allow_url_fopen = on
allow_url_include = on
session.save_path = /var/lib/php/session
cgi.force_redirect = on
;sendmail_from =
;safe_mode = off
enable_dl = on
[Syslog]
define_syslog_variables = Off
[mail function]
SMTP = localhost
smtp_port = 25
sendmail_path = /usr/sbin/sendmail -t -i
[Java]
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[MySQL]
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off
[mSQL]
msql.max_persistent = -1
msql.max_links = -1
[PostgresSQL]
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
[Sybase]
sybase.allow_persistent = On
sybase.max_persistent = -1
sybase.max_links = -1
sybase.min_error_severity = 10
sybase.min_message_severity = 10
sybase.compatability_mode = Off
[Sybase-CT]
sybct.allow_persistent = On
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10
[dbx]
dbx.colnames_case = "lowercase"
[bcmath]
bcmath.scale = 0
[browscap]
;browscap = extra/browscap.ini
[Informix]
ifx.default_host =
ifx.default_user =
ifx.default_password =
ifx.allow_persistent = On
ifx.max_persistent = -1
ifx.max_links = -1
ifx.textasvarchar = 0
ifx.byteasvarchar = 0
ifx.charasvarchar = 0
ifx.blobinfile = 0
ifx.nullformat = 0
[Session]
session.save_handler = files
session.save_path = /var/lib/php/session
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
[MSSQL]
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatability_mode = Off
mssql.secure_connection = Off
[Assertion]
[Ingres II]
ingres.allow_persistent = On
ingres.max_persistent = -1
ingres.max_links = -1
ingres.default_database =
ingres.default_user =
ingres.default_password =
[Verisign Payflow Pro]
pfpro.defaulthost = "test-payflow.verisign.com"
pfpro.defaultport = 443
pfpro.defaulttimeout = 30
[Sockets]
sockets.use_system_read = On
[com]
[Printer]
[mbstring]
[FrontBase]
[Crack]
[exif]
;### MR -- exist on php 5.3+
[CLI Server]
cli_server.color = On
[Date]
[filter]
[iconv]
[intl]
[sqlite]
[sqlite3]
[Pcre]
pcre.backtrack_limit=100000
pcre.recursion_limit=100000
[Pdo]
[Pdo_mysql]
pdo_mysql.cache_size = 2000
pdo_mysql.default_socket=
[Phar]
[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"
[MySQL]
mysql.allow_local_infile = On
mysql.allow_persistent = On
mysql.cache_size = 2000
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off
[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.cache_size = 2000
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]
[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
[mcrypt]
[dba]
;;; end content - please not remove this line