длина содержимого — слишком короткий ответ PHP

В настоящее время я использую PHPStorm в качестве своей IDE для разработки и отладки php-сайта.

Проблема в том, что html-ответ иногда является неполным. Ответ, вероятно, будет намного короче, чем он должен быть, поэтому браузер показывает мне половину страницы (с неполным HTML-кодом).

Я попытался добавить ob_get_length () для подсчета выходного буфера. Когда возникает вышеуказанная проблема, она намного больше, чем длина содержимого ответа в заголовке.

Кажется, что выходной буфер чист, пока он записывается в браузер, или кодировка неверна. Я проверяю кодировку php.ini, только для символа по умолчанию установлено значение utf-8.

Кто-нибудь может помочь?
Вот конфигурация, которую я имею для интерпретатора PHP:

PHP version: 5.6.11
PHP CLI: /usr/local/php5-5.6.11-20150710-214934/bin/php-cgi PHP CGI: /usr/local/php5-5.6.11-20150710-214934/bin/php-cgi
Loaded Configuration File: /usr/local/php5/lib/php.ini
Additional .ini files parsed:  /usr/local/php5/php.d/10-extension_dir.ini /usr/local/php5/php.d/20-extension-opcache.ini /usr/local/php5/php.d/50-extension-apcu.ini /usr/local/php5/php.d/50-extension-curl.ini /usr/local/php5/php.d/50-extension-gmp.ini /usr/local/php5/php.d/50-extension-igbinary.ini /usr/local/php5/php.d/50-extension-imap.ini /usr/local/php5/php.d/50-extension-intl.ini /usr/local/php5/php.d/50-extension-mcrypt.ini /usr/local/php5/php.d/50-extension-memcache.ini /usr/local/php5/php.d/50-extension-memcached.ini /usr/local/php5/php.d/50-extension-mongo.ini /usr/local/php5/php.d/50-extension-mssql.ini /usr/local/php5/php.d/50-extension-oauth.ini /usr/local/php5/php.d/50-extension-pdo_dblib.ini /usr/local/php5/php.d/50-extension-pdo_pgsql.ini /usr/local/php5/php.d/50-extension-pgsql.ini /usr/local/php5/php.d/50-extension-propro.ini /usr/local/php5/php.d/50-extension-raphf.ini /usr/local/php5/php.d/50-extension-readline.ini /usr/local/php5/php.d/50-extension-redis.ini /usr/local/php5/php.d/50-extension-solr.ini /usr/local/php5/php.d/50-extension-ssh2.ini /usr/local/php5/php.d/50-extension-twig.ini /usr/local/php5/php.d/50-extension-uploadprogress.ini /usr/local/php5/php.d/50-extension-xdebug.ini /usr/local/php5/php.d/50-extension-xhprof.ini /usr/local/php5/php.d/50-extension-xsl.ini /usr/local/php5/php.d/60-extension-pecl_http.ini /usr/local/php5/php.d/99-liip-developer.ini
Debugger extension: xdebug 2.2.5
Loaded extensions:  apc, apcu, bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, http, iconv, igbinary, imap, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mhash, mongo, mssql, mysql, mysqli, mysqlnd, OAuth, odbc, openssl, pcntl, pcre, PDO, pdo_dblib, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, propro, raphf, readline, redis, Reflection, session, shmop, SimpleXML, soap, sockets, solr, SPL, sqlite3, ssh2, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xdebug, xhprof, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib
Configuration options:
allow_url_fopen
1
allow_url_include

always_populate_raw_post_data
0
apc.coredump_unmap
0
apc.enable_cli
0
apc.enabled
1
apc.entries_hint
4096
apc.gc_ttl
3600
apc.mmap_file_mask

apc.preload_path

