Вопрос

I am having two servers, both are hosted on hostgator. On one server (which is my own), my php code works as expected, while on another (which is of my client), the code doesn't work properly. Now my server generates error_log file, so it's easier to debug. But I can't find the same error_log file on my client's server.
Is there anything I can do to generate error_log file. I've already seen answers on other posts and checked the settings in php.ini file.

Это было полезно?

Решение

Your other server may have error log turned off, so you can do the following.

error_reporting(E_ALL); //to set the level of errors to log, E_ALL sets all warning, info , error

ini_set("log_errors", true);
ini_set("error_log", "/your_error_path/file.log"); //send error log to log file specified here. 

Add the above code to your file and then execute in the other server.

Другие советы

First of all, check the software version. Then, you could try diffing the two files (php.ini) .

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top