Jump to content


Photo

LocalHost


  • Please log in to reply
14 replies to this topic

#1 fruzzgle

fruzzgle
  • Members
  • PipPip
  • Member
  • 17 posts
  • LocationKS City :]

Posted 01 July 2006 - 08:36 PM

I type localhost in the adress bar and get nothing. How do I get localhost?

#2 sanfly

sanfly
  • Members
  • PipPipPip
  • Advanced Member
  • 344 posts
  • LocationNew Zealand

Posted 01 July 2006 - 08:41 PM

Assuming everything is set up correctly

http://localhost/
If you're not part of the solution, you're part of the precipitate

#3 fruzzgle

fruzzgle
  • Members
  • PipPip
  • Member
  • 17 posts
  • LocationKS City :]

Posted 01 July 2006 - 08:47 PM

Yah, http://localhost doesn't work either. What do I need to set up?

#4 Guest_PaulyboyUK_*

Guest_PaulyboyUK_*
  • Guests

Posted 01 July 2006 - 08:49 PM

What web server have you installed?

#5 fruzzgle

fruzzgle
  • Members
  • PipPip
  • Member
  • 17 posts
  • LocationKS City :]

Posted 01 July 2006 - 08:58 PM

I downloaded apache but I can't install it. The install file doesn't know how to run itself (I think that's what it means when the file looks like this).

Posted Image

#6 Guest_PaulyboyUK_*

Guest_PaulyboyUK_*
  • Guests

Posted 01 July 2006 - 09:02 PM

http://apache.rmplc....-x86-no_ssl.msi


Try DL this and run - It def works


Let me know how you get on


Paul

#7 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 01 July 2006 - 09:03 PM

windows judges file types by extensions and if it doesn't recognize the extension or if the extension is missing, it would display that icon (default).

what you're seeing it probably the installation instruction file minus the extension. it's probably a few KB's big and you can probably view it in notepad.

#8 fruzzgle

fruzzgle
  • Members
  • PipPip
  • Member
  • 17 posts
  • LocationKS City :]

Posted 01 July 2006 - 09:05 PM

Sure thing  :D

btw: is there a web hosting site I can test my php scripts for free? Or will I be able to do that already with localhots/whatever.php?

Edit: After installing it, it didn't work. Do I have to be on IE or can I do it on firefox?

#9 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 01 July 2006 - 09:13 PM

localhost should work...but you seem to be on a windows machine and hosts are generally on a *nix base. some things may vary in between a linux and windows based host depending on your coding practices.

for example (this is the only one i can think of right now), if you're loading an extension, it's best to do this:
dl(myExtension.' . PHP_SHLIB_SUFFIX);

but most people might do this:
//for win
dl(myExtension.dll');

or this:
//for *nix
dl(myExtension.so');


but using PHP_SHLIB_SUFFIX, PHP will determine the extension's file extension dynamically.


so just make sure you practice good coding methods and you should be fine if you test it locally on your win or remotely (it would be a *nix machine in most cases)

#10 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 01 July 2006 - 09:16 PM

Edit: After installing it, it didn't work. Do I have to be on IE or can I do it on firefox?


i believe on win, you have to either start apache manually or add it as a service. did you try that? and are you positive you followed the installation instructions word for word?

and just to let you know, I'll move this to the Apache Server after your next post because this really doesn't belong in the PHP Help section :)

#11 Guest_PaulyboyUK_*

Guest_PaulyboyUK_*
  • Guests

Posted 01 July 2006 - 09:19 PM

Have you rebooted? - has the server started>?

Sounds like it has not - just follow the apache faq and you should be good to go

Heres a good link to a tut for complete set up


http://www.developer...ysql/page1.html

#12 fruzzgle

fruzzgle
  • Members
  • PipPip
  • Member
  • 17 posts
  • LocationKS City :]

Posted 01 July 2006 - 09:31 PM

Ok, I'll restart. Durring the installation it asked for my site, I don't have one right now and am just learning the php so will it affect the installation or localhost if I didn't put anything in there.

Edit:

Ok I restarted and In my tasks bar I see the apache logo and when I click on it I get- apache 2.2 - start. When I try to start it, it says- "The requested Operation has Failed!". And my localhost still doesn't work. What do I do?

#13 fruzzgle

fruzzgle
  • Members
  • PipPip
  • Member
  • 17 posts
  • LocationKS City :]

Posted 01 July 2006 - 10:08 PM

Screenshot

Posted Image

#14 king arthur

king arthur
  • Members
  • PipPipPip
  • Advanced Member
  • 335 posts
  • LocationUK HQ

Posted 01 July 2006 - 10:33 PM

One of the books I've read warns that there are issues using Apache 2.2 with PHP and advises using 1.3 instead, maybe give that a try?
Sir Isaac Newton said "If I have seen farther, it is by standing on the shoulders of giants". But it is not recorded as to whether he said it before or after he was hit on the head by a falling apple.

#15 fruzzgle

fruzzgle
  • Members
  • PipPip
  • Member
  • 17 posts
  • LocationKS City :]

Posted 01 July 2006 - 10:52 PM

Oh that's ok. I found this program that a friend advised and it hooks up my apache and mysql for me. It's called EasyPHP. My localhost works great and everything works!

Posted Image

There is one thing though, when ever I turn this program off and try to view the localhost it isn't accessible. When ever it's on I can, so if I turn it off will databases from my site (when I make a site) be able to connect to mysql through localhost? This may be a problem for me. Does this happen with apache too?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users