apc.rfc1867
0
apc.rfc1867_freq
0
apc.rfc1867_name
APC_UPLOAD_PROGRESS
apc.rfc1867_prefix
upload_
apc.rfc1867_ttl
3600
apc.serializer
php
apc.shm_segments
1
apc.shm_size
32M
apc.slam_defense
1
apc.smart
0
apc.ttl
0
apc.use_request_time
1
apc.writable
/tmp
arg_separator.input
&
arg_separator.output
&
asp_tags

assert.active
1
assert.bail
0
assert.callback

assert.quiet_eval
0
assert.warning
1
auto_append_file

auto_detect_line_endings
0
auto_globals_jit
1
auto_prepend_file

bcmath.scale
0
browscap

cgi.check_shebang_line
1
cgi.discard_path
0
cgi.fix_pathinfo
1
cgi.force_redirect
1
cgi.nph
0
cgi.redirect_status_env

cgi.rfc2616_headers
0
cli.pager

cli.prompt
\b \>
curl.cainfo

date.default_latitude
31.7667
date.default_longitude
35.2333
date.sunrise_zenith
90.583333
date.sunset_zenith
90.583333
date.timezone

default_charset
UTF-8
default_mimetype
text/html
default_socket_timeout
60
disable_classes

disable_functions

display_errors
1
display_startup_errors
1
doc_root

docref_ext

docref_root

enable_dl

enable_post_data_reading
1
error_append_string

error_log

error_prepend_string

error_reporting
32767
exif.decode_jis_intel
JIS
exif.decode_jis_motorola
JIS
exif.decode_unicode_intel
UCS-2LE
exif.decode_unicode_motorola
UCS-2BE
exif.encode_jis

exif.encode_unicode
ISO-8859-15
exit_on_timeout
0
expose_php
1
extension_dir
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20131226
fastcgi.logging
1
file_uploads
1
filter.default
unsafe_raw
filter.default_flags

from

gd.jpeg_ignore_warning
0
highlight.comment
#FF8000
highlight.default
#0000BB
highlight.html
#000000
highlight.keyword
#007700
highlight.string
#DD0000
html_errors
1
http.etag.mode
crc32b
iconv.input_encoding

iconv.internal_encoding

iconv.output_encoding

igbinary.compact_strings
1
ignore_repeated_errors

ignore_repeated_source

ignore_user_abort
0
implicit_flush

include_path
.:/usr/local/php5/lib/php
input_encoding

internal_encoding

intl.default_locale

intl.error_level
0
intl.use_exceptions
0
ldap.max_links
-1
log_errors
1
log_errors_max_len
1024
mail.add_x_header
1
mail.force_extra_parameters

mail.log

max_execution_time
30
max_file_uploads
20
max_input_nesting_level
64
max_input_time
60
max_input_vars
1000
mbstring.detect_order

mbstring.encoding_translation
0
mbstring.func_overload
0
mbstring.http_input

mbstring.http_output

mbstring.http_output_conv_mimetypes
^(text/|application/xhtml\+xml)
mbstring.internal_encoding

mbstring.language
neutral
mbstring.strict_detection
0
mbstring.substitute_character

mcrypt.algorithms_dir

mcrypt.modes_dir

memcache.allow_failover
1
memcache.chunk_size
32768
memcache.compress_threshold
20000
memcache.default_port
11211
memcache.hash_function
crc32
memcache.hash_strategy
consistent
memcache.lock_timeout
15
memcache.max_failover_attempts
20
memcache.protocol
ascii
memcache.redundancy
1
memcache.session_redundancy
2
memcached.compression_factor
1.3
memcached.compression_threshold
2000
memcached.compression_type
fastlz
memcached.serializer
php
memcached.sess_binary
0
memcached.sess_connect_timeout
1000
memcached.sess_consistent_hash
0
memcached.sess_lock_expire
0
memcached.sess_lock_max_wait
0
memcached.sess_lock_wait
150000
memcached.sess_locking
1
memcached.sess_number_of_replicas
0
memcached.sess_prefix
memc.sess.key.
memcached.sess_randomize_replica_read
0
memcached.sess_remove_failed
0
memcached.sess_sasl_password

