Switching from Apache to IIS: how to display errors

Asked

Viewed 393 times

2

I have a very basic web page (like a questionnaire), where at the end it stores the information in a Mysql database.

While it was allocated to Apache (provided by xampp) it was working, now that I’ve moved to an IIS server the part of the post has stopped working.

The flow is:

Quiz.html > post method -> Insert.php -> End.html

-I already installed php and it’s working (I tested with the function <?php phpinfo(); ?> at the root and works)

Something else needs to be set up?

How can I debug to check the error more properly? The only result I can see is as if the server is down...

IIS logs(last 4):

2017-01-12 16:35:35 ::1 GET /survey/fonts/roboto/Roboto-Medium.ttf - 80 - ::1 Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko http://localhost/survey/ 404 0 2 1
2017-01-12 16:35:35 ::1 GET /survey/fonts/roboto/Roboto-Light.ttf - 80 - ::1 Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko http://localhost/survey/ 404 0 2 0
2017-01-12 16:35:35 ::1 GET /survey/fonts/roboto/Roboto-Regular.ttf - 80 - ::1 Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko http://localhost/survey/ 404 0 2 0
2017-01-12 16:36:01 ::1 POST /survey/insert.php - 80 - ::1 Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko http://localhost/survey/ 500 0 0 2069
  • 1

    Had an htaccess file before? what exactly is crashed? is a blank screen? the source code is displayed on the screen?

  • No, I didn’t have any of those files (if there was one created by default). The page after pressing the "save" button looks like the server is down... the link looks like localhost/Insert.php but the page does not appear, nor the print of the echo which is right at the top of the file does

1 answer

2


First, make sure PHP sends errors by including these two lines in your code:

error_reporting(E_ALL); 
ini_set("display_errors", 1);

Note that no code (from a framework, for example) undoes this later!

If errors still do not appear, check the IIS settings. In the error page options, it is enable "detailed errors" or "detailed errors in local requests mode".

Browser other questions tagged

You are not signed in. Login or sign up in order to post.