跳转到主要内容
联系我们
  • 新加坡 服务时间:9:00~18:00 周一至周五+65 6701 1359
联系电话和工作时间
预约回电

无须在线等候,提交预约我们将尽快回电。

预约回电
帮助中心

使用我们的在线帮助资源

帮助

Linux Hosting (cPanel) 帮助

Set up custom-defined PHP error logs in cPanel for my Linux Hosting

cPanel offers built-in error logging, but it doesn't catch errors generated from PHP or keep error logs for extended periods of time. To remedy this, you can have PHP store errors it encounters in a custom-defined error log file.

Required: To follow these steps you need your FTP username.
  1. Create a file called php_error.log, and move the file to your server with FTP or the cPanel File Manager.
  2. Create or edit a PHP initialization file containing the following line of code:
    error_log = /home/[your FTP username]/public_html/php_error.log

    Note: Make sure this file has the right name.

Now, PHP will pass any coding-related errors to the php_error.log file. This file can take a few hours before it starts receiving errors your website generates, and only displays content if your website does generate errors.

More info

社区相关

danishjk's Avatar
Trouble with CPanel setup in Linux Hosting

28 回复

Last posted about 2 years ago.

Hansraj07's Avatar
Unable to register a cpanel username

2 回复

Last posted over 4 years ago.

translators's Avatar
Wordpress Multisite with sub-domain wildcard DNS setup

1 回复

Last posted almost 5 years ago.

Charliep's Avatar
Cannot access new database from within Wordpress (PHP)

1 回复

Last posted over 2 years ago.

arvindwill's Avatar
PHP version for folder alone

3 回复

Last posted over 3 years ago.

看不到您在寻找的东西?搜索社区