Jump to content

Recommended Posts

I don't know where I should be posting this question, so I desited to post it here. I am running Win2000 on my server, and I have the latest PHP installed. Well, I have been spending weeks trying to get it to work. I went to MSDN and found an artical that bassically says that I need to find a PHP version that will work with Windows 2000. Please help!

Link to comment
https://forums.phpfreaks.com/topic/166033-what-php-version-should-i-install/
Share on other sites

Well, I found this...

 

From MSDN:

The getaddrinfo function was added to the Ws2_32.dll on Windows XP and later. To execute an application that uses this function on earlier versions of Windows, then you need to include the Ws2tcpip.h and Wspiapi.h files. When the Wspiapi.h include file is added, the getaddrinfo function is defined to the WspiapiGetAddrInfo inline function in the Wspiapi.h file. At runtime, the WspiapiGetAddrInfo function is implemented in such a way that if the Ws2_32.dll or the Wship6.dll (the file containing getaddrinfo in the IPv6 Technology Preview for Windows 2000) does not include getaddrinfo, then a version of getaddrinfo is implemented inline based on code in the Wspiapi.h header file. This inline code will be used on older Windows platforms that do not natively support the getaddrinfo function.

The IPv6 protocol is supported on Windows 2000 when the IPv6 Technology Preview for Windows 2000 is installed. Otherwise getaddrinfo support on versions of Windows earlier than Windows XP is limited to handling IPv4 name resolution.

The GetAddrInfoW function is the Unicode version of getaddrinfo. The GetAddrInfoW function was added to the Ws2_32.dll in Windows XP with Service Pack 2 (SP2). The GetAddrInfoW function cannot be used on versions of Windows earlier than Windows XP with SP2.

 

What acctually started this wild goose chase what this error that I keep getting when running PHP with IIS..

 

CGI Error

 

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

 

And that is it... I have searched for weeks on end trying to figure out why. I have tried all kinds of solutions and none have worked.

That error usually occurs when php is not configured correctly as a CGI under IIS -

 

CGI users must set the cgi.force_redirect PHP directive to 0 inside

      php.ini.

 

Stop and start the IIS web service to get any change made to php.ini to take effect.

If you're using the MSI file to install php then somewhere near the start of the installation procedure you'll see a couple of options.

fastCGI is one of the options which you don't have. Select either ISAPI or CGI for the installation and it should probably work.

Ok, so to start. I did choose CGI in the start of the install. I know that for sure, not fastCGI.

 

I cant test the phpinfo() because I cant even get past that error. No matter what I put in, it fails and comes with that error. Unless you mean testing it another way?

Umm, I did notice that the "doc_root =" was not set. But reading about that, it sounded like you dont need it UNLESS using something OTHER THEN IIS.

 

; The root of the PHP pages, used only if nonempty.

; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root

; if you are running php as a CGI under any web server (other than IIS)

; see documentation for security issues.  The alternate is to use the

; cgi.force_redirect configuration below

; http://php.net/doc-root

doc_root =

 

Should it be ;doc_root =    ? Since it is not being used? Could that cause a conflict?

I'm working with koo_04 to try and resolve the issue.

 

One thing we tried to diagnose the problem is to run php-cgi.exe in a DOS window. When I do, I get the following dialog window:

 

php-cgi.exe - Entry Point Not Found

The procedure entry point getaddrinfo could not be located in the dynamic link library WS2_32.dll

 

Leading us to this article on MSDN

http://msdn.microsoft.com/en-us/library/ms738520(VS.85).aspx

(the part about using getaddrinfo function on older versions of Windows is near the bottom of the article)

 

Which lead us to believe that the version of PHP we are using is not compatible with our version of WIN2000. We are running on Windows 2000 SP4

 

Hope that helps clarify what is going on

 

P.S. Also just tried setting doc_root and restarting IIS... Same problem with the CGI error

The .msi installer is bad news. However, your current problem is likely because the php.ini that you are changing is not the one that php is using. I would search for all php.ini files and if there is more than one, change the cgi.force_redirect and doc_root settings in all of them (stop and start the IIS service to get any changes made to php.ini to take effect.)

 

I've got to ask, is there a reason you are using IIS (instead of Apache) and is there a reason you are not installing php as a server module (instead of as a CGI application?)

I think koo_04 stated it best, you put a challenge in front of a couple of engineers and they cannot walk away  :P

 

When you say installing php as a server module, do you mean use the ISAPI version instead of the CGI version?

 

Thanks for all your help, much appreciated

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.