我最近遇到了php服务器的问题,错误日志没有在任何地方写出来。
我当前的php.ini配置如下所示(由1and1.co.uk自动生成)
[PHP]
tidy.clean_output = Off
mysql.allow_persistent = On
mysql.max_links = -1
safe_mode_allowed_env_vars = PHP_
session.bug_compat_42 = Off
mysql.connect_timeout = 60
max_allowed_packet = 150
register_argc_argv = Off
open_basedir = "/var/www/vhosts/server/:/tmp/"
session.name = PHPSESSID
session.hash_function = 0
magic_quotes_runtime = Off
log_errors_max_len = 1024
mssql.secure_connection = Off
pgsql.max_links = -1
variables_order = "GPCS"
sybct.allow_persistent = On
max_input_time = 60
odbc.max_links = -1
session.save_handler = files
error_log = /var/www/vhosts/server/tmp/php_err.log
session.cookie_lifetime = 0
pgsql.auto_reset_persistent = Off
session.cache_expire = 180
error_reporting = "E-ALL"
safe_mode_gid = Off
auto_prepend_file =
sendmail_path = /usr/sbin/sendmail -t -i
sybct.min_client_severity = 10
pgsql.max_persistent = -1
auto_globals_jit = On
soap.wsdl_cache_ttl = 86400
allow_url_fopen = On
smtp_port = 25
register_globals = Off
display_startup_errors = Off
user_dir =
mssql.min_error_severity = 10
mysqli.max_links = -1
default_socket_timeout = 60
session.serialize_handler = php
session.hash_bits_per_character = 5
unserialize_callback_func =
default_mimetype = "text/html"
magic_quotes_gpc = Off
safe_mode_include_dir =
max_execution_time = 30
mail.add_x_header = On
upload_max_filesize = 20M
register_long_arrays = Off
safe_mode = off
zlib.output_compression = Off
safe_mode_protected_env_vars = LD_LIBRARY_PATH
odbc.max_persistent = -1
mssql.compatability_mode = Off
file_uploads = On
mysqli.reconnect = Off
session.cookie_domain =
mssql.allow_persistent = On
mysql.max_persistent = -1
mssql.max_links = -1
session.use_trans_sid = 0
mysql.default_socket =
mysqli.default_pw =
odbc.defaultbinmode = 1
sybct.max_persistent = -1
output_buffering = 4096
doc_root =
log_errors = on
mysql.default_host =
request_order = "GP"
display_errors = On
mysqli.default_socket =
safe_mode_exec_dir =
html_errors = Off
session.entropy_length = 0
y2k_compliance = On
post_max_size = 8M
asp_tags = On
memory_limit = "1.5G"
short_open_tag = On
session.use_only_cookies = 1
SMTP = localhost
precision = 14
session.bug_compat_warn = Off
sybct.min_server_severity = 10
mssql.min_message_severity = 10
session.gc_maxlifetime = 1440
session.save_path = "/var/lib/php/session"
session.gc_probability = 1
allow_url_include = Off
mysqli.default_host =
mysqli.default_user =
session.referer_check =
pgsql.log_notice = 0
mysql.default_port =
odbc.defaultlrl = 4096
pgsql.ignore_notice = 0
mysql.trace_mode = Off
engine = On
odbc.allow_persistent = On
track_errors = Off
pgsql.allow_persistent = On
session.auto_start = 0
auto_append_file =
disable_classes =
mysql.default_password =
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
allow_call_time_pass_reference = Off
ignore_repeated_source = Off
sql.safe_mode = Off
session.cookie_path = /
session.entropy_file =
expose_php = On
report_memleaks = On
session.gc_divisor = 1000
mssql.max_persistent = -1
serialize_precision = 100
odbc.check_persistent = On
sybct.max_links = -1
define_syslog_variables = Off
session.cookie_httponly =
session.cache_limiter = nocache
enable_dl = Off
ignore_repeated_errors = Off
mysqli.default_port = 3306
disable_functions =
magic_quotes_sybase = Off
soap.wsdl_cache_enabled = 1
session.use_cookies = 1
mysql.default_user =
implicit_flush = Off
bcmath.scale = 0
我已检查phpinfo()
并且它链接到正确的php.ini文件,并且Web用户还具有对日志文件定向到的日志文件夹的写入权限。
除此之外,即使我添加ini_set('display_errors', '1');
,它仍然不显示,也不记录php脚本错误。
是否有一些我错过的关于将php错误注销到某处的文件?
我通常会通过tail -f /var/log/httpd/error_log
访问日志
那么这可能是我的Apache配置问题吗?
非常感谢任何帮助。