Hi
I've just setup php 4.42 using the windows installer version to interface with iis 5.1

what I'm trying to do is check that php is talking to iis correctly.

so I'm doin the phpinfo where you save a line of code in a txt file as a php file.

but when I save the file, the extention looks like this:-
test.php.txt

so when I do http://localhost/test.php I just get the page cannot be found.

Can anyone help!!

Kind Regards

Mark

    Devinemke is absolutely correct. Notepad defaults to saving files with an additional .txt at the end unless you change the 'save as type' option right below file name from text to all files.

    HTH - Blu

      bah... when using notepad just do this in the filename textbox:

      "filename.ext"

      using quotes will force the extension you specify... having to change to "all files" is just an uneccessary step 🙂

        and for the heck of it, ill just ask... why use IIS? apache isnt hard to use at all, is more secure and, since your using PHP, theres no reason to use a webserver whose only "use" is for serving ASP (which is a horrible language)

          scrupul0us wrote:

          bah... when using notepad just do this in the filename textbox:

          "filename.ext"

          using quotes will force the extension you specify... having to change to "all files" is just an uneccessary step 🙂

          Thanks scrupul0us - I never knew that. You learn something everyday 🙂

          Blu

            i actually learned that little trick last year... not that I use notepad often (ultraedit32 is so much better), but yea, its neat 🙂

              Thanks for all your comments guys
              I'm just havin a problem, I've changed the txt file test to test.php and it's now sohwing up as a php file.

              but when I goto: http://localhost/test.php, i just get get: <?php phpinfo();?> in my browser window instead of the php info page.

              More help appreciated please.

              Kind Regs

              Mark

                cant help you there... i only know apache... but sounds like the phpmodule isnt loaded... have you googled for PHP setup with IIS? did u read any documentation?

                  Yeah
                  I've read some documentation, and made sure index.php is in the documents section in iis. but I still keep gettin he actual phpinfo code showin in the browser rather than the page that tells me about my version of php

                  any takers?
                  Thanks
                  Mark

                    Well, did you install the ISAPI filter into IIS and allow PHP in the Web Service Extensions?

                    If not, here's a quick how-to for IIS 6.0:

                    1. Right-click on Web Service Extensions and choose "Add a new Web service extension"
                         a. For extension name, use something creative such as... PHP
                         b. Click on the add button and add the 'php4isapi.dll' file (\php\sapi\php4isapi.dll)
                         c. Check the "set extension status to Allowed" checkbox
                         d. Press OK
                    2. Under Web Sites, right click on the website you wish to configure PHP for and choose Properties
                         a. On the Home Directory tab, ensure Execute permissions is set to "Scripts only"
                         b. Click on the configuration button
                         c. Click Add.
                              i. The executable path is the same path to the php4isapi.dll file you found in step 1b
                              ii. For extension, type .php
                              iii. Make sure verbs is set to "All verbs"
                              iv. Make sure both checkboxes at the bottom are checked & press OK.
                         d. Press OK again on the configuration dialog.
                    3. Make sure "IUSR_*" has Execute permissions on the PHP installation directory (replace the * in IUSR_* with the server's name)
                    4. Make sure you've configured PHP properly (php.ini)
                    5. Restart IIS. To do this, simply...
                         a. Open a command prompt (start -> run -> cmd)
                         b. Type [b]net stop iisadmin /y[/b]
                         c. Type [b]net start w3svc[/b]

                      I used the installer version shouldn't that have done it

                        I posted a how-to above, try doing that and see if it works.

                        EDIT: By the way, I definitely second the suggestion to use Apache instead of IIS.

                          I haven't got the isapi version, I've the windows installer version, which is all done automatically, the reason why i don't want to use apache is becuase, all our networks and servers at work are on windows.

                          so it's much easier for me to implement, thanks for the sugestion though

                            I use Apache on my home computer (Windows XP) and on my school's network (Windows 2k3 Server). (Okay, so we also have Tomcat4 and IIS servers running PHP, but that's besides the point :p)

                            At any rate, the only way I've ever tried to install PHP and integrate it with IIS is using the ISAPI filter. Sorry.

                              Thanks for the info

                              Ok I'm gonna try apache, can you use the installer version with apache?

                                Really, the installer version should work correctly if you follow the instructions. Myself, I've never used the installer versions, so I can't offer much help. It's really not too complicated to install PHP manually by configuring your webserver in a few places.

                                  Ok I'm gonna give it a go with installer and let you know, aswell I'm installin mysql aswell.

                                  thanks for your help and sguestions

                                  Mark

                                    which version of php should i download for apache2?

                                      HypUK,

                                      Yes, it would be nice if installers worked, but hey this is the real world .......

                                      What Windows platform are you installing on to. Win2K and IIS5 is what I use on one of my development machines (along with MS SQL 2000). The best way to install this is to download the PHP Zip file, unzip it into the php5.1.blah.blah default directory, rename that directory to PHP5 and then follow the configuration directions here.

                                      http://uk2.php.net/manual/en/install.windows.iis.php

                                      Be careful to follow the instructions for both the right version of PHP and IIS, PHP 5 is different to PHP 4 and IIS 6 is different to IIS 5.

                                      Downloading the Zip is also a better way to go if you later want to enable support for things like MS SQL and some of the XML stuff which you may likely need if you are working within a Windows environment.

                                      HTH - Blu

                                        Write a Reply...