Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Parham's PHP Tutorials => Topic started by: Parham on August 25, 2003, 03:50:41 PM

Title: PHP Lesson 01 - installing a server
Post by: Parham 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

<? 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.
Title: Re:PHP Lesson 1
Post by: Acf on August 26, 2003, 03:32:52 PM
blaghh french, why not use phpdev?
Title: Re:PHP Lesson 1
Post by: Spaceman-Spiff on August 26, 2003, 03:58:18 PM
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?
Title: Re:PHP Lesson 1
Post by: 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...
Title: Re:PHP Lesson 1
Post by: Acf on August 27, 2003, 04:17:15 AM
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
Title: Re:PHP Lesson 1
Post by: bostasp 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
Title: Re:PHP Lesson 1
Post by: Acf on August 27, 2003, 04:26:40 AM
the error log is in french :P ;)
Title: Re:PHP Lesson 1
Post by: bostasp on August 27, 2003, 10:58:47 AM
you can make it become english:

--language=english - in the setup config bit :P
Title: Re:PHP Lesson 1
Post by: treo 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
Title: Re:PHP Lesson 1
Post by: Acf on August 27, 2003, 11:42:17 AM
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 ;)
Title: Re:PHP Lesson 1
Post by: Oldiesmann 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...
Title: Re:PHP Lesson 1 - installing a server
Post by: Martje 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

Title: Re: PHP Lesson 1 - installing a server
Post by: 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, 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 :)
Title: Re: PHP Lesson 1 - installing a server
Post by: Acf on November 16, 2003, 06:56:32 AM
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 :)
Title: Re: PHP Lesson 1 - installing a server
Post by: [Unknown] on November 16, 2003, 03:36:05 PM
Okay.

(http://www.simplemachines.org/community/index.php?topic=2859)

-[Unknown]
Title: Re: PHP Lesson 1 - installing a server
Post by: Dempeduck on November 18, 2003, 08:29:05 PM
6 years of french did pay off!!
Title: Re: PHP Lesson 1 - installing a server
Post by: Ardenn on December 05, 2003, 02:47:45 PM
With the EasyPHP, how do you access the phpmyadmin part?
Title: Re: PHP Lesson 1 - installing a server
Post by: Parham on December 05, 2003, 06:45:42 PM
http://127.0.0.1/mysql/ is the url you use to get to phpmyadmin
Title: Re: PHP Lesson 1 - installing a server
Post by: 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.

Title: Re: PHP Lesson 1 - installing a server
Post by: Parham on December 08, 2003, 12:24:02 PM
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/ ?
Title: Re: PHP Lesson 1 - installing a server
Post by: Ardenn on December 08, 2003, 02:06:51 PM
Yes I did, and my browser returned the error: PAGE COULD NOT BE DISPLAYED.

In fact, I actually tried both http://localhost/mysql/ AND http:/127.1.1.1/mysql/  although since 127.1.1.1 is the loopback address for the NIC card, there would be absolutly ZERO difference between them
Title: Re: PHP Lesson 1 - installing a server
Post by: [Unknown] on December 08, 2003, 02:17:23 PM
Well, sometimes localhost isn't set to go to 127.0.0.1, esp. if you've messed with your hosts file on 9x.

I would assume Easy PHP would set up a virtual path to it, but... whatever.  I don't like packages anyway :P.

-[Unknown]
Title: Re: PHP Lesson 1 - installing a server
Post by: Parham on December 08, 2003, 03:35:09 PM
Quote from: Ardenn on December 08, 2003, 02:06:51 PM
Yes I did, and my browser returned the error: PAGE COULD NOT BE DISPLAYED.

In fact, I actually tried both http://localhost/mysql/ AND http:/127.1.1.1/mysql/  although since 127.1.1.1 is the loopback address for the NIC card, there would be absolutly ZERO difference between them


Not http://127.1.1.1/mysql/, instead 127.0.0.1/mysql/ (I don't think it works with localhost either) <-- this is the URL set to work in the phpmyadmin configuration file.  If you've stuck to the regular directories, go to "C:\Program Files\EasyPHP\phpmyadmin" and open up "config.inc.php".  Scroll down to line 36 which has the following php code:


$cfgPmaAbsoluteUri = 'http://127.0.0.1/mysql/';


THAT'S the URL you type in to get to phpmyadmin.
Title: Re: PHP Lesson 1 - installing a server
Post by: Tim on December 30, 2003, 10:49:04 AM
New easyPHP :
http://www.easyphp.org/telechargements/dn.php?F=easyphp1-7

English pages:
http://www.easyphp.org/telechargements/dn.php?F=indexUS_1.7
Title: Re: PHP Lesson 01 - installing a server
Post by: Homie on March 31, 2004, 09:19:10 AM
WOW good Tutorial Actually   :)
Title: Re: PHP Lesson 01 - installing a server
Post by: foxy on April 07, 2004, 04:33:39 AM
Thanks Parham the server makes it so simple to test out forums etc before uploading so if anyone wants to try mods etc it is brill. ;D
Title: Re: PHP Lesson 01 - installing a server
Post by: Snuffy on April 10, 2004, 08:39:13 AM
I D/L'd last week the version 6 of this EasyPHP and just found the newer virsion when i came back  to read some more here.

