Jump to content


Photo

PHP and IIS problems


  • Please log in to reply
11 replies to this topic

#1 benjam

benjam
  • Members
  • PipPipPip
  • Advanced Member
  • 43 posts
  • LocationSalt Lake City, UT

Posted 16 October 2006 - 10:33 PM

I have been editing a chess script and a user of the script has run into problems with his installation.

When asked about his server setup it was discovered that he is using IIS on Server 2003.

The errors seem to be happening when data is being sent through POST and I am unable to reproduce any errors on my Apache-based server.

Is there anything that may be different when running PHP on IIS from Apache that I need to know about to get this problem fixed?

Thanks.
Windows 7
MySQL: 5.1.36-community
PHP: 5.3.2 VC9
Apache 2.2 (apachelounge VC9)

#2 printf

printf
  • Staff Alumni
  • Advanced Member
  • 889 posts

Posted 16 October 2006 - 10:52 PM

POST your you code please!


me!

#3 benjam

benjam
  • Members
  • PipPipPip
  • Advanced Member
  • 43 posts
  • LocationSalt Lake City, UT

Posted 17 October 2006 - 07:26 PM

Well, unless you want the entire chess script, I'm not going to do that.  It's rather large and I'm not exactly sure where the error is occuring as I do not use IIS and cannot debug efficiently enough to figure out where that is.

But my question was not 'What's wrong with my code', but What may be different between IIS and Apache that may be causing problems?  No code is required for this question.

But if you must:
http://www.iohelix.c.../webchess2b.zip

