SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Zealot HotDog's Avatar
    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.

    Joe
    Joe Eliason
    Just a dog learnin' PHP from cat.

  2. #2
    Dumb PHP codin' cat
    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.

  3. #3
    SitePoint Zealot HotDog's Avatar
    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.

  4. #4
    Dumb PHP codin' cat
    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/system32
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  5. #5
    SitePoint Zealot HotDog's Avatar
    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]
    The msvcrt.dll exists and won't let me over write it (used by windows), but I did copy the php4ts.dll into my WINNT/system32 directory. I then restarted IIS. Still nothing.

    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.

  6. #6
    Dumb PHP codin' cat
    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.

  7. #7
    SitePoint Zealot HotDog's Avatar
    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?
    Yes I have tried that. I currently have it set to the php.exe for CGI mode right now


    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
    I'm sure I've stopped it. If you right click on your computer in the IIS page you can stop, start, restart, or reboot the server. But just to be sure I also did it from a command prompt. Still nothing.

    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?
    Trust me, when you don't know what you are doing and are getting free help from someone, how can I be offended!!! In the Home Directory of the website properties I have the local path set to the default C:\Inetpub\wwwroot with Read, Write, Log visits and Index this Resource checked. There is no Application Name, the Execute Permissions is 'script only' and Application Protection is 'Medium'. In the Web Site tab I don't have an IP assigned. It just says 'all unassigned'. I have not worked in any other tabs in the properties screen.

    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.

  8. #8
    Dumb PHP codin' cat
    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.

  9. #9
    SitePoint Zealot HotDog's Avatar
    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.

  10. #10
    Dumb PHP codin' cat
    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.

  11. #11
    SitePoint Zealot HotDog's Avatar
    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 again
    Joe Eliason
    Just a dog learnin' PHP from cat.

  12. #12
    Dumb PHP codin' cat
    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.php
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •