PDA

View Full Version : Resolved localhost php mysql



ggalan
05-04-2011, 05:58 PM
i used this tutorial to install php 5.2.14 + mysql on localhost: http://www.bicubica.com/apache-php-mysql/index.php#php

however i want to learn zend frameworks but it requires php 5.2.4 or later

i tried to upgrade PHP 5.3 (5.3.6) with no luck

any suggestions?

traq
05-04-2011, 07:52 PM
you might try xampp (http://www.apachefriends.org/en/xampp.html). very easy to install and always the latest versions.

ggalan
05-04-2011, 07:58 PM
ive tried wamp
http://www.wampserver.com/en/
and it opened php files but it did not display them 100%. for example all the includes were not working

does xamp display php projects like a real server? also would i have to get rid of my local host setup?

traq
05-04-2011, 11:37 PM
I've never tried wampserver. I run xampp on both Windows and Linux, and I've _never_ had any problems.

xampp _is_ a real server, so yes, it provides a great "working" environment for php development. The only difference is that you're not hooking it up to the internet.

ggalan
05-05-2011, 12:31 AM
awesome, so xampp is localhost?

djr33
05-05-2011, 02:44 AM
localhost is the name given to any local server (at least I believe this is the case with all servers; I'm not positive, but at least most of the major ones). "localhost" is equivalent to saying "the local server" or "this computer".

traq
05-05-2011, 05:03 AM
right; "localhost" is the name of your computer's loopback interface (which your computer uses to access itself -"loop back"- using the tcp/ip protocol). It's the same as typing the ip address http://127.0.0.1/ in your browser.

To answer your question more directly, "localhost" means "this computer" (i.e., the computer you're working at). It's an address, not a server or any other type of software.

When you set up a server on your local machine, it will serve files from the web root directory when you access http://localhost.

If you don't have a server installed, you get a "The Webpage is not Available" error. Linux uses the loopback address internally for various functions, and I'm sure Windows and Mac do as well, though I don't know to what extent.

I'm not sure what would happen if you have two servers installed on a single computer, but I'd imagine it would cause problems without a bit of specialized configuration. I would remove wampserver before trying to install xampp.

My post above isn't as clear as it could be, either: xampp is not really a "server." neither is wampserver. they're software "bundles"; basically pre-set-up servers (along with php, mysql, and a variety of other web software) that are designed to be easily installed and configured by people who don't install servers for a living. for xampp, Apache is the actual server software (and, one of the most prevalent servers on the internet).

ggalan
05-05-2011, 01:36 PM
well if apache is the server then i ill assume that it has phpMyAdmin for sql dB's

traq
05-05-2011, 02:17 PM
well if apache is the server then i ill assume that it has phpMyAdmin for sql dB's

no - Apache is only a file server. that's why bundles like xampp, etc. are so popular: you don't have to go through the extra trouble of installing php, mysql, etc., and configuring them to work with your server.

djr33
05-05-2011, 04:15 PM
Apache is an operating system like Windows. You then need to install software just like any other computer.

(In a technical sense, Apache operates within Windows/Linux as a program, not an operating system, but as a server it is the base operating system-- two levels.)

ggalan
05-06-2011, 03:28 PM
xampp rocks!!!

traq
05-06-2011, 03:54 PM
xampp rocks!!!

hmm... :D