IIS 7 and Above
php 5 and iis7 on server 2008
Last post May 01, 2008 11:59 AM by stupidllama
Apr 29, 2008 05:29 PM|stupidllama|LINK
Heres my issue, I have successfully installed php 5.2.5 on server 08, installed mysql and phpmyadmin and all seems to be working except in one capacity. After banging my head against the wall for days It seem as though if I call a variable $whatever=$_POST['stuff']
or $whatever=$_GET['stuff'], i get a "500 error internal server error there is a problem with the resource and it cant be displayed". I'm sure this is more of a php.ini problem, perhaps, but I've parsed through that damn file 4 million times and have no
idea what it could be and haven't been able to find any help out there, All this stuff was working on php 5.2.4 and apache, but now that i get a nice 08 server set up and already got some ftping going on there so i would rather not go back. The pages that
connect directly to the databas and pull info work just fine, but any page that has info passed to it, i get nothin'. any help would be greatly appreciated.
IIS7 fastCGI Installation
Apr 30, 2008 12:29 AM|thomad|LINK
If it's a PHP.INI issue this shouldn't work:
<?php phpInfo(); ?>
But it seems only this doesn't work:
Apr 30, 2008 10:18 AM|stupidllama|LINK
That is correct. phpinfo works fine and so does other php code along with other database querys and the like, but when ever there is a post or get i get a 500 error witch tells me nothing.
IIS7 fastCGI Installation
Apr 30, 2008 10:40 AM|stupidllama|LINK
I have now noticed that some other things arnt working either, while some other code works, mysql querys and the like it seems that includes arnt working and also some if else
for instance this gives me a 500 error:
but if i do this:
page displays and i see the value of orderby.
Apr 30, 2008 03:34 PM|ruslany|LINK
Are the friendly errors in IE disabled (Tools -> Internet Options -> Advanced -> Browsing -> Show friendly HTTP error messages)?
Also do you see any PHP errors in the PHP log file? To enable PHP logging set these in php.ini:
log_errors = On
error_log = "C:\Path\To\Your\Logfile.log
Apr 30, 2008 04:53 PM|stupidllama|LINK
after turning my error log on, (i turned friendlies off a couple of days ago, check it again, still of, but still just getting 500 error) I noticed that there was some errors, i believe i messed some stuff up in trying to trouble shoot. once i got those
issues worked out i was able to get certain info to show up that was using the post and get methods. includes seem to be working if else as well. Seems as though it was my problem form the beginning, thats pretty embarrassing. I am still getting php errors
for undefined varaiable and undefined index errors however that peice of code that the error is for seem to be working just fine and not causing any problem. it the orderby code from above, its working the way it should but still showing an error in the log.
I would still like to know however what the deal is with the 500 error, i probably could have figured this out if i was getting the php errors that i was looking for to begin with.
Thanks for the help though.
May 01, 2008 12:11 AM|ruslany|LINK
To troubleshoot 500 error, you could try the Failed Request Tracing (FRT) feature in IIS7. Create a rule that will capture a trace for 500 errors and then check through the trace log file and see if it gives you any useful information. Here is the
article on how to use FRT.
May 01, 2008 11:59 AM|stupidllama|LINK
thanks ill take a look everything seems to be working fine now.