Any suggestions on if this will just install over the V-6 with no problems or not?

Or do you suggest to uninstall v6 befor installing v7 onto it?!?!?
Title: Re: PHP Lesson 01 - installing a server
Post by: [Unknown] on April 10, 2004, 10:16:34 AM
My suggestion is...

http://unknown.network32.net/tutorial.basic-server

I just don't trust pre-built packages.

-[Unknown]
Title: Re: PHP Lesson 01 - installing a server
Post by: Homie on April 10, 2004, 10:18:19 AM
ya i can now run a Server with mysql and PHP Installed using Apache becasue i read that tutorial its very easy  :)
Title: Re: PHP Lesson 01 - installing a server
Post by: Snuffy on April 10, 2004, 10:25:04 AM
Quote from: [Unknown] on April 10, 2004, 10:16:34 AM
My suggestion is...

http://unknown.network32.net/tutorial.basic-server

I just don't trust pre-built packages.

-[Unknown]

Thanks [Unknown]  we is a checking it out right now!    :)
Title: Re: PHP Lesson 01 - installing a server
Post by: Daniel D. on April 10, 2004, 10:25:49 AM
Quote from: Homie on April 10, 2004, 10:18:19 AM
ya i can now run a Server with mysql and PHP Installed using Apache becasue i read that tutorial its very easy  :)
Yeah, that's a good idea. I normally do something and read the tutorial after that ! I always wonder why it doesn't work before. Hmm, I should try again with your idea - thx.
Title: Re: PHP Lesson 01 - installing a server
Post by: Homie on April 10, 2004, 10:30:22 AM
Ya [Unknown] can you make a tutorial that teaches people PHP if they dont know that language  :)
Title: Re: PHP Lesson 01 - installing a server
Post by: Daniel D. on April 10, 2004, 11:15:04 AM
Quote from: Homie on April 10, 2004, 10:30:22 AM
Ya [Unknown] can you make a tutorial that teaches people PHP if they dont know that language  :)
I can speak german and english.

If you read the PHP tutorials here, you can some things with PHP. I thought you read them all ?!? If not, go through them first...
Title: Re: PHP Lesson 01 - installing a server
Post by: Crush on May 08, 2004, 10:59:52 AM
Very good lesson 1 !
I got through the set up for me the EasyPHP installation went great!
It took me a few minutes to realize I had to set up SMF  to the www folder in EasyPHP!
created a floder called forum with in the www folder.
Once that was done the set up of SMF to my localhost went great!
I then installed several Themes created by the Guru's here, Thanks everyone for sharing the themes!!

Now I will move on to the next lesson and play with the Themes in SMF!!

Good Job with the tutorials!

Title: Re: PHP Lesson 01 - installing a server
Post by: unrelenting on August 29, 2004, 09:49:18 PM
I have installed everything correctly (the EasyPHP server) and tested the 127.0.0.1 links. When I try to install the SMF software it needs a username and password for mySQL. Where do I set this or what do I need to enter to run the install.php?
Title: Re: PHP Lesson 01 - installing a server
Post by: [Unknown] on August 29, 2004, 09:59:44 PM
By default, they are "root" and "". (no password..)

-[Unknown]
Title: Re: PHP Lesson 01 - installing a server
Post by: unrelenting on August 29, 2004, 10:06:47 PM
Quote from: [Unknown] on August 29, 2004, 09:59:44 PM
By default, they are "root" and "". (no password..)

-[Unknown]

Thanks.
Title: Re: PHP Lesson 01 - installing a server
Post by: HoTmetal on December 13, 2004, 03:29:16 PM
If you just want to run a test server/home server on your windows machine this is an EASY way to do it.

You could use it as a "REAL" server, but who would run a real server on windows??

http://www.bigapache.org/

it installs PHP/perl/ASP/mysql all the good stuff. I wouldn't use it as a real server, but I have it on my laptop for testing out things. let me know what cha think


Title: Re: PHP Lesson 01 - installing a server
Post by: voldemort on January 21, 2005, 06:41:24 PM
OK this isnt working for me because i dont get it. that code we had to save in that file (sorry about the vagueness) how do i do it because i dunno. i know this is vague but i dont have a clue about php thats why i'm trying to learn lol
Title: Re: PHP Lesson 01 - installing a server
Post by: [Unknown] on January 22, 2005, 05:52:50 AM
Open Notepad, paste the code in there, and save it as "phpinfo.php" (with the quotes.)

