[web] Has Anyone Setup PHP and Apache on their PC?

This topic is 4615 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I have everything installed and running, via xampp and for some reason i can't get my php files to be server-processed. Can anyone who has set up this please reply. Dave

Share on other sites
I have a combination of Apache, PHP and MySQL set up on two XP machines, although I didn't use xampp. Not much else anyone can say about it until you give us some more information about what your setup is and what you've done so far.

John B

Share on other sites
What's "xampp"?

Anyways, you probably need to have apache load the php module on startup.

If you're running linux, and apache2, this is done by creating a symlink from mods-available/php4* to mods-enabled/php4*.
At least on Debian..

If you're running Apache 1.3, it's done in the config file somewhere..
"LoadModule php4.so" or something like that..

Share on other sites
I've done it on Windows XP and an LFS (Linux) system.

Make sure the type is registered with Apache (in httpd.conf):

Make sure you've loaded the php cgi/module in httpd.conf

Do not just open your php files in a browser, go through the actual web server (http://localhost or similar) with your php documents in the document root (default Apache Install Dir/htdocs)

 XAMPP. So actually it should be properly set up. I suppose just my last suggestion holds any fluid.

jfl.

Share on other sites
Yeah, sorry. I thought i wouldn't bother trying to explain it all until someone was capable of answering.

xampp installed everything.

All i know is that somewhere on a different drive i have my website .php file and the script doesn't work.

I'm knew to this so i don't know the basics, can i have php files anywhere on my comp and test them in ie with no extra tassles?

Share on other sites
I believe you have to have the php files in your webroot, which is configured in the Apache config file

Share on other sites
No, that's what I meant in my last suggestion. The php files need to be in your server's "document root", and you access them as if your computer were a website, that is, http://localhost/index.php et cetera. With XAMPP, you are supposed to put your php documents in xampp-install-dir/xampp/htdocs (normally)

jfl.

Share on other sites
Ok i'll try that, thanks.

Share on other sites
Quote:
 Original post by Vyper_ukI believe you have to have the php files in your webroot, which is configured in the Apache config file

What he said...unless this "xampp" thing you're talking about changes the root folder.

Share on other sites
Ok i tried it and the page loaded but blank,
this is the code:

<html><body><php echo Hello World; ?></body></html>

EDIT: Oh crap i just realised that this is borked php, all working now thanks guys!!

Dave

1. 1
Rutin
25
2. 2
3. 3
4. 4
JoeJ
17
5. 5

• 14
• 11
• 9
• 9
• 10
• Forum Statistics

• Total Topics
631756
• Total Posts
3002110
×