Requirements to run PHP.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Re: Requirements to run PHP.

Post by Stryks »

swetha wrote:http://localhost:81/.The winamp homepage opens
Sorry ... did you just say the 'winamp' homepage opens? Winamp? As in the music player? Surely you mean the WAMP page opened?
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Re: Requirements to run PHP.

Post by Stryks »

Just for something to do, I spent a few minutes in google .. found the following.
By default, the document root of WAMP is C:/wamp/www
create 2 folders project1 and website2 in the document root as follows:

C:/wamp/www/project1

C:/wamp/www/website2
For example, you've already created file index.php in folder project1 and file index.html in folder website2, you will access your websites as follows:

http://localhost/project1

http://localhost/website2

In case you do not like to have the index file or want to access different files, you have to include the filename in the URL; for example, you have file check.php in folder project1 and file test.html in folder website2, you will access them as follows:

http://localhost/project1/check.php

http://localhost/website2/test.html
I've never used WAMP, so I cant really verify this is correct. But it all seems about right.

It's an absolute breeze nowdays to use IIS by the way ... mysql installs as a service and PHP self configures (for the most part) ... but I digress.

Hope this helps.
swetha
Forum Commoner
Posts: 88
Joined: Wed Sep 10, 2008 11:00 pm

Re: Requirements to run PHP.

Post by swetha »

Sorry.It is wamp.
Having windows XP.In httpd.conf file,i changed the line Listen 80 to Listen 81.after this, i gave the following line...
http://localhost:81/.The wamp homepage opens.

But the thing is i dont know how to execute a php file locally.is there any permission that i need to give for the folder where the file is.That is when i right click,i dont get the web sharing option.

pls help..thanks.
Please please please help.am struggling here.
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Re: Requirements to run PHP.

Post by Stryks »

I must be misunderstanding your question. You want to view you php in a browser yes?

Then you find where the web root is .. this is where the files that you describe as the 'wamp homepage'. You create a folder in there called whatever you like. You place your php file(s) in there, and then you point your browser to http://localhost:81/your_folder/your_file.php

And just like that .. it should display.

Yes? Or not what you are trying to do?
swetha
Forum Commoner
Posts: 88
Joined: Wed Sep 10, 2008 11:00 pm

Re: Requirements to run PHP.

Post by swetha »

thanks this worked.

thanks a lot once again for this help.
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Re: Requirements to run PHP.

Post by Stryks »

Now all you need to do, assuming you aren't using IIS for anything, is either uninstall IIS or set it to use another port, and switch your WAMP installation back to 80.

I'd recommend uninstalling IIS unless you really need it.
Post Reply