Jump to content

Archived

This topic is now archived and is closed to further replies.

fruzzgle

LocalHost

Recommended Posts

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

Share this post


Link to post
Share on other sites
Assuming everything is set up correctly

http://localhost/

Share this post


Link to post
Share on other sites
Yah, http://localhost doesn't work either. What do I need to set up?

Share this post


Link to post
Share on other sites
Guest PaulyboyUK
What web server have you installed?

Share this post


Link to post
Share on other sites
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).

[img]http://img206.imageshack.us/img206/3913/installerror2ik.png[/img]

Share this post


Link to post
Share on other sites
Guest PaulyboyUK
http://apache.rmplc.co.uk/httpd/binaries/win32/apache_2.2.2-win32-x86-no_ssl.msi


Try DL this and run - It def works


Let me know how you get on


Paul

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
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:
[code=php:0]
dl(myExtension.' . PHP_SHLIB_SUFFIX);
[/code]

but most people might do this:
[code=php:0]
//for win
dl(myExtension.dll');
[/code]

or this:
[code=php:0]
//for *nix
dl(myExtension.so');
[/code]


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)

Share this post


Link to post
Share on other sites
[quote author=fruzzgle link=topic=99130.msg390244#msg390244 date=1151787910]
Edit: After installing it, it didn't work. Do I have to be on IE or can I do it on firefox?
[/quote]

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 [url=http://www.phpfreaks.com/forums/index.php/board,2.0.html]Apache Server[/url] after your next post because this really doesn't belong in the PHP Help section :)

Share this post


Link to post
Share on other sites
Guest PaulyboyUK
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.developertutorials.com/tutorials/php/apache-php-mysql/page1.html

Share this post


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

Share this post


Link to post
Share on other sites
Screenshot

[img]http://img287.imageshack.us/img287/1527/apacheerror6db.png[/img]

Share this post


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

Share this post


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

[img]http://img208.imageshack.us/img208/4883/easyphp9fz.png[/img]

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?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.