質問

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