Page 1 of 1

Win2K Installation Problems - Please Help

Posted: Sun Aug 18, 2002 11:09 am
by HUWUWA
OK guys, I'm sorry for making a new thread but here is exactly what I did and it still doesn't work.

1) Fresh Win2K Pro installation including IIS

2) Unzipped php-4.2.2-Win32.zip which made a folder called php-4.2.2-Win32

3) Copied the folder to C: and renamed it Php so now I have C:\Php

4) Copied php4ts.dll to C:\winnt\system32

5) Copied all the files in C:\Php\dlls to C:\winnt\system32

6) Copied php4isapi.dll to C:\winnt\system32

7) Copied php.ini-recommended to C:\winnt and renamed it to php.ini

8) In the php.ini file I did: extension_dir = "c:/Php/extensions"
8a) I tried back slashes also: extension_dir = "c:\Php\extensions"

9) In the php.ini file I also did: doc_root = "c:/Inetpub/wwwroot"
9a) I tried back slashes also

10) I restarted my computer

11) I made the simple Hello World php file in C:\Inetpub\wwwroot\TestSite

12) Using my browser (IE 5.5) I went to: http://localhost/TestSite/test.php

13) I get a blank page with no Hello World

WTF am I doing wrong ? This is driving me crazy. Please help.

Please note that I also made a test.asp page in C:\Inetpub\wwwroot\TestSite and it loads fine so I know my IIS is working.

Come on guys, I really need some help here.

Posted: Sun Aug 18, 2002 11:45 am
by twigletmac
IIS is setup to parse .php files using the PHP scripting engine isn't it?

Mac

Posted: Sun Aug 18, 2002 11:45 am
by volka
instead of opening a new thread you should have read the answers to the old - sorry, no offense.
from install.txt in the .zip-distribution, section
"Windows NT/2000/XP and IIS 4 or newer and PWS 4 on NT Workstation or W2K non server editions"
Windows NT/2000/XP and IIS 4 or newer and PWS 4 on NT Workstation or W2K non server editions

To install PHP on an NT/2000/XP Server running IIS 4 or newer,
follow these instructions. You have two options to set up
PHP, using the CGI binary (php.exe) or with the ISAPI module.

In either case, you need to start the Microsoft Management
Console (may appear as 'Internet Services Manager', either
in your Windows NT 4.0 Option Pack branch or the Control
Panel=>Administrative Tools under Windows 2000). Then
right click on your Web server node (this will most probably
appear as 'Default Web Server'), and select 'Properties'.

If you want to use the CGI binary, do the following:
Under 'Home Directory', 'Virtual Directory', or
'Directory', click on the 'Configuration' button,
and then enter the App Mappings tab.

Click Add, and in the Executable box, type:
c:\php\sapi\php.exe (assuming that you have unzipped PHP in c:\php\).

Please note that you cannot use php-cli.exe with your webserver, you need
to use php.exe which can be found in the sapi directory of your PHP
distribution.

In the Extension box, type the file name extension you want
associated with PHP scripts. Leave 'Method exclusions'
blank, and check the Script engine checkbox. You may also
like to check the 'check that file exists' box - for a small
performance penalty, IIS (or PWS) will check that the script
file exists and sort out authentication before firing up php.
This means that you will get sensible 404 style error messages
instead of cgi errors complaing that php did not output any data.

You must repeat from 'Click Add...' for each extension you
want associated with PHP scripts.
(.php is recommended. although .phtml and .php3 may be
required for legacy applications.)

Set up the appropriate security. (This is done in Internet
Service Manager), and if your NT Server uses NTFS file system,
add execute rights for I_USR_ to the directory that contains
php.exe

To use the ISAPI module, do the following:

If you don't want to perform HTTP Authentication using PHP,
you can (and should) skip this step. Under ISAPI Filters,
add a new ISAPI filter. Use PHP as the filter name, and
supply a path to the php4isapi.dll.

Under 'Home Directory', click on the 'Configuration' button.
Add a new entry to the Application Mappings. Use the path
to the php4isapi.dll as the Executable, supply .php as the
extension, leave Method exclusions blank, and check the
Script engine checkbox.

Stop IIS completely (net stop iisadmin)
Start IIS again (net start w3svc)

Posted: Sun Aug 18, 2002 11:48 am
by twigletmac
You really should go through the installation instructions step by step even if you've done it before because it is easy to miss things.

It's also best to keep everything in one thread because then all the answers are in one place and it's easier to see what's already been suggested and tried. If you want to bump your thread by all means do so but don't start a new one on the same topic.

Mac

Posted: Sun Aug 18, 2002 12:59 pm
by HUWUWA
Hi guys, I'm sorry for the double post, I won't do it again.

It says: "Click Add, and in the Executable box, type:
c:\php\sapi\php.exe (assuming that you have unzipped PHP in c:\php\)."

Umm, there is no php.exe file in the sapi folder. There is one in the main php directory though, should I just point it to that or move the file to the php\sapi folder ?

I'll read the instal.txt file all the way through this time, I admit I stopped after the first part, oops :oops:

I'm gonna work on it now, I'll let you know how I make out. Thanks for the help.

It Works !

Posted: Sun Aug 18, 2002 1:41 pm
by HUWUWA
I got it to work !

Thanks for putting up with me in the last two days.

Well, time to start programming.

Happy PHP Programming Guys !

Your Pal,
HUWUWA