Hi

I have installed apache 2.0.52, mysql and php5 onto my local machine running xp.

The software came with a starter guide. The instructions for installing are very simple to follow. I have moved dll file to the correct location etc.

I have added the addmodule line and addtype application line to the httpd.conf file.

I then created a php file with the <?php phpinfo(); ?>

and typed http://localhost/phpinfo.php into the browser but the file was not found.

If I type http://localhost/ , then the apache default page shows but not the phpo file.

Can anyone help?

I seem to recall rerading something about someone having problems with includes and the answer was to change the paths.

I am totally new to all this so this didnt help me too much.

Any help is appreciated.

    Two thing first.
    1. Did you put the phpinfo.php file in the same directory as the Apache default page is which should be the htdocs folder.
    2. Are you using short tags in your php.ini file if not your file should be written <?php phpinfo(); ?> not <? phpinfo() ?>

      yes it is in the htdocs folder and yes it is written <?php....

      what else needs checking?

        Does your httpd.conf of Apache know how to handle php files, e.g.

        ScriptAlias /php/ "C:/php/"
        Action application/x-httpd-php /php/php.exe
        AddType application/x-httpd-php .php

          I searched for the first few characters of each of the lines you listed. Below is all that was returned:

          ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"

          addType application/x-httpd-php .php

            Then add the
            Action application/x-httpd-php /php/php.exe
            ScriptAlias /php/ "C:/php/"
            That will tell Apache where the php.exe is (change the script alias to where your php.exe file actually is)

              does it matter where these lines are added. should they be together or listed separately

                I would put them where like info is but without them Apache does not know how to handle php or what extensions to use with it.

                  I have amended the conf.httpd file to "/php5/php.exe" as the name of the directory is php5.

                  I notice that there is an application file in that folder the details say its a cli file (will this have a .exe extionsion?)

                  I have tried again with http://localhost/phpinfo.php in the browser and its still 404 not found. It is definately in the corre4ct place as other files in the directory show.

                  Any other ideas why this may not be working?

                    Let's just start anew. You have a windows box right? It has the following Apache 2.0.52, PHP 5.x and MySQL? and it is not properly working. Then my suggestion is to get XAMPP which has all the latest of all and also the latest stable PHP 4 and PHP 5.1.1 the latest MySQL phpMyAdmin, Perl, sqlite, Webalyzer, Filezilla FTP server, Mercury mailserver and more although that is the full package you can get a trimmed down version, but after download the install takes a total of about 5 minutes and 7 minutes later you will be executing PHP and or MySQL with a great server.

                    Do your self a really big favor and just download this easy to use system then you can do what you want which is develop PHP and MySQL on your local PC the link is XAMPP home page I have been using it since at least 2003 and when a major upgrade come up I just uninstall and upgrade to the new one that I am using now. No more headaches, wondering why your install is failing just coding and actually getting somewhere.

                      Write a Reply...