Verification: a143cc29221c9be0

Php can not start ошибка

Quick Troubleshooting Guide¶

Before engaging us for Premium Support service, you may like to try a few of these simple steps to see if you can fix the error yourself:

  • Check the phpinfo page of the problematic user account. (Create a phpinfo.php file if no phpinfo page exists.)
  • Generally, the server's error_log or stderr.log should provide some hints as to the problem. For example, it may be a memory issue.
  • Disable opcode cache for the PHP version in use and verify from the phpinfo page.
  • Disable unsafe PHP extensions such as ZendGuardLoader, Suhosin, ionCube, etc.
  • Check disk space.
  • If CloudLinux is used, check the LVE memory limit to see if it needs to be increased.
  • If CloudLinux is used, check the LVE process limit to see if it needs to be increased.
  • Try increasing the PHP memory limit(you can verify from phpinfo.php) and lsphp external app memory limit.

These are just a few simple quick fixes for you to try first. If they don't help, you can refer to the following log files for detailed steps/reasons, or engage our support as mentioned earlier.

Check Log Files¶

There are many different log files that may help you determine the cause of the 503 error. In this section we will discuss the different log files, their locations, and what information they provide.

When troubleshooting 503 errors it is ideal to check these logs in the following order:

  1. Standard Error Log
  2. Web Server Error Log
  3. System Log
  4. PHP Error Log

Standard Error Log stderr.log

The stderr.log file contains standard errors generated while PHP is running. It can usually be found in either the /var/log/apache2/ or/usr/local/lsws/logs/ directory. This log is usually the most helpful when determining why PHP is throwing 503s.

Example

Example output from a standard error log: vi /var/log/apache2/stderr.log

[STDERR] fork() failed, please increase process limit: Cannot allocate memory

Web Server Error Log¶

This error log is generated by the web server. It can usually be found in either the /var/log/apache2/ or /usr/local/lsws/logs/ directory. The web server error log may provide helpful hints as to whether the web server caused PHP to fail.

Example

Example output from a web server error log:

[INFO] [319934] [1.1.1.1:49873-1#APVH:lsapi] connection to [uds://tmp/lshttpd/APVH-php56.sock] on request #0, confirmed, 0, associated process: 0, running: 0, error: Too many open files!

The following very important command should give you ideas on how many 503 errors have been generated and wheather there are any new 503 errors since your last attempted fix by checking the timestamp. However, most of the time, the error log doesn't give you the reason why the 503 error happened. It only shows you when it happened and with which domain it happened.

grep oops /etc/apache2/logs/error_log

System Log¶

This error log is generated by the operating system. It can usually be found as either /var/log/messages or /var/log/syslog. This log is helpful if PHP is being affected by the operating system.

Example

Example output from a system log: grep lsphp /var/log/messages

lfd[18304]: *User Processing* PID:18264 Kill:1 User:xxxxx VM:538(MB) EXE:/usr/local/lsws/fcgi-bin/lsphp-5.4.42 CMD:lsphp5

It shows the lsphp process was killed by lfd firewall security feature. You should exclude lsphp from lfd.

PHP Error Log¶

This error log is defined in php.ini and you can check phpinfo.php for the php error_log defined. By default, cpanel will set it to error_log. It is generated by PHP when it detects an error, warning, etc., depending on your log level in PHP. It is usually generated inside of the same folder that the PHP script runs in.

Example

Example output from a PHP error log: vi home/mysite/public_html/error_log

Fatal error: Call to undefined function my_function() in /home/mysite/public_html/test.php on line 2

These types of errors are usually found inside of the PHP application you are trying to run. It is best to forward these logs to the developer of the PHP application.