Hi, firstly I am not a programmer and have found all this stuff very daunting. How this all started was that I wanted to have an area on my home website that you can log in and out to a specific folder. I have had a real learning curve when it has come to the installation of PHP, MYSQL, IIS 7, Fast CGI, PEAR, Smarty and phpMyAdmin. Not to mention the configuration of the above software and different versions, it has been a nightmare but real enjoyable when you see your PHPinfo file working.
I have bought quite a few books including “PHP and MySQL Web Development (4th Edition) (Developers Library) by Laura Thomson” which is really good.
The book has exactly what I want with regards to a login (authorisation) scripts but it uses apache .htaccess files and I am assuming as I use IIS 7 (Vista Ultimate) this is the reason it will not work. I really don’t want to start trying to install another program.
Every book I have bough seems to use Apache but as my website is hosted by Godady.com and I opted for the windows option as I know windows.

Is there a way to have a login authentication process through via IIS 7?

    v2jtb wrote:

    Every book I have bough seems to use Apache but as my website is hosted by Godady.com and I opted for the windows option as I know windows.

    If you only ever stick to things you know, how will you ever learn something new and/or expand your knowledge in general?

    Without starting a heated debate, the reason you'll see a lot of books/tutorials referencing Apache (most likely on some flavor of Unix O/S) is simply because it's the best. :p Hate to say it, but going with Windows for any type of hosting service at all has never been attractive to me.

    Unless things have changed, there's no real equivalent to Apache's .htaccess file on IIS7. What you're after is "Directory Security" (I believe that's what it's called) that you would setup in IIS' GUI. Not sure how you could do this simply based on configuration files such as .htaccess with Apache.

    Honestly, I would highly recommend you try to get your hosting moved over to Apache. Apache runs just fine on Windows, so you don't have to get a Unix host if you really don't want to.

      You can run Apache on windows, this will mean your books are of use, and there's a lot more resources available to you.

        Thank you so much for you help. I have really struggled now for weeks with the installation of all the packages I really don't want to try learning a new package. I am dyslexic and it takes me ages to get things configured. I have had to rebuild my PC about 10 times, but I have the installs all figured out. The thing I will say is that all the books are very poor when it comes to the installing of the packages, but that might be to do with Windows.

          wamp takes about 5 minutes to install, but it's your call.

            Hi Dragon thank you for your reply.
            I only found out about WAMP very late in my install process but it still uses Apache. I contacted Godaddy regarding the ability to install Apache on windows and the cost is too high and I would need to support it as well, so not really an option. Back to my original question can I have a login via IIS 7?

              godaddy provide linux accounts and windows ones, 99% of the the world use php on linux at least on the host level.

              Theres no requirment that if you use windows at home (me to) to then use windows on your web host (never have, never would).

              As to using IIS, I have never done that, so can be of no use -best of luck.

                Hi Dagon and I hope I got it correct this time sorry. You have made a very interesting point. I am very reluctant to use Linux because I dont know how it works or what the file structure looks like. I assume by what you are saying I could add Apache to my server and just upload to a Linux go-daddy account. Is their anything else I would need?

                  No. All you'd need to do is either install apache yourself, or get WAMP which will deal with installing php, apache and mysql for you.

                  Perhaps the WAMP install process will let you specify an existing PHP installation though. I don't remember. Else, you'd have to start over, meaning you'd have to reinstall PEAR & SMARTY after that. But the WAMP install really takes no time at all.

                  Also, you may have to uninstall IIS 7 first, or at least disable it (edit the service to not start automatically). Else you'd have to run Apache on another port than 80, which means you'd have to specify the port in your urls. e.g. http://localhost:8080 for port 8080

                    I am just coming into this, however with your GoDaddy account, is it a straight Windows Shared Hosting plan? Or is it a Virtual Host?

                    If it is a shared hosting plan, you won't be able to install Apache, or WAMP, if I am not mistaken.

                    If you have administrative privileges and/or its dedicated / virtual dedicated, you can install it.

                    If this is the case, the easiest method would be to disable the IIS Web Service, this can usually be done by the IIS Snap-In from the administrative Tools.

                    You would have to disable the default website, you can at that point, install Apache, MySQL, and I would also recommend an FTP server as well

                    Under your control panel you will see Administrative Tools,

                    You should see Internet Information Services (IIS) Manager, or something similar (I only have a Win2k3 server here to compare)

                    Once you are in there, you can expand the tree, you should see ???? (local computer), expand, and at least in W2k3, it has "Web Sites" as a folder, expand that.

                    From there you can right-click any site and click "Stop". This will allow you to build & test your apache configuration before permanently disabling IIS.

                    If you are satisfied with your apache setup, but still don't want to completely uninstall IIS, you can go into your services (Start, Run, then type: 'services.msc') Or Via your Control Panel.

                    Look for "World Wide Web Publishing Service", right click -> properties (or double click that service).

                    Set Startup Type to Manual or Disabled, then ensure you have Service Status as Stopped.

                    As goes for the installation of Apache, PHP, MySQL, phpMyAdmin, etc google can point you to TONS of tutorials to help you along.

                    Also noteworthy:

                    If you have a control pane with this (virtual) dedicated hosting, it may no longer work for many services or break all together if you change the configuration that it knows, in fact if its running off of IIS (as it most likely is) it won't work at all.

                    The best solution: Disable Directory Browsing (should be by default) and put a blank/empty index.asp / index.php / index.htm / index.html in that folder.

                    And for Login & Password type security, look at PHP MySQL Login System in google.

                    If you are on shared hosting, the above just won't work, and you will have to look through your control panel to see if they offer directory security, or do a script based login system (doesnt protect directories, however).

                      Hi All,
                      Thank you for your help on this and please let me explain my setup.
                      I have just a PC at home with windows Ultimate that I have installed IIS 7, MySQL, PHP 5.3, PHPMyAdmin, Smarty and Pear. I have a shared windows account the deluxe option. If I change my account to a Linux account I am not sure how the use Linux. Would there be a big difference and would there be a change in the actual programming?
                      I am just trying to learn web stuff went to download Apache but not sure what to download?
                      If I go the Apache route it will be another package I will need to learn.......oh man?

                        v2jtb,

                        Sorry for my delays in responding.

                        I would get XAMPP , it is an all-in-one package with Apache, PHP, MySQL, and some nice extras that you may not need right away, but you will glad you have them with some scripts.

                        I would remove IIS if it is installed, this greatly simplifies the process, XAMPP comes with an installer that works like just about any other Windows Program. It comes with 2 options, 1 is to install as a service, so that its always there, or to just use the control panel to start/stop the services you want.

                        Either way is fine really, if you have a powerful computer the services will be fine - but if you plan to use it for extreme gaming, or any other items which demand full computer resources, you may want to explore option 2.

                        Don't worry, the installer will ask you which way you want to do it.

                        All you have to do is remove IIS, as mentioned above, goto your services (start, run, services.msc) and find the World Wide Web Publishing Service, right click it, goto Properties, and select disabled.

                        Unless you have been using it, I believe these services are disabled by default.

                        Goto XAMPP's webpage, read the docs first, and if you have any questions feel free to come back & ask, however it is pretty straight forward.

                        Linux & Windows don't vary much by way of PHP programming, there are only finite differences you will have to watch out for, such as exec() (Executes a shell command) etc, that will be operating system dependent.

                        Also some PECL Extension's don't work on Windows, but with shared hosting it is likely that you won't be able to use them anyway.

                        Best of luck

                          Hi big.nerd,

                          I took your advice and flattened my PC rebuilt it with Vista Ultimate and all the service patches. I installed XAMPP twice now (I used the ZIP download). Everything works ish.... I have extracted the Zip file to a folder called web and it extracted everything. My Localhost is now Web/xampp/something I can’t remember which is a pain. However as I don’t know how apache works I uploaded a simple script to the Localhost/test folder and I get a 403 error I assume it is to do with permissions but I am not sure what permissions should be granted and to what folders?
                          Can you help?

                          However the XAMPP is very easy to install.

                            Write a Reply...