PDA

Click to See Complete Forum and Search --> : Newbie to PHP....


NoteMe
Jan 27th, 2003, 03:24 PM
I have read a lot of the threads here about starting PHP. But I don't understand what that Apache "thingy" is. Is that if I want to use my PC as a server...or am I way off here...is is at all possible to use my PC as a server. We are renting a domain and a server (www.KLUBBSCENEN.com). I have just started PHP and made a helo world "app" and it did work on our server. So do I need this Apache thingy at all....


Thanks in advance
Øyvind Østlund

The Hobo
Jan 27th, 2003, 03:34 PM
If it worked, then you probably already have a server running. I believe PHP requires that you have a server for it to work...and you have to have PHP to run a PHP page (so if you haven't downloaded PHP, I doubt your hello world app really worked).

If you're on a Windows machine, you might have IIS or something running already and don't need Apache.

NoteMe
Jan 27th, 2003, 03:37 PM
I didn't test the PHP "app" on my machine. I just upladed it to our server. And it worked when i used the URL:

http://www.klubbscenen.com/hello.php

but is Apache just for testing php "apps" on my computer, or is it for something else/more????

The Hobo
Jan 27th, 2003, 03:38 PM
Yes, Apache will work for testing the scripts on your computer. It's what I use for testing.

NoteMe
Jan 27th, 2003, 03:41 PM
OK...but is it possible to use Apache or anything else to make my PC a server si it can be accessed thrue internett....

techgnome
Jan 27th, 2003, 03:45 PM
Apache is a web server.... the nice thing about it is that it can run on just about anything, where as IIS will only work on a server (or Win2k/XP)...... If you want to use your locaql machine as a test bed before promoting it to the server, then go ahead, d/l it and install it. Otherwise, if PHP is already ruinning on the server, then jump right on in.

The Hobo
Jan 27th, 2003, 03:46 PM
Originally posted by NoteMe
OK...but is it possible to use Apache or anything else to make my PC a server si it can be accessed thrue internett....

Yes, but there are some conditions you might want to think about:

You're going to need a constant IP (ie not dialup connection) because the DNS record for the location of the server must stay constant.
You're going to want to make sure you have a good connection, otherwise your site will run slow.

NoteMe
Jan 27th, 2003, 03:50 PM
I have 2Mbit ADSL. And we have now about 50k hits on our site a moth. But I think my IP is changing everytime my "router" is turned of. And that might happend if a fuse go off or something like that. So will this not work then. Or is it just more job for me to keep the IP right???

The Hobo
Jan 27th, 2003, 04:02 PM
Originally posted by NoteMe
I have 2Mbit ADSL. And we have now about 50k hits on our site a moth. But I think my IP is changing everytime my "router" is turned of. And that might happend if a fuse go off or something like that. So will this not work then. Or is it just more job for me to keep the IP right???

I think you might be able to actually buy an IP from your ISP so that it doesn't change. I'm not sure how much it usually costs, but it may be something worth checking into.

If you run a server, the IP must be constant, otherwise the DNS info is always going to be behind and hardly anyone will ever be able to get to your site. So it's a pretty big issue, even more than connection speed.

NoteMe
Jan 27th, 2003, 04:04 PM
OK...I will look into that. Thanks anyway. Maybe I could make my PC a FTP server. OR would that have the same problem....I have so much too learn...so little time...but I will keep learning PHP anyway...:)

phpman
Jan 27th, 2003, 04:45 PM
be carefull as some ISP's don't like it when you run a server/ftp from your house. they will cut you off.

NoteMe
Jan 27th, 2003, 04:49 PM
Why is that...because of all the traffic, or because of what it can be used for????

BTW do you know how to do it???

phpman
Jan 27th, 2003, 04:55 PM
becasue of all the traffic. it makes teh broadband go down and most ISP's have a limited broadband.

yes just intstall apache and configure it for your IP instead of localhost.

NoteMe
Jan 27th, 2003, 04:59 PM
So if I do that...anyone can access a my files/web pages from an other computer thru internet??? Or didn't I understand what you just said...

phpman
Jan 27th, 2003, 05:08 PM
only if they have your IP address. yes that is correct

NoteMe
Jan 27th, 2003, 05:11 PM
Thanks...I will try that.