memcached.sess_sasl_username

memcached.store_retry_count
2
memcached.use_sasl
0
memory_limit
128M
mongo.allow_empty_keys
0
mongo.chunk_size
261120
mongo.cmd
$
mongo.default_host
localhost
mongo.default_port
27017
mongo.is_master_interval
15
mongo.long_as_object
0
mongo.native_long
1
mongo.ping_interval
5
mssql.allow_persistent
1
mssql.batchsize
0
mssql.charset
UTF-8
mssql.compatability_mode
0
mssql.compatibility_mode

mssql.connect_timeout
5
mssql.datetimeconvert
1
mssql.max_links
-1
mssql.max_persistent
-1
mssql.max_procs
-1
mssql.min_error_severity
10
mssql.min_message_severity
10
mssql.secure_connection

mssql.textlimit
-1
mssql.textsize
-1
mssql.timeout
60
mysql.allow_local_infile
1
mysql.allow_persistent
1
mysql.connect_timeout
60
mysql.default_host

mysql.default_password

mysql.default_port

mysql.default_socket

mysql.default_user

mysql.max_links
-1
mysql.max_persistent
-1
mysql.trace_mode

mysqli.allow_local_infile
1
mysqli.allow_persistent
1
mysqli.default_host

mysqli.default_port
3306
mysqli.default_pw

mysqli.default_socket

mysqli.default_user

mysqli.max_links
-1
mysqli.max_persistent
-1
mysqli.reconnect

mysqli.rollback_on_cached_plink
0
mysqlnd.collect_memory_statistics
1
mysqlnd.collect_statistics
1
mysqlnd.debug

mysqlnd.fetch_data_copy
0
mysqlnd.log_mask
0
mysqlnd.mempool_default_size
16000
mysqlnd.net_cmd_buffer_size
4096
mysqlnd.net_read_buffer_size
32768
mysqlnd.net_read_timeout
31536000
mysqlnd.sha256_server_public_key

mysqlnd.trace_alloc

odbc.allow_persistent
1
odbc.check_persistent
1
odbc.default_cursortype
3
odbc.default_db

odbc.default_pw

odbc.default_user

odbc.defaultbinmode
1
odbc.defaultlrl
4096
odbc.max_links
-1
odbc.max_persistent
-1
opcache.blacklist_filename

opcache.consistency_checks
0
opcache.dups_fix
0
opcache.enable
0
opcache.enable_cli
0
opcache.enable_file_override
0
opcache.error_log

opcache.fast_shutdown
0
opcache.file_update_protection
2
opcache.force_restart_timeout
180
opcache.inherited_hack
1
opcache.interned_strings_buffer
4
opcache.load_comments
1
opcache.log_verbosity_level
1
opcache.max_accelerated_files
2000
opcache.max_file_size
0
opcache.max_wasted_percentage
5
opcache.memory_consumption
64
opcache.optimization_level
0xFFFFFFFF
opcache.preferred_memory_model

opcache.protect_memory
0
opcache.restrict_api

opcache.revalidate_freq
2
opcache.revalidate_path
0
opcache.save_comments
1
opcache.use_cwd
1
opcache.validate_timestamps
1
open_basedir

openssl.cafile

openssl.capath

output_buffering
4096
output_encoding

output_handler

pcre.backtrack_limit
1000000
pcre.recursion_limit
100000
pdo_mysql.default_socket
/tmp/mysql.sock
pgsql.allow_persistent
1
pgsql.auto_reset_persistent

pgsql.ignore_notice
0
pgsql.log_notice
0
pgsql.max_links
-1
pgsql.max_persistent
-1
phar.cache_list

phar.readonly
1
phar.require_hash
1
post_max_size
8M
precision
14
raphf.persistent_handle.limit
-1
realpath_cache_size
16K
realpath_cache_ttl
120
redis.arrays.autorehash

redis.arrays.functions

redis.arrays.hosts

redis.arrays.index

redis.arrays.names

