Advertisement:

Author Topic: PHP Lesson 01 - installing a server  (Read 140431 times)

Offline Parham

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,317
  • Gender: Male
  • #!/usr/bin/perl
    • Online Node
PHP Lesson 01 - installing a server
« on: August 25, 2003, 03:50:41 PM »
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
Code: [Select]
<? 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.
« Last Edit: March 29, 2004, 05:03:23 AM by [Unknown] »

Offline Acf

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,967
  • Gender: Male
  • 101101010112
Re:PHP Lesson 1
« Reply #1 on: August 26, 2003, 03:32:52 PM »
blaghh french, why not use phpdev?
Sigh...

Offline Spaceman-Spiff

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,524
  • Gender: Male
Re:PHP Lesson 1
« Reply #2 on: August 26, 2003, 03:58:18 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?

Offline Parham

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,317
  • Gender: Male
  • #!/usr/bin/perl
    • Online Node
Re:PHP Lesson 1
« Reply #3 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...

Offline Acf

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,967
  • Gender: Male
  • 101101010112
Re:PHP Lesson 1
« Reply #4 on: August 27, 2003, 04:17:15 AM »
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...

Offline Bouminok

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,201
Re:PHP Lesson 1
« Reply #5 on: August 27, 2003, 04:19:24 AM »
you don't have to know french... i can't understand a single word of french and i use it

Offline Acf

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,967
  • Gender: Male
  • 101101010112
Re:PHP Lesson 1
« Reply #6 on: August 27, 2003, 04:26:40 AM »
the error log is in french :P ;)
Sigh...

Offline Bouminok

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,201
Re:PHP Lesson 1
« Reply #7 on: August 27, 2003, 10:58:47 AM »
you can make it become english:

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

Offline treo

  • Jr. Member
  • **
  • Posts: 145
  • Gender: Male
Re:PHP Lesson 1
« Reply #8 on: August 27, 2003, 11:36:06 AM »
easy php ... I don't like it, I think there are better alternatives like xampp or foxserv

Offline Acf

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,967
  • Gender: Male
  • 101101010112
Re:PHP Lesson 1
« Reply #9 on: August 27, 2003, 11:42:17 AM »
you can make it become english:

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

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

Offline Oldiesmann

  • Developer
  • SMF Super Hero
  • *
  • Posts: 24,814
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re:PHP Lesson 1
« Reply #10 on: September 09, 2003, 01:45:42 PM »
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
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline Martje

  • Jr. Member
  • **
  • Posts: 221
  • Gender: Male
    • Hostels Amsterdam
Re:PHP Lesson 1 - installing a server
« Reply #11 on: October 21, 2003, 10:14:19 AM »
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


Offline zoki

  • Semi-Newbie
  • *
  • Posts: 43
  • Gender: Male
  • Have you seen me offline?
Re: PHP Lesson 1 - installing a server
« Reply #12 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, 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 :)

Offline Acf

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,967
  • Gender: Male
  • 101101010112
Re: PHP Lesson 1 - installing a server
« Reply #13 on: November 16, 2003, 06:56:32 AM »
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...

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: PHP Lesson 1 - installing a server
« Reply #14 on: November 16, 2003, 03:36:05 PM »
« Last Edit: November 17, 2003, 03:34:16 AM by [Unknown] »

Offline Dempeduck

  • Semi-Newbie
  • *
  • Posts: 41
  • Gender: Male
  • Clapton is God!
    • My Website
Re: PHP Lesson 1 - installing a server
« Reply #15 on: November 18, 2003, 08:29:05 PM »
6 years of french did pay off!!
"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

Offline Ardenn

  • Jr. Member
  • **
  • Posts: 108
  • Gender: Male
  • Im a PHP newb
    • Twinwand D&D Forums
Re: PHP Lesson 1 - installing a server
« Reply #16 on: December 05, 2003, 02:47:45 PM »
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

Offline Parham

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,317
  • Gender: Male
  • #!/usr/bin/perl
    • Online Node
Re: PHP Lesson 1 - installing a server
« Reply #17 on: December 05, 2003, 06:45:42 PM »
http://127.0.0.1/mysql/ is the url you use to get to phpmyadmin

Offline Ardenn

  • Jr. Member
  • **
  • Posts: 108
  • Gender: Male
  • Im a PHP newb
    • Twinwand D&D Forums
Re: PHP Lesson 1 - installing a server
« Reply #18 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.

« Last Edit: December 08, 2003, 10:03:10 AM by Ardenn »
Ardenn // Traxxus
http://www.twinwand.com
D&D Play by Post Community Looking for Players and DM's

Offline Parham

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,317
  • Gender: Male
  • #!/usr/bin/perl
    • Online Node
Re: PHP Lesson 1 - installing a server
« Reply #19 on: December 08, 2003, 12:24:02 PM »
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/ ?