Link to home
Start Free TrialLog in
Avatar of emmy21
emmy21

asked on

PHP installation test wont work!

Hi,

I am brand new to PHP and MySQL, and am trying to install both on WinXP where I just installed Apache 1.3.1 I think - and it also has Oracle 9i database running.

Basically, I type in http://localhost into my browser (Mozilla) and it shows the successful installation page for apache. I then installed PHP 5 from the installer, and have edited the config file for apache and the php.ini file which i have copied to windows, windows/system32 etc. PHP is in c:/php. When i installed php it said it hadnt configured apache.

i have changed doc root and extension_dir in php and accordingly in apache conf file. i have also added the AddType application... stuff in Apache. I think I have done it all ok, and then I have the test script saved asa php file in my doc root folder - c:/web:

<html>
<head>
      <title>PHP Test</title>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
      <h1>PHP Test</h1>
      <p>
      <b>An Example of PHP in Action</b><br />
            <?php echo "The Current Date and Time is: <br>";
                  echo date("g:i A l, F j Y.");?>
      </p>

      <h2>PHP Information</h2>
      <p>
            <?php phpinfo(); ?>
      </p>
</body>
</html>

I keep getting the error 404 when I try to test php in the browser by typing http://localhost/test.php

The requested URL /php/php.exe/test.php was not found on this server.

Apache/1.3.31 Server at localhost Port 80

and http://localhost doesnt even work in internet explorer.

any clues as to where I am going wrong - is it anything to do with Oracle and the apache that it has? when i try and stop the oracle apache it has an error in an sqlplus file which wasnt happening before and in fact a couple of errors from oracle have been happening at startup since.

Many thanks for your help ;o)
Avatar of Umesh
Umesh
Flag of India image

Hi,

Did you restart apache server after changing config(httpd.conf) file ? if not restart & check the same once..

are you  running PHP as CGI or apache module?

Check this link..

http://php.us.themoes.org/manual/en/install.windows.apache1.php


Hope this helps!
ASKER CERTIFIED SOLUTION
Avatar of sgalzin
sgalzin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_1239314
Member_2_1239314

Does this work? http://127.0.0.1/test.php
If http://127.0.0.1/test.php works, then check if you have an entry for it in your host file. To find the host file in windows, type:
dir host* /s/p at the dos prompt.
Avatar of emmy21

ASKER

Thanks to everyone for your help, I have come so far from when I first posted this question - which is the silver lining of when new things go wrong.

Basically I thin my initial problem was that I had installed a second Apache where I already had one with Oracle, this annoyed me as I thoght it was a bit silly to install a second copy, so I found some instructions on how to modify Oracle's apache and it all improved from there, I now have MySql up an running - as well as managing to enable oracle and run database queries from my oracle databases with php!

Thanks for your help, sure there will be more questions from me at some point!
Thank to sgalzin for his tutorial

I've fixed some "bugs" and rewritten it here with some GUI improvements

http://fastec.altervista.org/Apache_PHP_MySQL.html
wow !

nice job, corsari : it is so much more readable (thanks to the html). i haven't tested it yet but i'm sure you're right about the bug fixes (my version was *very* minimal).

thanks for the effort, i'll redirect my friends to your page from now on !

stephane.
Thank you stephane (sgalzin)

Yesterday I've completed the http://fastec.altervista.org/Apache_PHP_MySQL.html page with download for the two test files.

"bugs" in your memo where '\' and '/' (mainly). This because httpd.conf uses '/' (slashes *nix style) while php.ini uses '\' (DOS style),
last --> the last Apache release installs as service by default and a nice traybar Apache Monitor with both click and right-click support and several functions ... including RESTART, STOP and START of the service.

Bye

Robert
P.S. .. naturally I've updated all the download links to the last release except for MySQL which is proposed by default to 4.x and optionally to the 5.x