Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

IIS not displaying PHP errors

BadGuyBadGuy Posts: 19Member
Server info:
Public: No (intranet)
OS: Windows 2000 server SP3
IIS: Standard installation working (no lockdown done yet)
MSSQL 7.0: Working
PHP: Working latest version installed as ISAPI dll

---

Problem description:

The php error reporting system seems to refuse to do anything while when I connect to the mssql database through php when it is down it DOES display an error. My page does not use frames it DOES use alot of includes. This shouldn't be a problem as my apache server at home also has some pages on it with alot of includes that DO report errors. Is there some setting in PHP or mssql to enable php errors?

Thank you for your time,

yours truly,

Alex

Comments

  • jeskejeske Posts: 23Member
    Hi,
    The php.ini file has an "error handling and logging" section that allows you to determine what if any errors will be displayed. Part of that section looks like this:

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Error handling and logging ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    ; error_reporting is a bit-field. Or each number up to get desired error
    ; reporting level
    ; E_ALL - All errors and warnings
    ; E_ERROR - fatal run-time errors
    ; E_WARNING - run-time warnings (non-fatal errors)
    ; E_PARSE - compile-time parse errors
    ; E_NOTICE - run-time notices (these are warnings which often result
    ; from a bug in your code, but it's possible that it was
    ; intentional (e.g., using an uninitialized variable and
    ; relying on the fact it's automatically initialized to an
    ; empty string)
    ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
    ; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
    ; initial startup
    ; E_COMPILE_ERROR - fatal compile-time errors
    ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
    ; E_USER_ERROR - user-generated error message
    ; E_USER_WARNING - user-generated warning message
    ; E_USER_NOTICE - user-generated notice message
    ;
    ; Examples:
    ;
    ; - Show all errors, except for notices
    ;
    ;error_reporting = E_ALL & ~E_NOTICE
    ;
    ; - Show only errors
    ;
    ;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
    ;
    ; - Show all errors except for notices
    ;
    error_reporting = E_ALL & E_NOTICE

    ; Print out errors (as a part of the output). For production web sites,
    ; you're strongly encouraged to turn this feature off, and use error logging
    ; instead (see below). Keeping display_errors enabled on a production web site
    ; may reveal security information to end users, such as file paths on your Web
    ; server, your database schema or other information.
    display_errors = Off

    Note that the semi-colons are used for commenting in this file.

    Hope this helps.

    Jeff

    : Problem description:
    :
    : The php error reporting system seems to refuse to do anything while when I connect to the mssql database through php when it is down it DOES display an error. My page does not use frames it DOES use alot of includes. This shouldn't be a problem as my apache server at home also has some pages on it with alot of includes that DO report errors. Is there some setting in PHP or mssql to enable php errors?
    :
    : Thank you for your time,
    :
    : yours truly,
    :
    : Alex
    :

  • BadGuyBadGuy Posts: 19Member
    : Hi,
    : The php.ini file has an "error handling and logging" section that allows you to determine what if any errors will be displayed. Part of that section looks like this:
    :
    : ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    : ; Error handling and logging ;
    : ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    :
    : ; error_reporting is a bit-field. Or each number up to get desired error
    : ; reporting level
    : ; E_ALL - All errors and warnings
    : ; E_ERROR - fatal run-time errors
    : ; E_WARNING - run-time warnings (non-fatal errors)
    : ; E_PARSE - compile-time parse errors
    : ; E_NOTICE - run-time notices (these are warnings which often result
    : ; from a bug in your code, but it's possible that it was
    : ; intentional (e.g., using an uninitialized variable and
    : ; relying on the fact it's automatically initialized to an
    : ; empty string)
    : ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
    : ; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
    : ; initial startup
    : ; E_COMPILE_ERROR - fatal compile-time errors
    : ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
    : ; E_USER_ERROR - user-generated error message
    : ; E_USER_WARNING - user-generated warning message
    : ; E_USER_NOTICE - user-generated notice message
    : ;
    : ; Examples:
    : ;
    : ; - Show all errors, except for notices
    : ;
    : ;error_reporting = E_ALL & ~E_NOTICE
    : ;
    : ; - Show only errors
    : ;
    : ;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
    : ;
    : ; - Show all errors except for notices
    : ;
    : error_reporting = E_ALL & E_NOTICE
    :
    : ; Print out errors (as a part of the output). For production web sites,
    : ; you're strongly encouraged to turn this feature off, and use error logging
    : ; instead (see below). Keeping display_errors enabled on a production web site
    : ; may reveal security information to end users, such as file paths on your Web
    : ; server, your database schema or other information.
    : display_errors = Off
    :
    : Note that the semi-colons are used for commenting in this file.
    :
    : Hope this helps.
    :
    : Jeff
    :
    : : Problem description:
    : :
    : : The php error reporting system seems to refuse to do anything while when I connect to the mssql database through php when it is down it DOES display an error. My page does not use frames it DOES use alot of includes. This shouldn't be a problem as my apache server at home also has some pages on it with alot of includes that DO report errors. Is there some setting in PHP or mssql to enable php errors?
    : :
    : : Thank you for your time,
    : :
    : : yours truly,
    : :
    : : Alex
    : :
    :
    :

    Thank you for the post. It did not help for me. I had turned display_errors = Off to display_errors = On, but this did not do anything for me

Sign In or Register to comment.