From VbGORE Visual Basic Online RPG Engine
This guide will tell you how to create a web server (Apache + PHP + MySQL + CGI + Windows) on a spare drive in your computer.
PHP 5.2.1 (ZIPPED)
Active Perl 18.104.22.1689
Everything on [d:\]
Download the following files:
Apache - Get the Win32 Binary (MSI Installer) version
ActivePerl - Just click continue on the registration form to ignore it
PHP - Get the latest version that is WINDOWS BINARY ZIPPED only!
MySQL you most likely already have if you are a vbGORE user. If you do not have it:
MySQL - Get the Windows (x86) ZIP/Setup.EXE
1. Keep hitting next until you see where you can install it in, then I just used D:\Apache\, but you customize that with your settings.
2. You will reach a form with 3 boxes. On the first box and second box enter "localhost" and the third box enter any of your e-mails.
3. After you installed Apache try directing your browser in to "http://localhost" and it should show the big "it works".
4. Go to your apache directory then go to the conf/httpd.conf and find DocumentRoot then make a folder in your drive ( in my case on my d drive I made a folder called "public_html") and changed the value to your html directory I changed it to DocumentRoot "D:/public_html"
5. Also find <Directory "default"> then change that too such as <Directory "D:\public_html\">
6. Restart apache to take the effects.
1. Unzip PHP in your directory in my case d:\php\
2. In the PHP directory there is a file called php.ini-dist rename that to php.ini
3. Open php.ini find doc_root then change that to your html directory. In this case, doc_root = "d:\public_html"
4. Find extension_dir = "./" and change that to extension_dir = "d:\php\ext". Don't forget to change the d:/ to your drive.
5. Open the apache config file again and on the bottom add
LoadModule php5_module "d:/php/php5apache2_2.dll" AddType application/x-httpd-php .php PHPIniDir "d:/php"
Change the d: to your drive or directory.
6. In the same file find <IfModule dir_module> on the line below after index.html add index.php
7. Restart apache
8. Make a file called test.php and inside using notepad type in
<php> <?php phpinfo(); ?> </php>
1. Uninstall mysql and clear the mysql folder if you already have it. Uninstall ODBC too.
2. Install mysql the same way you did before and on step 4 in the other guide instead of selecting typical select custom and the next step just change the directory to d:\mysql\ and do just hit next. And do exactly the same thing on the other guide Here.
3. Copy libmysql.dll to c:\windows\system32\ then in php.ini find ;extension=php_mysql.dll then remove the ; to uncomment it, save and restart apache.
4. Now PHP and MySQL can work together to test it make a file called mysql.php then enter the following lines in it, and edit the file.
//Don't edit behond this point
$link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or die("Sorry mystical cannot connect to your server");
print "Mystical is now in your server
"; mysql_select_db("$dbName") or die("Sorry mystical cannot find the database you selected"); print "Mystical selected your database. That means IT WORKED!!!!!
"; mysql_close($link); ?> </php>
Go to the script and you should see "mystical selected your database".
5. Install ODBC once again.
1. Start the installer, then you will come to a page where it asks you where to install, I installed in d:\usr\.
2. You will eventually come to a page where there's alot of checkboxes, only check the first 2 and nothing eles, it should install.
3. Open your apache config file again and look for Options Indexes FollowSymLinks and add ExecCGI after that so it becomes Options Indexes FollowSymLinks ExecCGI
4. To make perl work in any directory look for ScriptAlias /cgi-bin/ "D:/Apache/cgi-bin/" and comment it by adding a # in front. Then look for #AddHandler cgi-script .cgi then uncomment it by removing the # and addon the end .pl so it becomes AddHandler cgi-script .cgi .pl
5. Restart apache
6. Make a file called hello.cgi then type in
print "Content-type:text/html\n\n"; print "Mystical RULEZ"; </perl>
and in your browser it should display "mystical rulez".
You may also want to install a FTP software to make it a real server, such as FileZilla.
I strongly not recommend PHPMyAdmin, it is very CPU intensive. A better alternative would be a GUI client such as SQLyog Community Edition.
Any comments please post here http://vbgore.com/forums/viewtopic.php?p=17809#17809
You might also want mail software such as XMAIL or Mercury mail.