-[Unknown]
Title: Re: PHP Lesson 01 - installing a server
Post by: voldemort on January 22, 2005, 11:25:19 AM
ok i'll try
Title: Re: PHP Lesson 01 - installing a server
Post by: voldemort on January 22, 2005, 11:34:23 AM
woohoo it worked thanks!`
Title: Re: PHP Lesson 01 - installing a server
Post by: kadhumia_flo on November 10, 2005, 02:10:01 PM
xaamp is the best :)
Title: Re: PHP Lesson 01 - installing a server
Post by: ORGASMUS on April 30, 2007, 02:22:33 AM
hmmmmm...where I can set my db password and username???
Title: Re: PHP Lesson 01 - installing a server
Post by: xenovanis on April 30, 2007, 09:12:51 AM
In phpMyAdmin, which should be @ http://localhost/phpmyadmin/index.php -> Privileges
Title: Re: PHP Lesson 01 - installing a server
Post by: kadhumia_flo on December 27, 2007, 08:36:21 PM
Quote from: ORGASMUS on April 30, 2007, 02:22:33 AM
hmmmmm...where I can set my db password and username???
If you want to use xampp as your public web server, then don't. xampp is good as a testing environment.
Title: Re: PHP Lesson 01 - installing a server
Post by: WillyP on February 10, 2008, 12:16:29 PM
Thanks for writing the tutorial, I just installed easyphp. The script, phpinfo, did not work but I determined that easyphp installs by default short tag=off, so '<?' should be changed to '<?php'.
Title: Re: PHP Lesson 01 - installing a server
Post by: pyrman on May 11, 2008, 03:32:39 PM
none of the links in this post for a server opens to a good page they may be outdated does anyone have a current link

Thx
Title: Re: PHP Lesson 01 - installing a server
Post by: WillyP on May 16, 2008, 09:59:56 PM
Yep... try http://www.easyphp.org/index.php
Title: Re: PHP Lesson 01 - installing a server
Post by: cuteXD on July 16, 2008, 01:18:20 AM
okay it says in the first post:
You will all need to download and install the file located at:
http://www.easyphp.org/telechargements/dn.php?F=easyphp1-6.php3

i clicked the link but it was an invalid address and no its not my computer it tried to re-direct me to the home page of php. but that didnt help

i want to do what it says in the tutorial!!! i really want to follow all of the instructions but there needs to be a valid link! if anyone can help me I WILL LOVE U!!!

NEED RESPONSE ASAP!
Title: Re: PHP Lesson 01 - installing a server
Post by: cuteXD on July 16, 2008, 04:39:23 AM
okay thank you i tried the new link and downloaded easyPHP from the red page i installed it in english then when it tried to start up by itself a message came up:

this application has failed to start because LIEMYSQL.dll was not found. Re-installing the application may fix this problem.

does setup and install mean the same thing? i just re-downloaded it from the red page.. was that the right thing to do. or was the error created from something else?
Title: Re: PHP Lesson 01 - installing a server
Post by: cuteXD on July 16, 2008, 05:09:07 AM
ok now i have a new problem! the red dot in the system tray wasnt blinking, right clicked restart but nothing happened.
my SQL cannot be started because of error or something apache is started but sql is not.

this is what came up

InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
080716 18:33:06  InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
080716 18:33:08  InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
080716 18:33:09  InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
080716 18:33:14  InnoDB: Started; log sequence number 0 0
080716 18:33:14 [Note] C:\PROGRA~1\EASYPH~1.0B1\MySql\bin\mysqld.exe: ready for connections.
Version: '5.0.27-community-log'  socket: ''  port: 3306  MySQL Community Edition (GPL)
080716 18:44:51 [Note] C:\PROGRA~1\EASYPH~1.0B1\MySql\bin\mysqld.exe: Normal shutdown

080716 18:44:51  InnoDB: Starting shutdown...
080716 18:44:53  InnoDB: Shutdown completed; log sequence number 0 43655
080716 18:44:53 [Note] C:\PROGRA~1\EASYPH~1.0B1\MySql\bin\mysqld.exe: Shutdown complete

if u could please tell me how to get my server up and running from this state that would be soo much appreaciated, or else i might just have to uninstall i really dont want to! it seems as thought 'my easy PHP' is supposed ot be easy. but its nothing but a bag of troubles at the moment. im a pretty smart girl and its even difficult for me, so i dont know why its called easy PHP its not even working. helpp me please!!!!!  :'(

ive spent 2 days on this and thats where im only up to! SURELY it doesnt take that long does it?

in await of your response!