Php not reporting any errors on IIS7

空扰寡人 提交于 2019-12-21 18:57:10

问题


I am developing a PHP application using our XAMPP setup as a test server.

Once the app is ready to deploy, I have to upload it to the client's server,

The problem is the client's server is running IIS 7, and every time there is a PHP error it just displays a blank page...

Now, my app has error_reporting(E_ALL) already set, and I do not have access to the php.ini file (don't ask why!)...

and I have tried every combination of parameters for error_reporting() found here: http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting

Can anyone point me towards another way of getting the errors to show up at all?

btw: I am using codeigniter, and I've tried the error_logging functions it provides to no avail...


回答1:


It's probably good to have it turned off on a production server. You can always turn error logging on, if they'll give you access to the log file.

But for a quick fix, you can just turn display_errors on. Just remember to turn it off and set up logging when you're done getting the code configured to run on the client's server.

<?PHP
ini_set('display_errors',true);



回答2:


try

ini_set("display_errors", 1);

It's possible this is turned off.



来源:https://stackoverflow.com/questions/1586317/php-not-reporting-any-errors-on-iis7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!