October 16th, 2004 06:56 AM
Installing a server
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:
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:
Start by placing the following file in there (you don't need to know what this does right now):
Copy to clipboardCode:
<? 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:
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:
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.
Inturn If this Tut has helped you in any manner, It would very kind, in turn to visit my small community for Programmers
Developers and Designers/