redis.arrays.previous

register_argc_argv

report_memleaks
1
report_zend_debug
1
request_order
GP
sendmail_from

sendmail_path
/usr/sbin/sendmail -t -i
serialize_precision
17
session.auto_start
0
session.cache_expire
180
session.cache_limiter
nocache
session.cookie_domain

session.cookie_httponly

session.cookie_lifetime
0
session.cookie_path
/
session.cookie_secure

session.entropy_file
/dev/urandom
session.entropy_length
32
session.gc_divisor
1000
session.gc_maxlifetime
1440
session.gc_probability
1
session.hash_bits_per_character
5
session.hash_function
0
session.name
PHPSESSID
session.referer_check

session.save_handler
files
session.save_path

session.serialize_handler
php
session.upload_progress.cleanup
1
session.upload_progress.enabled
1
session.upload_progress.freq
1%
session.upload_progress.min_freq
1
session.upload_progress.name
PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix
upload_progress_
session.use_cookies
1
session.use_only_cookies
1
session.use_strict_mode
0
session.use_trans_sid
0
short_open_tag

SMTP
localhost
smtp_port
25
soap.wsdl_cache
1
soap.wsdl_cache_dir
/tmp
soap.wsdl_cache_enabled
1
soap.wsdl_cache_limit
5
soap.wsdl_cache_ttl
86400
sql.safe_mode

sqlite3.extension_dir

sys_temp_dir

tidy.clean_output

tidy.default_config

track_errors
1
unserialize_callback_func

upload_max_filesize
2M
upload_tmp_dir

url_rewriter.tags
a=href,area=href,frame=src,input=src,form=fakeentry
user_agent

user_dir

user_ini.cache_ttl
300
user_ini.filename
.user.ini
variables_order
GPCS
xdebug.auto_trace
0
xdebug.cli_color
0
xdebug.collect_assignments
0
xdebug.collect_includes
1
xdebug.collect_params
0
xdebug.collect_return
0
xdebug.collect_vars
0
xdebug.coverage_enable
1
xdebug.default_enable
1
xdebug.dump.COOKIE

xdebug.dump.ENV

xdebug.dump.FILES

xdebug.dump.GET

xdebug.dump.POST

xdebug.dump.REQUEST

xdebug.dump.SERVER

xdebug.dump.SESSION

xdebug.dump_globals
1
xdebug.dump_once
1
xdebug.dump_undefined
0
xdebug.extended_info
1
xdebug.file_link_format

xdebug.idekey

xdebug.max_nesting_level
100
xdebug.overload_var_dump
1
xdebug.profiler_aggregate
0
xdebug.profiler_append
0
xdebug.profiler_enable
0
xdebug.profiler_enable_trigger
1
xdebug.profiler_output_dir
/var/tmp/
xdebug.profiler_output_name
xdebug-profile-cachegrind.out-%H-%R
xdebug.remote_autostart

xdebug.remote_connect_back
0
xdebug.remote_cookie_expire_time
3600
xdebug.remote_enable
1
xdebug.remote_handler
dbgp
xdebug.remote_host
localhost
xdebug.remote_log

xdebug.remote_mode
req
xdebug.remote_port
9000
xdebug.scream
0
xdebug.show_exception_trace
0
xdebug.show_local_vars
0
xdebug.show_mem_delta
0
xdebug.trace_enable_trigger
0
xdebug.trace_format
0
xdebug.trace_options
0
xdebug.trace_output_dir
/var/tmp/
xdebug.trace_output_name
trace.%c
xdebug.var_display_max_children
128
xdebug.var_display_max_data
2048
xdebug.var_display_max_depth
128
xhprof.output_dir

xmlrpc_error_number
0
xmlrpc_errors
0
xsl.security_prefs
44
zend.detect_unicode
1
zend.enable_gc
1
zend.multibyte
0
zend.script_encoding

zlib.output_compression

zlib.output_compression_level
-1
zlib.output_handler

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …