PDA

View Full Version : local host



csinclair83
16-09-2003, 01:43 AM
i'm just fiddling with PHP....and it says

Create a file named hello.php and put it in your web servers root directory (DOCUMENT_ROOT) with the following content:

Example 2-1. Our first PHP script: hello.php

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo "

Hello World</p>"; ?>
</body>
</html>


but i cant find my web server folder?
coz when i put this in there its meant to open as http://localhost/hello.php or http://127.0.0.1/hello.php

csinclair83
16-09-2003, 01:45 AM
forgot to mention i using winxphome

Greg S
16-09-2003, 02:06 AM
You have to create one, by making a virtual web server

mikebartnz
16-09-2003, 02:06 AM
Unless you are running a local server it won't produce anything.

csinclair83
16-09-2003, 02:11 AM
and how do i get one? if they are free to download?
or even set up....

i'm so new at this...

stu140103
16-09-2003, 11:40 AM
> and how do i get one?
Top get PHP go to http://php.net

> if they are free to download?
I think so

If you want to install PHP on win XP have a look at this:
That will help you install it on win XP: http://www.phpbb.com/kb/article.php?article_id=50 No 3( dont worry about MYSQL or PHPBB just read the bit about PHP & IIS)

& you will need IIS 'Internet information Services'

Hope this helps

csinclair83
16-09-2003, 12:06 PM
i dont have IIS in windows component wizard..only if i am even looking in right place...i went to add/remove hardware and clicked the windows componet button on side and thats where u install/remove windows stuff like IE etcetc....IIS aint there...

Kame
16-09-2003, 12:08 PM
Unless you've got a web server service plus PHP interpreter, it's not going to work at all.

I'd actually build a linux server and use PHP and Apache which most Distros come with, just may have to custom install it though.

I just think if you are going to use Windows as the server then IIS and ASP, since I found working on Windows IIS with PHP you don't have as much functionality as you would running it on Linux although there's many alternatives (more coding) to get the required results you need and you'll have more success later on if you continue learning PHP with Apache on Linux.

This is my personal opinion.

If you decide to go the windows way, then Apache for Windows and PHP for Windows would be needed, I know you can use IIS but I'm not sure if it's with WinXP Home, and it's not free either. There are probably other web server software you can use, but setting it up for use for PHP may require a lot more diving into than required, Apache will have the documents for Windows, and PHP should too, so it should be straight forward.

Chilling_Silently
16-09-2003, 12:18 PM
Im going to agree with Kame there, go with Apache!

I'd also suggest you go with a Linux server, something like RH 9 will take around 30 mins for a newbie to install, and comes with all the PHP/Web-server functionality you'll need!

You really dont need anything flashy to run it.. If you want a GUI, you could get away with a P200

You then have the option of Dual-Booting, or finding/using a dedicated Linux machine :-)

csinclair83
16-09-2003, 12:27 PM
i downloaded apache2triad the other day and just got into it b4 i posted my thread here...
and was following the simle tutural here

http://nz2.php.net/manual/en/tutorial.firstpage.php

if u really think i should get linux for this....then ok...where do i get linux from as i dont really want to sit here downloading it for weeks on end...(56kmodem user here)

I also admit i have wanted to try and use linux..its just my hdd is not that empty...how much space would i need?



(btw i have 2 go out now so if u post more here then i wont reply till sometime this afternoon) :D thanks for ya help so far :D

Kame
16-09-2003, 01:37 PM
I'm sure people here can send you out Distros, fair charge too, just enough to cover the cost of CDs, freight and a little extra for taking the time to download it.

I could have sent you out my Live CD that I've been working on (still in Alpha), running RH9, which only purpose is for web serving, although it still needs a lot of work, trying to find everything and anything that would make it the best Live CD for just web serving purposes, so I'm including catalog software, e-commerce, etc

-=JM=-
16-09-2003, 02:57 PM
I would go to apache.org and php.net, download the versions for windows read the readmes and you'll be fine.

Chilling_Silently
16-09-2003, 03:33 PM
If you'd like to get in contact with me, on MSN or Email:
Chilling_Silence[at]orcon[dot]net[dot]nz

Or ICQ:
141557013

I cant sort you out a distro :-)

Cheers


Chill.

Chilling_Silently
16-09-2003, 03:36 PM
Just though I'd add:
You can get away with around 2 gigs for a full desktop usage, with around 500mb to spare for files/doc's etc.

You can download Apache (Win32, Most distro's come with it!) from:
http://httpd.apache.org/download.cgi?Preferred=http%3A%2F%2Fapache.inspire .net.nz

csinclair83
16-09-2003, 04:05 PM
i've downloaded apache2triad and php4.3.3-win32

am just finding readmes for them now....

and chillling..i've added u to msn...
mine is csinclair83@man.quik .co.nz


i've got 1.7gigs free..am gonna be removing games and some programs i dont use so would have some space sometime :)

Hibino
16-09-2003, 04:06 PM
you can download the phphome and install it. it include apache+php+mysql
http://sourceforge.net/projects/phphome

IIS dosen't come with WinXP home.

csinclair83
16-09-2003, 04:12 PM
is that different to what i have downloaded?

Hibino
16-09-2003, 04:22 PM
nearly the same....but this one you just have to install once and it will help you to configure all things.

csinclair83
16-09-2003, 04:23 PM
.OK..
I'm going right back to the start...i'm just getting myself confused

I wanna learn/use PHP..
and i downloaded apache2triad...which i've just uninstalled...
and i downloaded php.exe in a winzip file (exact name in previous thread) which i havent instaleld...

I now know i need a server of some sort and as u mention i could use linux...

So what do I do now? download what? install what?...
(with linux am just gonna wait till i talk to chilling sometime)

the readmes are making me even more confused so i'm just gonna leave those for now

Hibino
16-09-2003, 04:41 PM
well.............you can install apache and install the php in winXP home edition. the simplest way to do it is just install the phphome i told you. and it will give you a apach+php+mysql enviroment under winXP home. then you can run php on you computer

stu140103
16-09-2003, 04:44 PM
> .OK..
> I'm going right back to the start...i'm just getting
> myself confused
>
> I wanna learn/use PHP..
> and i downloaded apache2triad...which i've just
> uninstalled...
> and i downloaded php.exe in a winzip file (exact name
> in previous thread) which i havent instaleld...

The easy thing for you to do (seen you are getting confused) is for you to download phphome (http://sourceforge.net/projects/phphome) and install it ( it does every thing you want it include apache+php+mysql so that should be easy ;) :) I am might even to try it! :D in the next day or so.......)

& Just forget about apache / linux for now :) because it will make you more confused,
Just think about PHP seen that is want to learn :)

& Have a look at apache / Linux / PHP Program at a latter date.

csinclair83
16-09-2003, 05:09 PM
Ok...I'll do that..
but whats the talk of needing a IIS to have it work?
as i am on winxp home...

stu140103
16-09-2003, 05:23 PM
> but whats the talk of needing a IIS to have it work?

IIS / apache is the software that helps server web pages out to the net.

IIS & apache sends & processes the web pages & then sends it to the computer, which is asking for the page, that is why I was saying about IIS.

I hope this helps.

stu140103
16-09-2003, 05:27 PM
> but whats the talk of needing a IIS to have it work?

Because you need a program (e.g. IIS / apache) to serve the web page, or no can access it.

ilikelinux
16-09-2003, 06:42 PM
Xp home can not act as an web server. Xp pro includes IIs (web server)

I hope this helps

csinclair83
16-09-2003, 08:01 PM
ok..
2 questions here
where can i get php home from as when i went to that link..i've attempted to download it 3 times as each time it stops after 2-3mb out of 24mb...
as i downloaded a installer and it stops every 2-3mb in my attempts..


and...
if winxp doesnt have iis...what can i use on winxp home?

stu140103
16-09-2003, 08:24 PM
> 2 questions here
> where can i get php home from as when i went to that
> link..i've attempted to download it 3 times as each
> time it stops after 2-3mb out of 24mb...
> as i downloaded a installer and it stops every 2-3mb
> in my attempts..

Just use phphome That will make your life easy :)

> and...
> if winxp doesnt have iis...what can i use on winxp
> home?

Phphome

Kame
16-09-2003, 09:01 PM
Get yourself a download manager, don't ask me which one though, there's so many, and so many personal favourites and I'll just list a few for you to decide, some contain adware/spyware.

Go!Zilla, Download Accelerator Plus, GetRight, Internet Download Manager, etc etc. Choose your weapon and proceed.

They are capable of resuming downloads, and sometimes improving speed in downloads, although if the server stops again for downloading then it's possibly their server so try an alternative mirror if you can find one.

csinclair83
16-09-2003, 09:11 PM
its cool thanks kame...
am gonna download from stu as hes offered to upload to his website for me :D

stu140103
17-09-2003, 01:02 PM
> its cool thanks kame...
> am gonna download from stu as hes offered to upload
> to his website for me :D

have you flinched downloading it????

csinclair83
17-09-2003, 01:22 PM
yep i have
sorry i didnt tell you...
it finished just after midnight...