If you are running windows 200 or xp you can setup a web server using apache, php, mysql, and phpmyadmin.
You do this:
http://dcrin3.com/tutefiles/apache_1...x86-no_src.exe
Installing Apache
Well, let's locate that Apache exe file and run it. I hope you still remember where you kept it.
Server Information
Network Domain:- StaticIP, local ip(192.168.0.1), get Static DNS for you dynamicIP(see no-ip.com)
Server Name:- 127.0.0.1(localhost), StaticIP, Static DNS(no-ip.com)
Administators Email:-
your_email@domain.com
Finish the install.
Configuring Apache
Ok, now remember when apache install was on 'Server Information'? We specified localhost as 'Server Name'
Apache was configured just to run on default. So lets try it out.
For Win9x/2000/xp
Click on "Start->Programs->Apache HTTP Server 2.0.47->Control Apache Server-> Start Apache in Console"
Apache launches a DOS window then the window is immediately renamed to 'APACHE'. Give it some time to load[patience]. In win98, the windows stays there... so just minimize it. Since we now have the apache executable file not msi, in windows 2000/xp you will have the window appear then disappear.
Now, we configured apache. Let's take it for a test. Open you're browser and type
http://localhost
You should see this after you have typed the address:
'If you can see this, it means that the installation of the Apache web server software on this system was successful.'
Well, lets make a little index file for apache to use everytime you are in
http://localhost
Remember, we will not use the index file until apache is configured for the folder web.
-Stop Apache. net stop apache in command or stop apache using the start menu.
-First, open the configuration file(httpd) - located in the 'conf' folder of Apache
-Search for DirectoryIndex then we will add little extra characters to that line.
-Follow the image below. just add index.php and index.htm after index.html
-Save and Close the file.
-Make a folder named 'web' under your main[c] drive.
-Go ahead and add an index file in the 'web' folder in your c drive.
-Save the index file as .htm :: .html for .php(we are going to hold until php is installed)
-Start Apache. net start apache in command or start apache using the start menu.
http://dcrin3.com/tutefiles/php-4.3.9-Win32.zip
Configure PHP
Go into folder 'c:\php' find file 'php.ini-dist' rename it to 'php.ini'
Open the file 'php.ini' using 'Notepad'
Under 'Search' click 'Find' or 'Edit' click 'Find' on Windows 2000 or press 'Ctrl+F'
then type this 'doc_root' and modify according to the image below.
Seven lines after find 'extension_dir' and modify following the image below.
Modify the values of this two variables according to the screenshot below:
-Save and Close the file.
-Now, lets move this file to:
'php.ini' to c:\windows -- Win95/98/XP
To c:\winnt or c:\winnt40 -- WinNT/2000/XP
copy the file php4apache.dll from c:\php\sapi folder to the apache.exe folder
By default c:\Program Files\Apache Group\Apache
also copy the file php4ts.dll from c:\php to the same apache.exe folder
Configure Apache for PHP
Open the 'httpd.conf' file that we opened earlier configuring Apache.
"Start->Programs->Apache HTTP Server 2.0.47->Configure Apache Server-> Edit the Apache httpd.conf Configuration File"
Search for 'DocumentRoot' & 'Directory'
Modify the variables to match the following values:
Go to the line or search for 'AddType application/x-tar .tgz'
below that line add the following:
-You can cut and paste them.
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php
-Save and Close the file.
Test PHP
If your apache was still running while you configured php then shut it down and restart it. Lets go ahead and test php with a simple line.
Open Notepad by clicking 'Start' -> 'Run' then typing 'notepad'
Example script in new window.
Save the file under 'c:\web\test.php'
Open your browser and type this at the location box 'http://localhost/test.php'
That sample script displays the date
http://internetmaster.com/installtutorial/test_php.htm#
Download MySQL
http://dcrin3.com/tutefiles/mysql-4.0.21-win.zip
MySQL is the world's most popular Open Source Database, designed for speed, power and precision in mission critical, heavy load use.
Download mySQL version [4.0.21] :: format: zip file :: size: 25.3MB
The package that you got is a zip file which contains the setup files. You will need to unzip the files so that you can install it. This one is an easy install like Apache.
Extract the files to a folder.
Double click 'Setup' or just click it and press 'Enter' key.
Next -> :: Next -> :: Next -> :: Custom:Next -> :: Next -> :: Finish
Starting MySQL
Go to 'c:\mysql\bin' double click on 'winmysqladmin.exe'
Ok, so it opened a window then asked you for a username & password. Use 'root' for the username, specify a password, and its up and running. winmysqladmin on first execution is added to the startup folder so when you restart your system, mysql will also be up and running too. This is Not your final Password!
Configuring mySQL
Occasionally I have been getting emails relating to mysqlcc personally. The last version was somehow in beta mode and it failed to work for some of the users others questioned why have two ways to configure and use mysql.
I left mysqlcc out and left the rest to be used with phpMyAdmin. Now guess what?.... we are going to configure mysql through coding... thats right. No more of the GUI configuration.
Lets Go!
-Start->Run
-enter command prompt
-type command for win95/98
-otherwise type cmd
-type cd \ and press enter
-cd c:\mysql\bin
-type mysql -u root -p
-password: blank(press enter)
-type use mysql;
-type SELECT User, Host FROM mysql.user ORDER BY User;
-you get this as a table
blank user ---- localhost
blank user ---- build
root user ---- localhost
root user ---- build
-type
\quit
-Save the following file in the mysql\bin folder as unroot.txt
you will need this txt file to complete the command below unroot_text_file
-since your username and password[blank] is active you are going to log in with it to execute a script.
-type this in command prompt
mysql -u root -p mysql < unroot.txt
password: blank [press enter]
-Attempt to login into mysql. we flushed everything except for root user with password blank
mysql -u root -p
password: blank [press enter]
-type this
GRANT ALL PRIVILEGES ON *.* TO 'your_username'@'localhost' IDENTIFIED BY 'your_password' WITH GRANT OPTION;
-then quit
\quit
BEFORE YOU PROCEED, THE PASSWORD YOU USE ABOVE WILL BE THE SAME YOU USE BELOW FOR THE SCRIPT!!!
THIS IS ALSO THE SAME PASSWORD YOU WILL USE FOR phpMyAdmin!!!
I WILL NOT REPLY TO EMAILS THAT LEAD ALONG THIS LINE :
ERROR 1045: Access denied for user: 'your_user@localhost' (Using password: YES)
UNDER NO CIRCUMSTANCES!!!
Copy the following code into 'notepad' and save it as 'c:\web\test_mysql.php'
testing mysql
Run 'http://localhost/test_mysql.php'
-executing the script for the first time will display the value of 1
-the reason being that mysql_query function only returns a true or false result
-the second time you run the script you will get this Table 'testtable' already exists
results above will acknowledge mysql is running.
Downloading phpMyAdmin 2.5.4
Download phpMyAdmin version [2.5.6] :: format: zip file :: size: 1.9M
Note:
We are only configuring phpmyadmin for intranet use(personal use). nothing complicated, just to get it going thats all. Do not use this information here to further run or to configure your server.
-Unzip the files to 'c:\web'... notice that the files were thrown 2 folders down. go inside -- 1 folder down then move folder 'phpMyAdmin-2.5.4' upto 'web' and rename it to 'phpmyadmin'
Configuration
--Open the 'config.inc.php' -- using notepad, html editor
--Search for $cfg['PmaAbsoluteUri'] and type under the quotes this address.
http://localhost/phpmyadmin/
-Port number would be 3306
-Password would be what you specified earlier
-Type this in your browser 'http://localhost/phpmyadmin'
This is what you get:
phpMyAdmin is now running.
You have successfully installed Apache, mySQL, PHP in Windows 9x/NT/2000/XP!
mySQL Control Center and phpMyAdmin were also included.
Downlaod phpmyadmin
http://dcrin3.com/tutefiles/phpMyAdmin-2.5.6.zip