Jump to content
  • Advertisement
Sign in to follow this  
dave

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


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

Without more information, here is what I can suggest:

Make sure the type is registered with Apache (in httpd.conf):
AddType application/x-httpd-php .php

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)

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


jfl.

Share this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
Quote:
Original post by Vyper_uk
I 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 this post


Link to post
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!