News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

PHP Lesson 01 - installing a server

Started by Parham, August 25, 2003, 03:50:41 PM

Previous topic - Next topic

Parham

The reason I want to have people set up their own local servers (in windows) is because it makes testing your scripts so much easier.  With a local server, there is no need to upload anything anywhere, your script can be edited and tested on the spot.  To keep with the flow of simplicity with these tutorials, I've decided not to make everyone download every single component to make their own server.  Instead I've decided to get everyone to download an all-in-one package that will install the server for you :), no fuss.

You will all need to download and install the file located at:
http://www.easyphp.org/telechargements/dn.php?F=easyphp1-6.php3

EasyPHP will install apache, php, mySQL, and phpMyAdmin all for you with a few simple clicks.  The program itself is originally in French, and the installation is all in French, but it's just a matter of clicking "yes", "Suivant", "Oui", "Suivant", "Suivant", "Installer", and let it install.

You should now have installed the EasyPHP server on your computer.

To begin testing it you can do the following:
Click on Start > Programs > EasyPHP > click on the easy shortcut EasyPHP

You should see a big E in your system tray and a blinking red dot.  If the red dot isn't blinking, right-click on the E and click on "start".  The red dot should NOW be blinking if it wasn't earlier.  Right-click on the E again and click on "configuration".  The textbox at the bottom where it says "mySQL arguments" should be changed to "--skip-name-resolve --language=english" (replaced "french" with "english").

All the files you want to test should be placed in the following directory:
C:\Program Files\EasyPHP\www

Start by placing the following file in there (you don't need to know what this does right now):
phpinfo.php

<? echo phpinfo(); ?>


If your server is running (the little red dot on the E should be flashing), then you can open up the browser of your choice and go to this URL:
http://127.0.0.1/phpinfo.php

If you see HTML, and information pertaining to PHP, then congratulations, you've got a local server running on your computer.

Let's test something else, phpMyAdmin.  phpMyAdmin, if you don't already know, is a frontend for mySQL in PHP which allows you to work with tables and databases.  Try going to the following URL and see whether you see HTML or not:
http://127.0.0.1/mysql/

If you saw HTML and not some error, then this test has also passed and you've got yourself a little server to test your scripts on.  A few notes:

All scripts you create will go in the "C:\Program Files\EasyPHP\www" directory.  To see your scripts you have to go to the following URL: "http://127.0.0.1/(your filename here)".

A few examples:
To edit: C:\Program Files\EasyPHP\www\file.php
To test: http://127.0.0.1/file.php

To edit: C:\Program Files\EasyPHP\www\new directory\file.php
To test: http://127.0.0.1/new%20directory/file.php (the %20 should be added automatically by your browser, a space is sufficient)

Other side notes:
You can create your PHP scripts in any simple text editor which won't add formatting like notepad or wordpad.  Your PHP files MUST have a "php" extension.

Acf

blaghh french, why not use phpdev?
Sigh...

Spaceman-Spiff

Quote from: Aliencowfarm on August 26, 2003, 03:32:52 PM
blaghh french, why not use phpdev?
afaik, phpdev hasnt been updated since dec 2002
http://www.firepages.com.au/

is there any dev packages with php 4.3.3?

Parham

in my opinion, i wanted to use easyphp because (a) i was familiar with it and (b) it was the easiest to set up and allow people to follow the tutorials with...

Acf

Quote from: Parham on August 26, 2003, 04:41:22 PM
in my opinion, i wanted to use easyphp because (a) i was familiar with it and (b) it was the easiest to set up and allow people to follow the tutorials with...

i belief you are right... but still dont now french :P
Sigh...

bostasp

you don't have to know french... i can't understand a single word of french and i use it

Acf

the error log is in french :P ;)
Sigh...

bostasp

you can make it become english:

--language=english - in the setup config bit :P

treo

easy php ... I don't like it, I think there are better alternatives like xampp or foxserv

Acf

Quote from: bostasp on August 27, 2003, 10:58:47 AM
you can make it become english:

--language=english - in the setup config bit :P

50% english 50% french ;)
Sigh...

Oldiesmann

Actually, one of our computers already has Apache on it from when I was doing a project for my C++ class last quarter that involved CGI/C++ on the web. I'll have to talk to my dad about installing PHP and MySQL on that machine...
Michael Eshom
Christian Metal Fans

Martje

great I have installed it and i am gonna enjoy this   :)
.... at least thats what i think now   ;)

there is a new release of the easyphp  which i downloaded because the other link would not open with me
http://www.easyphp.org/telechargements/dn.php?F=easyphp1-7


zoki

You know, installing php, mysql and apache as separate packages is not that hard.

It's simple. Besides it's always better to know how to install them separately, than to depend on EasyPhp or some other "all-in-one" apps.

But, sure EasyPhp is great for begginers.  Tutorial on installing apache, php and mysql separately would be a good thing, too :)

Acf

Quote from: zoki on November 07, 2003, 06:06:45 PM
You know, installing php, mysql and apache as separate packages is not that hard.

It's simple. Besides it's always better to know how to install them separately...

a tutorial about that would be great :)
Sigh...

[Unknown]


Dempeduck

"You thought the leaden winter, would bring you down forever,
But you rode upon a steam to the surface of the Sun"
--Tales of Brave Ulysses, Cream

Ardenn

With the EasyPHP, how do you access the phpmyadmin part?
Ardenn // Traxxus
http://www.twinwand.com
D&D Play by Post Community Looking for Players and DM's

Parham


Ardenn

#18
The directory structure will not allow this to work.  Easy PHP puts the phpmyadmin and mysql folders outside of the www folder.  When you goto either localhost or 127.1.1.1 you are accessing the contents of the www folder.  If mysql and phpmyadmin are not subdirectories of www then 127.1.1.1/mysql will not work.

** EDIT:  After playing around with this.  The answer is to simply move the mysql and phpmyadmin folders into the www directory and then use localhost/mysql to access the database.

Ardenn // Traxxus
http://www.twinwand.com
D&D Play by Post Community Looking for Players and DM's

Parham

Quote from: Ardenn on December 08, 2003, 09:54:11 AM
The directory structure will not allow this to work.  Easy PHP puts the phpmyadmin and mysql folders outside of the www folder.  When you goto either localhost or 127.1.1.1 you are accessing the contents of the www folder.  If mysql and phpmyadmin are not subdirectories of www then 127.1.1.1/mysql will not work.

** EDIT:  After playing around with this.  The answer is to simply move the mysql and phpmyadmin folders into the www directory and then use localhost/mysql to access the database.

did you TRY going to http://127.0.01/mysql/ ?

Advertisement: