I need a bit of guidance with installing PHP4 and Apache2 on Windows ME - quite new to this... I've got Apache to run no probs but as soon as I point the browser to my 'index.php' file it prompts me to download - the file is in the 'Apache2/htdocs' folder, I have modified the config file as instructed, can anyone help?

    What lines did you add to your httpd.conf?

      Thanks for replying.
      I edited UserDir to read "C:/My Documents/My Website" (assuming I would be able to run scripts from this folder which doesn't work either!), also extension_dir to "c:\php\extensions"; LoadModule php4_module "c:\php\sapi\php4apache2.dll"; AddType application/x-httpd-php .php; Listen 8080; ServerName localhost:8080; DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"

      Does this help??

        Was really only concerned about the php stuff added to the conf file. Looks like you got some of it, but not all. Here's the complete additions you should make

        ScriptAlias /php/ "C:\PHP\"
        Action application/x-httpd-php "C:\PHP\php.exe"
        LoadModule php4_module C:\PHP\sapi\php4apache.dll
        AddType application/x-httpd-php .php .phtml

          shryku, it's puzzling to me that you would tell them to add BOTH..... you either use Action for the CGI or LoadModule for the module, not both.... personally i'd go with the module, but w/e....

          and userdir is not the documentroot. that's what DocumentRoot is for. UserDir is for what happens when the server gets a /~[username] request. set your DocumentRoot to my documents\my webiste andit'll work.

            Adding both allows you the freedom to use both :p

            This is just how I set my Windows servers up, and I've yet to run into trouble getting them to work, regarless of Windows type. Anyway, any advice Igive should always be taken as that, advice

              Well.... I tried adding the ScriptAlias and Action lines.... same result. I also tried changing the DocumentRoot to My Documents/My Website (so both DocumentRoot and UserDir were the same).... did work. So I guess both of you were wrong!!

                Sorry, should have read did NOT work on that second try!!

                  Originally posted by yvonne_r19
                  So I guess both of you were wrong!!

                  so i guess you don't want our help then? perhaps if you hadn't just been so rude we might've given you more ideas.

                    Many apologies, I really didn't mean to sound rude or ungrateful. Of course I still need your help....

                      I really do feel bad about causing offence, perhaps because I'm relatively inexperienced at posting it seemed like I was being rude but I really do appreciate having the opinion of some experts even if it didn't quite solve things, so thanks.

                        a month later

                        Telling someone they were wrong, is not a very good way of saying it didn't work.

                        Anyways, check the paths to PHP if yours is different then C:\PHP\ then you'll have to change it to the correct path, also if you said that you were ussing Apache2 then the correct dll would be php4apache2.dll

                          Thanks very much for the reply. I never did get Apache2 to work properly so in the end I installed an earlier version which works fine. 🙂

                            Write a Reply...