Installed WAMP - how to run a PHPpage?

Installed WAMP, but not sure where to go from here.

I just want to get to the point where I can run a simple PHP page.

Thank you!

Tom
LVL 5
Tom KnowltonWeb developerAsked:
Who is Participating?
 
koudryCommented:
Hello,

I have yet to use Windows 7, so my suggestion is purely around PHP.

I would like to assume you have Apache since you have a WAMP setup. Do you also have PHP path in your windows path?

Apache does not know about PHP by default, so you will need to tell Apache where PHP is and the way to do that, is to have the following files in your PHP installation direction:

php5apache2_2.dll

(e.g. C:\Program Files\PHP\php5apache2_2.dll)

You may also want to change the default Apache listening port from 80 to something like 8080.  This can be done in the httpd.conf Apache configuration file, e.g.

Listen 8080

If you have IIS installed by default on W7, then setting Apache to listen to a different port, is a good idea.

Another suggestion is that, if you have installed WAMP as a package and it is not working, it may be a good idea to uninstall it and re-install the components one at the time starting with MySQL, Apache and PHP.

Thanks.
0
 
hmarcbowerCommented:
Your base folder (where your php files will go) is probably C:\wamp\www (if you followed the default install parameters when you installed WampServer).

If that's the case, then head to that directory and create a new text file called phpinfo.php.  Inside the file, put the following:
<?php
  phpinfo();
?>

Open in new window


Load up your web browser and point it to http://localhost/phpinfo.php and it should show you your php installation details.  :)
0
 
Dave BaldwinFixer of ProblemsCommented:
'phpinfo' is on the main page for WAMP.  All you have to do is go to "http://localhost/" and click on it.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
Tom KnowltonWeb developerAuthor Commented:
I can open and run the file from within PHP Designer 7.


But, when I try to run the following:

http://localhost

I get the following:

 web page not found
0
 
hmarcbowerCommented:
Ahh, you must be on Windows 7.

Try

http://127.0.0.1

instead.

0
 
Dave BaldwinFixer of ProblemsCommented:
Try the IP address of your computer.  Also, 'mywebsearch' has always been malware and a trojan downloader, I'm surprised that AVG allows it on your computer.
0
 
Dave BaldwinFixer of ProblemsCommented:
I wouldn't use the AVG toolbar either.  In the name of 'securing' your computer, it tries to lookup the website's reputation before it allow your browser to go there.  And, of course, it can't find 'localhost'.
0
 
Dave BaldwinFixer of ProblemsCommented:
With a WAMP (or XAMPP) installation, it is all preconfigured so Apache, PHP, MySQL, and phpMyAdmin all work together.  Installing the components individually is an ordeal at the very least because then you have to do all the configuration yourself.  I have done that and I will avoid doing that ever again if I can.
0
 
koudryCommented:
Hello,

The trouble is that sometimes it does not work when you have the XAMP package installed as one. You need to uninstall it and install the components individually. This gives more control.

The order in which you install the components, is very import. Quite often, this order works:

MySQL
Apache
PHP

Thanks.
0
 
Tom KnowltonWeb developerAuthor Commented:
thx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.