3

I have looked through the various questions on php error reporting on iis7 but have not been able to solve my problem.

I have error reporting turned off in my php ini file, (a lot of sites on this server were transferred from IIS 6 and these sites were producing warnings etc)

I really need to turn on error reporting on a per site basis, i looked at this thread: How to get useful error messages in PHP? i have tried adding to the .htaccess:

# PHP error handling for development servers
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_flag log_errors on
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag report_memleaks on
php_flag track_errors on
php_value docref_root 0
php_value docref_ext 0
php_value error_log \inetpub\vhosts\camerich.co.uk\subdomains\2012\httpdocs\PHP_errors.log
php_value error_reporting 999999999
php_value error_reporting -1
php_value log_errors_max_len 0

<Files PHP_errors.log>
 Order allow,deny
 Deny from all
 Satisfy All
</Files>

And added to my php file: error_reporting(E_ALL); ini_set('display_errors', '1');

i am still not getting any errors displayed just error 500 internal server error. if i browse the site while logged on too the server through remote desktop connection i do get the errors, but for clients developing sites i obviously dont want to give them root access to the server to view these errors.

is there something i am missing? so my questions are:

are the steps i have detailed above correct? (i am using helicon ape)

after changing the htaccess do i have to restart iis7 or is just restarting the site enough?

no log file is generated either, is the path to the logfile to include the full path including the drive letter? or if not what should be the path for example say i my website in this folder: D:\inetpub\vhosts\mydomain\subdomains\2012\httpdocs what should i put in as the path to the logfile.

appreciate any help on this thanks for taking the time to read my problem.

Community
  • 1
  • 1
Dizzy Bryan High
  • 2,015
  • 9
  • 38
  • 61
  • This question is answered here on SO - http://stackoverflow.com/questions/1586317/php-not-reporting-any-errors-on-iis7 – Tony M Feb 12 '14 at 20:32

2 Answers2

0

i found this article which has solved the error reporting problem:

http://www.inetnj.com/?page_id=232

The error reporting on a per site basis it seems it controlled by the asp panel, confusing if your using php, i would have thought this would be under php settings somewhere.

When you are debugging your website (Classic ASP, ASP.NET or PHP5) you would like to see report of the errors that you are encountering on your browser. In order to do that, you need to enable the Explicit Error Reporting in IIS7.

Open the Internet Information Services (IIS) Manager from the Administrator Tools.

Click your website from the left pane tree and double-click ASP from the center panel.

Under Debugging Properties set to True the Send Errors to Browser option.

Dizzy Bryan High
  • 2,015
  • 9
  • 38
  • 61
-1

.htaccess files are useless in IIS they are configruration files for Apache server. IIS has an extension for PHP configuration, install that (from Web Installer for example) and then you can configure the error reporting (and ofcourse you can use the php.ini directly).

Peter Kiss
  • 9,309
  • 2
  • 23
  • 38
  • its not true that htaccess files are useless in iis7, at least not for url rewriting, as i stated in my post i use helicon ape, i think there is also a microsoft rewrite module for iis7, maybe htaccess wont work for the error reporting, but it can be used... – Dizzy Bryan High Oct 26 '12 at 11:31
  • IIS configuration files are .config files with XML syntax. The Helicon stuff is just a managed module for IIS to parse the .htaccess file. – Peter Kiss Oct 26 '12 at 11:52