Yii Framework Forum: Errors and IIS 7 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Errors and IIS 7 No yii errors? Rate Topic: -----

#1 User is offline   adad64 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 23-April 12

Posted 23 April 2012 - 03:04 PM

Hello all, sorry to start off my Yii forum experience with a plea for help but I can't figure out how to make Yii display errors correctly on IIS 7. Every error thrown manages to create a generic "There is a problem with the resource you are looking for, and it cannot be displayed." Internal Server Error 500.

If I set the log to write to the file I can still retrieve the stack trace and problem but I would really like to be able to see Yii's error screens. I've also noticed that normal errors (such as including a non-existent file) also manage to throw server 500 errors but only when done through yii. This makes me think there's something not working between the server and yii's error throwing system.

Thanks in advance and let me know if I need to give more info on anything.
0

#2 User is offline   adad64 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 23-April 12

Posted 23 April 2012 - 04:01 PM

Nevermind I managed to fix it. For some reason whenever you set an error header on IIS it automatically stops right there and displays its generic error page. I extended the CErrorHandler Class, copied the private _error, handleError(), and handleException() over to my new YErrorHandler and deleted the part where it sent the headers and everything seems to be working fine. R.I.P. headers.
1

#3 User is offline   acorncom 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 99
  • Joined: 25-February 11
  • Location:CO, USA

Posted 23 April 2012 - 10:27 PM

Last time I ran into this it turned out there was an IIS setting that could be changed that would allow you to see the PHP errors. Sorry, don't remember what it was, but you shouldn't have to go to the trouble of overriding CErrorHandler to get this working ...
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users