|Knowledgebase Articles and information about running a website, cPanel and various hints and tips. Here you will find tutorials on php, MySql, .htaccess, cron, SEO, Search Engines, CHMOD, FTP, CSS, HTML and various other hints and tips on running and Administrating a website.|
Installing Apache, PHP, MySql and Perl on Windows
How to set up a server with Apache , PHP , MySQL , Perl , phpMyAdmin on your home Windows PC.
Let's start by installing apache (http server) . you can download the
apache installer on www.apache.org . download the verion you like ,
even thought , in win systems i recomand verion 2 (this tutorials is
for apache 2) . here is a link for it :
is a next , next , finish 'work' ... The installer will ask you some details like
your server name , your server adress and the admin's mail adress . if
you have a domain name or a hostname , enter the info's like this :
Server Name : your_domain.org Server Adress : www.your-domain.org Admin Email : firstname.lastname@example.org
next , finish to fiinish the instllation . Advice : Install it in c: (he creates
a folder for it , don't worry) to make sure you configure it easyer .
If you are finished , open up a browser and write in the adress bar :
Let's install PHP . download the archives from www.php.net . Here is a
direct link for verion 4.3.9 :
downloading it , extract the archive in c:/php (this is to simplify paths) .
Now , open up c:/apache/conf/httpd.conf and search for this line :
#LoadModule ssl_module modules/mod_ssl.so
LoadModule rewrite_module modules/mod_rewrite.so LoadModule php4_module "c:/php/sapi/php4apache2.dll" AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php .php4
Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None
Options Indexes Includes FollowSymLinks MultiViews ExecCGI # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All
see the content of a folder without getting a 403 forbidden error .
Now search for :
DirectoryIndex index.html index.var.html
DirectoryIndex index.html index.php
Restart apache server shortcut in the start menu or by writing :
net apache restart
you have php working for your server. Now let's configure php and
make sure it really works ! Open up c:/php/php.ini (php.ini-dist renamed)
and search for this paragraph :
max_execution_time = 60 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data memory_limit = 5M ; Maximum amount of memory a script may consume (8MB)
max_execution_time = 300 ; Maximum execution time of each script, in seconds max_input_time = 300 ; Maximum amount of time each script may spend parsing request data memory_limit = 5M ; Maximum amount of memory a script may consume (8MB)
register_globals = Off
register_globals = On
extension_dir = ".\"
extension_dir = "c:/php/extensions"
Search for :
;Windows Extensions ;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
extension=php_bz2.dll extension=php_db.dll extension=php_gd2.dll extension=php_java.dll extension=php_msql.dll extension=php_pdf.dll extension=php_pgsql.dll extension=php_sockets.dll
function . you need this !!!) Search for :
[mail function] ; For Win32 only. SMTP = smtp_port = 25 ; For Win32 only. ;sendmail_from =
[mail function] ; For Win32 only. SMTP = mail.isp.org smtp_port = 25 ; For Win32 only. sendmail_from = mail@your_domain.org
[mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 ; For Win32 only. sendmail_from = mail@your_domain.org
Save the files . Now let's finalize the php installation . copy all the dll's
from c:/php/dlls into c:/windows/system32 . copy c:/php/php4ts.dll into
c:/windows/system32/ and copy php.ini from your folder php into
windows and system32 folder . restart apache . open up notepad and
add this into the file :
<?php phpinfo(); ?>
open up a browser . in the adress bar write :
you can optionaly install zend optimizer . i am using it ... it doesn't
needs a tutorial . to install the PEAR modules for php , just run the
go-pear batch from the php folder and 2click the reg file to finish the
let's install mysql . download mysql from http://www.mysql.com/ .
this tutorial applyes to verion 4.0.* ... i don't recomand using mysql
4.1 . here is a direct link :
install mysql in c:/mysql and complete the installation . open up command
prompt and write this :
cd mysql cd bin mysqld-max-nt --install
consider downloading mysql control center . a gui tool to administrate the
server in a graphical mode . here is a link :
window will pop-up . it will ask you to add a new connection . here are the
info's you need to fill in :
name : localhost or main or whatever :) host : localhost user : root pass :
expand the users menu and delete all users except root@localhost . right
click it and select edit user . change it's password to whatever you want
now right click the server and select edit . change the password to the
pass you chosed for user root . as easy as that . mysql is installed !
phpMyADmin . you can download it from http://www.phpmyadmin.net/ .
i recommend using verion 2.5.1 pl1 . the last verion is still bugy
download , unzip the contecnt into a folder in htdocs (phpMyAdmin) and
open up config.inc.php with a text editor .
search for :
$cfg['PmaAbsoluteUri'] = '';
$cfg['PmaAbsoluteUri'] = http://www.your_domain.org/phpMyAdmin/';
$cfg['blowfish_secret'] = '';
$cfg['blowfish_secret'] = 'password';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
Perl . Optioanl for your server , very usefull . i recomend you to install
it . you can download it from http://www.activestate.com/ . here is a
direct link :
folder (c:/apache/cgi-bin) .
Hope this helped , you're welcome . Just leave your money on the refrigerator
Knowledgebase | SEO | Free Scripts | Free Graphics | Free Wordpress Themes | Free Word Cloud Script | Domains For Sale | Optimize Your Forum
Blog Comment Software
|Thread||Thread Starter||Forum||Replies||Last Post|
|Windows Keyboard Shortcut Commands||Admin||Knowledgebase||3||12-21-2011 05:12 PM|
|How To Backup a MySql Database||Admin||Knowledgebase||8||12-14-2011 05:26 PM|
|What is MySql||Admin||Knowledgebase||6||05-06-2009 11:08 AM|
|MySql - Stored Procedures||Admin||Knowledgebase||1||02-10-2009 05:41 AM|
|Converting mysql result set into an array?||bretheartbobby||Knowledgebase||2||02-11-2008 05:54 PM|