and the error is occuring somewhere after making a move and then requesting an undo of that move. (chess.php or one of it's includes)
Windows 7
MySQL: 5.1.36-community
PHP: 5.3.2 VC9
Apache 2.2 (apachelounge VC9)

#4 printf

printf
  • Staff Alumni
  • Advanced Member
  • 889 posts

Posted 17 October 2006 - 08:13 PM

Hi I just asked to see the script so I could try it on the a few of the windows servers I have. First it really neat, it would cool with the use of adding the httprequest object!

Other than that....

I read through the the instructions and loaded the script on (6) differents servers...

I used (MySQL 4.1.13 and 5.0.4 for each server)

2 running IIS 6 Windows 2003 Enterprise, (1) running PHP 4.3.0 as CGI, no problems, (1) running PHP 5.1.4 ISAPI filter, no problems
2 running IIS 6 Windows 2003 Web, (1) running PHP 4.4.0 as CGI, no problems, (1) running PHP 6.2.5 DEV ISAPI filter (My Build), no problems
2 running IIS 5 Windows 2000 Advanced Server, (1) running PHP 4.4.0 as CGI, no problems, (1) running PHP 5.1.6 ISAPI filter, no problems
2 running IIS 5 Windows 2000 Standard, (1) running PHP 4.3.4 as CGI, no problems, (1) running PHP 5.0.2 ISAPI filter, no problems

Can they explain to you what exactly is the problem, I know you said it is happening when they are posting, but your variable logic seems to cover all things that could happen dependent on different PHP.INI settings. I would ask for more information relating to the PHP.INI, because the problem may have to do with output buffering which is a known problem under IIS and has nothing to do with your application! It could be other things to, like using the wrong settings for the version / type of PHP they are using.



me!

#5 benjam

benjam
  • Members
  • PipPipPip
  • Advanced Member
  • 43 posts
  • LocationSalt Lake City, UT

Posted 17 October 2006 - 08:24 PM

Thanks for your help...

and I have thought about AJAX for this, but my hosting co still uses Apache 1.3 so it would be no good for me.

Anywho...

The user says they install the script, register a user, register another user, invite the other user to a game, begin the game, make the first move, make another move as the other player, request an undo, log in as the other player, accept the undo, return as original player, try to make a move and the game hangs.

Or something similar.

There is a debug function you can turn on through the config file at the end of the file, set DEBUG to true and it will output a ton of stuff.  (May cause problems with headers already being sent, depending on your setup)

And I'll see if I can get his php.ini file from him for you to look at.
Windows 7
MySQL: 5.1.36-community
PHP: 5.3.2 VC9
Apache 2.2 (apachelounge VC9)

#6 printf

printf
  • Staff Alumni
  • Advanced Member
  • 889 posts

Posted 17 October 2006 - 09:19 PM

I will try to do some debugging, I did notice that (DEBUG) option, but I tried playing two games with my son, and did not have any trouble. Didn't try the undo, but did try the Chat and the Request Draw and Resign and played 2 full games and (1) inside my debugger and nothing was throwing any error other than your not using absolute URI in your redirects (location) but who does anyway. My debugger is really strict and setup to test for Windows, so not getting any errors tells me it's has to be a configuration problem relating to PHP, the php.ini settings! This thing very nice, even the color scheme is nice to look at, like I said nicely done...

me!

#7 benjam

benjam
  • Members
  • PipPipPip
  • Advanced Member
  • 43 posts
  • LocationSalt Lake City, UT

Posted 17 October 2006 - 10:07 PM

well, my user said they reverted back to a previous version, made an adjustment in the php.ini file and got it to work fine, but then brought it back to the current version, tried to make a few moves and it hung again, but this time, it made the move, whereas last time, it did not.

So, he'll get me his php.ini and phpinfo() output tonight and I'll post it here (sensitive info removed of course).

Here is what he told me though:
I believe the issue is with IIS 6 and PHP.  The reason I
believe this is due to the following test:

1.  Went back to version 2.0a
2.  Everything worked fine for a few moves, then the system
would hang, time out, but it would make the move when I
logged back into the system and checked.
3.  Found a new error in the Event log:  Application  blah
blah blah (I'm at work and don't have it memorised)
4.  Changed a setting in the php.ini file
5.  Logged back onto the system, and could then play a
complete chess game with no hang ups on version 2.0a.  I was
excited.
6.  Installed version 2.0b3 (the latest), made my first
move, logged out and made the second move, and the system
hung, BUT it made the move whereas befoe it would not make
the move.


p.s. -  We both thank you for your help with this.
Windows 7
MySQL: 5.1.36-community
PHP: 5.3.2 VC9
Apache 2.2 (apachelounge VC9)

#8 printf

printf
  • Staff Alumni
  • Advanced Member
  • 889 posts

Posted 17 October 2006 - 10:52 PM

You can just email it to me...

fataqui@gmail.com

I will have a look at it and make a setup based on those settings, it should tell us what is wrong...

me!

#9 benjam

benjam
  • Members
  • PipPipPip
  • Advanced Member
  • 43 posts
  • LocationSalt Lake City, UT

Posted 17 October 2006 - 10:56 PM

it won't be until tomorrow, i don't have the internet at home
Windows 7
MySQL: 5.1.36-community
PHP: 5.3.2 VC9
Apache 2.2 (apachelounge VC9)

#10 printf

printf
  • Staff Alumni
  • Advanced Member
  • 889 posts

Posted 17 October 2006 - 11:11 PM

Ok, that fine...

As soon as I get it, I will make a setup and see what is happening...

I'll PM you here or email you my findings!

c, ya...

me!

#11 benjam

benjam
  • Members
  • PipPipPip
  • Advanced Member
  • 43 posts
  • LocationSalt Lake City, UT

Posted 18 October 2006 - 08:58 PM

Check your PM box
Windows 7
MySQL: 5.1.36-community
PHP: 5.3.2 VC9
Apache 2.2 (apachelounge VC9)

#12 benjam

benjam
  • Members
  • PipPipPip
  • Advanced Member
  • 43 posts
  • LocationSalt Lake City, UT

Posted 23 January 2007 - 04:24 PM

I am still having problems with this and am wondering if anybody else might have anything to say about it...

Any errors that may pop up when using IIS that do not occur when using Apache?
Windows 7
MySQL: 5.1.36-community
PHP: 5.3.2 VC9
Apache 2.2 (apachelounge VC9)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users