SitePoint Sponsor |
|
User Tag List
Results 1 to 12 of 12
Thread: php4 problems with win2k IIS
-
Jan 5, 2001, 11:11 #1
- Join Date
- May 2000
- Location
- Salt Lake City, UT
- Posts
- 108
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I am trying to get PHP4 to work on my windows 2k desktop. I have installed the IIS package that comes with my computer. As far as I know it's IIS4. I've been having problems getting PHP to run. I've tried configuring it to work with isapi and CGI. I've read several tutorals but they all say the same thing and I've tried everything they have sudgested (going into my Internet Manager, clicking the properties of the default web site and changing the config properties.)
I am an experienced javascript programmer, but I'm new to PHP and server side scripting. I am trying to get the guestbook found at http://www.bratta.com to work so I can put it up on our company intranet as a postit board.
If you need more information on what I've tried and what I have on the computer just put it in your posts and I'll let you know.
JoeJoe Eliason
Just a dog learnin' PHP from cat.
-
Jan 5, 2001, 11:37 #2
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
And you copied the required dlls to the system32 folder? What errors are you getting?
Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Jan 5, 2001, 11:59 #3
- Join Date
- May 2000
- Location
- Salt Lake City, UT
- Posts
- 108
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm not really getting an error. It's not doing anything. It acts as if php doesn't exist on my machine. When I click on a test .php file, it just shows the source code in the browser instead of what it's programmed to do.
I haven't copied any dlls to my system dir. These are the instructions I have followed. These are from the php program itself. I first tried the CGI install, then the isapi. Like I said, my computer acts as though it doesn't recognize php at all.
IIS 4.0+ (isapi):
1. Copy the php.ini-dist to your systemroot (the directory where you installed windows), rename it to php.ini, and
edit it to fit your needs
2. Start the Microsoft Management Console or the Internet Services Manager, located in your Control Panel
3. Click on your webserver, and select properties
4. 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
5. Under Home Directory, click on the Configuration button. Add a new entry to the Application Mappings. Use the path the
php4isapi.dll as the Executable, supply .php as the extension, leave Method exclusions, blank, and check the Script engine
checkbox
6. Stop IIS completely
7. Start IIS again
IIS 4.0+ (CGI)
1. Copy the php.ini-dist to your systemroot (the directory where you installed windows), rename it to php.ini, and
edit it to fit your needs
2. 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).
3. Right click on your Web server node (will most probably appear as 'Default Web Server'), and select 'Properties'.
4. Under 'Home Directory', click on the 'Configuration' button. Add a new
5. entry to the Application Mappings; Use the path to php.exe as the Executable, supply .php as the extension, leave
'Method exclusions', blank, and check the Script engine checkbox.
6. Put a .php file under your Web server's document root and check if it works!Joe Eliason
Just a dog learnin' PHP from cat.
-
Jan 5, 2001, 12:06 #4
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
A little higher up in that readme file is this line:
dlls:
Here are some DLLs required for PHP and some extensions. please copy them to your to your windows/system (Win9.x) or winnt/system32 (WinNT, Win2000) directory.
If you already have these DLLs installed on your system, overwrite them only if something is not working correctly. Before overwriting them, it is a good idea to back them or move them to another folder - just in case something goes wrong.
The ones you need to be concerned with
php/dlls/msvcrt.dll -> WINNT/system32
php/php4ts.dll -> WINNT/system32Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Jan 5, 2001, 15:01 #5
- Join Date
- May 2000
- Location
- Salt Lake City, UT
- Posts
- 108
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The ones you need to be concerned with
php/dlls/msvcrt.dll -> WINNT/system32
php/php4ts.dll -> WINNT/system32 [/B]
In the Internet Information Services directory in the control pannel, I have listed:
1. my computer name (jeliason)
2. 3 subdirectories
a. default ftp site
b. default web site
c. default SMTP virtural server
I go to the properties in "default web site" and in the in the "Home Directory" tab, I go to "configuration" tab and assign .php .phtml & .php3 to the following path "C:\PHP\php.exe %s %s". "Cash ISAPI" is checked.
I have ran the auto installer twice from the light CGI download and have tried manually configuring my system to the CGI ISAPI download for windows. The system acts like php just doesn't exist. I get no errors or anything. The system says I have IIS 5.0 installed. Any information as to what I don't have installed or configured correctly??
I really appreciate all the help I've gotten so far. I'm just new to PHP so I'm a little dumb on the subject. I don't know what I don't know.Joe Eliason
Just a dog learnin' PHP from cat.
-
Jan 5, 2001, 15:20 #6
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Okay so have you tried mapping the the extensions .php .php3 .phtml to the php4ISAPI.dll in the php/sapi/ folder? Also have you really stopped and started IIS I mean by either going into services in the admin tools folder or by typing the following at the command prompt
>net stop IISADMIN
>net start w3svc
One last thing, I know this may seem silly and don't take offense but you are sure you are putting the php file in your web root?Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Jan 5, 2001, 15:47 #7
- Join Date
- May 2000
- Location
- Salt Lake City, UT
- Posts
- 108
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Okay so have you tried mapping the the extensions .php .php3 .phtml to the php4ISAPI.dll in the php/sapi/ folder?
Also have you really stopped and started IIS I mean by either going into services in the admin tools folder or by typing the following at the command prompt
>net stop IISADMIN
>net start w3svc
One last thing, I know this may seem silly and don't take offense but you are sure you are putting the php file in your web root?
Do any of these need to be changed, or what exactly do you mean by 'am I putting the php file in your web root?Joe Eliason
Just a dog learnin' PHP from cat.
-
Jan 5, 2001, 16:16 #8
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
so then the php file is in the c:\Inetpub\wwwroot folder and you are accessing it by typing http://localhost/yourphppage.php
?Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Jan 5, 2001, 16:49 #9
- Join Date
- May 2000
- Location
- Salt Lake City, UT
- Posts
- 108
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
OK...This is the piece of the puzzle I did not know and understand. The only way you can access your php files are through the HTTP protocal in your browser?? I was under the understanding that once php was installed on your machine you could access the .php file and it would run the php protocall just by opening up the file. I wasn't using http://jeliason/test.php in the browser. I was just accessing it form the C drive. I finally tried it from jeliason/test.php and it works fine.
Go figure....
Is this the way it always has to be accessed, or can you configure it so I can just call the file from the hard drive and have it access the php protocal?? Since I do developing, it would be easier if I could just call the file and preview it instead of typing in the actual web address for the file.
In all my documentation I have, this is the first place I've heard where you need to call it from HTTP. Maybe it's common logic and I'm just stupid.Joe Eliason
Just a dog learnin' PHP from cat.
-
Jan 5, 2001, 16:57 #10
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Well for the most its a web scripting language and thus needs to be parsed by a web server somehow that is why you need to access throught HTTP but I know you can get binary versions like the php.exe you laready have just not sure how to call a file trhough it like that.
Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Jan 5, 2001, 17:22 #11
- Join Date
- May 2000
- Location
- Salt Lake City, UT
- Posts
- 108
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thank you very much for filling in the gaps for me. Everything is working fine now, both in CGI and ISAPI mode. I'll try and see if there is a way of running php without having to run it through the server. But for now everything works.
Thanks againJoe Eliason
Just a dog learnin' PHP from cat.
-
Jan 5, 2001, 19:15 #12
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Joe
here is the answer to your question
put the path to where you installed php into your system path then from the command prompt
c:\>php -e phpfile.phpPlease don't PM me with questions.
Use the forums, that is what they are here for.
Bookmarks