[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


PHP installation test wont work!

Posted on 2004-08-24
Medium Priority
Last Modified: 2013-12-13

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:

      <title>PHP Test</title>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
      <h1>PHP Test</h1>
      <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.");?>

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

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)
Question by:emmy21
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
LVL 26

Expert Comment

ID: 11894505

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..


Hope this helps!

Accepted Solution

sgalzin earned 1500 total points
ID: 11914780

Just in case you want to do a clean install from scratch, here are some notes I've written out for myself (please note it's what I consider a minimum effort's installation, i.e. not any optimizations / security concerns). Good luck !


download Apache2 : http://mir2.ovh.net/ftp.apache.org/dist/httpd/binaries/win32/apache_2.0.50-win32-x86-no_ssl.exe
download PHP5 : http://fr.php.net/distributions/php-5.0.1-Win32.zip
download PhpMyAdmin : http://ovh.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.6.0-rc1.zip
download MySQL : http://mir2.ovh.net/ftp.mysql.com/Downloads/MySQL-4.0/mysql-4.0.20d-win.zip

*** APACHE ***
- Install Apache to "<diskDriveLetter>:\<applicationFoler>" using the file apache_2.0.50-win32-x86-no_ssl.exe
  - DomainName =  <default>
  - ServerName =  localhost
  - ServerAdmin = webmaster@yourdomain.com
  - ServerPort =  80
- Edit the Apache configuration file "<diskDriveLetter>:\<applicationFoler>\Apache Group\Apache2\conf\httpd.conf" :
  - make sure the value of the port for the "Listen" setting is 80 (and not 8080) :
      Listen 80
  - make sure the value of the port for the "ServerName" setting is 80 (and not 8080) :
      ServerName localhost:80
  - replace the value of the "DocumentRoot" setting to :
      DocumentRoot "<diskDriveLetter>:/<folderOfYourChoice>/<subFolderOfYourChoice>/www"
- Test installation :
  - put the attached file index.html in folder <diskDriveLetter>:\<folderOfYourChoice>\<subFolderOfYourChoice>\www\
      copy index.html "<diskDriveLetter>:\<folderOfYourChoice>\<subFolderOfYourChoice>\www\index.html"
  - start Apache in console (using the shortcut provided in "Control Apache Server")
  - start your favorite Internet browser and go to :
      the page should say "Available projects on (static) :"
  - kill the Apache console by pressing <Ctrl + c>

*** PHP ***
- Extract php-5.0.1-Win32.zip to "<diskDriveLetter>:\<applicationFoler>\php"
- Create a standard PHP configuration file "<diskDriveLetter>:\<applicationFoler>\php\php.ini" :
      copy "<diskDriveLetter>:\<applicationFoler>\php\php.ini-recommended" "<diskDriveLetter>:\<applicationFoler>\php\php.ini"
- Edit the Apache configuration file "<diskDriveLetter>:\<applicationFoler>\Apache Group\Apache2\conf\httpd.conf" :
  - add the follinwg line after the last LoadModule statement :
      LoadModule php5_module "<diskDriveLetter>:/<applicationFoler>/php/php5apache2.dll"
  - add the two follinwg lines after the last AddType statement :
      AddType application/x-httpd-php .php
      PHPIniDir "<diskDriveLetter>:/<applicationFoler>/php"
  - add the value "index.php" to the beginning of the DirectoryIndex list so that the list becomes :
      DirectoryIndex index.php index.html index.html.var
- Test installation :
  - put the attached file index.php in folder <diskDriveLetter>:\<folderOfYourChoice>\<subFolderOfYourChoice>\www\
      copy index.php "<diskDriveLetter>:\<folderOfYourChoice>\<subFolderOfYourChoice>\www\index.php"
  - start Apache in console
  - start your favorite Internet browser and go to :
      the page should say "Available projects on (dynamic) :"
  - kill the Apache console by pressing <Ctrl + c>

*** MYSQL ***
- Extract phpMyAdmin-2.6.0-rc1.zip to "<diskDriveLetter>:\<folderOfYourChoice>\<subFolderOfYourChoice>\www"
- Launch the setup.exe program in mysql-4.0.20d-win.zip and start a typical installation in folder :
- Copy the libmysql.dll library provided by PHP to your Windows system folder :
      copy "<diskDriveLetter>:\<applicationFoler>\php\libmysql.dll" "c:\winnt\system32\libmysql.dll"
- Edit the PHP configuration file "<diskDriveLetter>:\<applicationFoler>\php\php.ini" :
  - change the extension directory :
      extension_dir = "./" to "<diskDriveLetter>:/<applicationFoler>/php/ext/"
  - activate mysql by uncommenting
- Test installation :
  - execute in a command prompt :
      "<diskDriveLetter>:\<applicationFoler>\mysql\bin\mysqld" --console
  - start Apache in console
  - start your favorite Internet browser and go to and follow the phpMyAdmin-2.6.0-rc1 hyperlink
  - in the MySQL command prompt, kill MySQL by pressing <Ctrl + c>
  - kill the Apache console by pressing <Ctrl + c>

<center><h3>Available projects on (static) :</h3></center><br><br>

<center><h3>Available projects on (dynamic) :</h3></center><br><br>
$currentDirectory = dir ( "." );
while ( false !== ( $entry = $currentDirectory->read () ) ) if ( is_dir ( $entry ) && ( $entry != "." ) && ( $entry != ".." ) ) echo "<a href=\"" . $entry . "/\"> " . $entry . "</a><br />\n";

Expert Comment

ID: 11915667
Does this work?

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.


Expert Comment

ID: 11915676
If 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.

Author Comment

ID: 11923059
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!

Expert Comment

ID: 12151616
Thank to sgalzin for his tutorial

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


Expert Comment

ID: 12158439
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 !


Expert Comment

ID: 12165097
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.



Expert Comment

ID: 12165117
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

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question