Forum Moderators: coopster

Message Too Old, No Replies

php

what is needed?

         

spire8118

5:45 pm on Dec 13, 2007 (gmt 0)

10+ Year Member



Can some one please explain to me how you actually get php files to work.
I have installed WAMP server. I have a .php file that I want to load just to see if it is working but all I get is the html code in the browser.
I have looked through tons and tons of sites, forums etc but nothing explains in set steps what you actually need and how to do it.
i have done:
1. installed php, apache, mysql as a wamp server
2. i have created a php file with html in it
3. i have tried to load that file with no success.

with a wamp server do you have to do anything else to it to get it to work, or does it work striaght away?
can you include php within the html and stil load as long as it is saved as .php?
do you have to save the .php file somewhere specific? i have mine saved where I save my html files.
There seems to be no explanations to why or what you actually do to get php to work.
yes there are plenty of places that say :
you need a server and to download php. they explain how to do manual installs. but thats about it. anyone willing to enlighten me?

also when I type: localhost in the browser it takes forever to load. it connects but doesnt actually load the localhost page, if there is one.

cameraman

7:29 pm on Dec 13, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not familiar with wamp server itself so I can't help you there.
If php is working, you won't ever see any php code in your browser. For example:
<html><head><title>hey</title></head>
<body>
<p>Regular html text</p>
<?php
echo "<p>php inserted text</p>";
?>
</body>
</html>
If your server software hands it to your browser and you view the source, you'll see two paragraphs; no php.

Yes, you can intermingle php and html.
On the vast majority of installations, you put your php files in the same place as your html ones.

Try typing [127.0.0.1...] into your browser instead of localhost, see if it loads faster that way.

I assembled my WAMP from its separate components. I installed Apache, then php, then modified the apache config file as per the instructions, then installed mysql. As I recall I didn't have to manually edit anything to get mysql to work.

deMorte

9:53 am on Dec 14, 2007 (gmt 0)

10+ Year Member



I think that if you have the basic settings in WAMP you need to create a folder for your project in the WAMP's www -folder (example c:\wamp\www). At least that's what I gathered form WAMP's site. I'm not a WAMP user, so I could be wrong.

henry0

12:43 pm on Dec 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If it’s not working, which seems highly improbable (WAMP is a very decent product)
I will simply uninstall the whole thing and start again from scratch
However look by the very right side of the quick launch bar
You should see a little icon looking like a ˝ circle with something like a “keyhole”
That icon has to be black, if red then right click it and select start all services
You may also try “restart all services”
Go to your C: root you should find the WAMP dir
Open it, open WWW this is where all scripts need to be loaded
Best test is to load (in WWW) a small php file and name it test.php that file will only contain:
<?php
phpinfo;
?>

Next point your browser to: [localhost...]
This will display the content of WWW
Select you “test file”
You’re in biz….