Welcome to @!$h@s Free CodeWorld
 
 
  free books Search
Google
 
  free books Source Code
 
  free books FAQs
 
  free books Articles
 
    Personal
 
  free books Resources
 
   Windows Tips & Tricks
 
   Dot Net Section
 
   About Myself

I am a B.E in Information Technology form Lingaya's Institute of Management and Technology Faridabad, India.

I have worked on VC++, MFC, ASP, ASP.NET ,Sql Server. Currently I am working on Visual C++ and MFC.

I made a free open source firewall for windows which can be find in MYProjects section.

I am currently working in GloalLogic, Noida.

For any comments and suggestions Contact Me at :
Admin@ProgrammerWorld.NET

MySpace profile: Here

 
  Tips and Tricks about Google Install Apache , PHP , MySQL , Perl on Windows

Install Apache , PHP , MySQL , Perl on Windows

1.)  installing apache:

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 version 2 (this tutorials is for apache 2) . here is a link for it :

for a faster mirror , visit http://httpd.apache.org/download.cgi .

After downloading the file (.msi installer) , run it . The installation wizard 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 : admin@yourdomain.org

if you don't have one , you should get on e free at :

Check the 'Run as a service for all users on port 8080' option and click 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 :

http://localhost/

If you will see a 'Test Page for Apache Installation' , everything works .

2.)  installing PHP :

Let's install PHP . download the archives from www.php.net . Here is a direct link for verion 4.3.9 :

Make sure you download the archive and not the installer . Ok! after 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

under that line , add this :

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

Now search for this line :

<Directory "C:/Apache2/htdocs">

Now Change :

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

into :

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

This will allow .htaccess support on your dedicated server and make sure you can see the content of a folder without getting a 403 forbidden error .

Now search for :

DirectoryIndex index.html index.var.html

and change it into :

DirectoryIndex index.html index.php

Save the file and restart apache . (you can restart it by pressing the Restart apache server shortcut in the start menu or by writing :

net apache restart


in a command prompt window . Ok!

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)

you should change this to whatever you want . here is an option i use :

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)

Now search for :

register_globals = Off

and change it into :

register_globals = On

Search for :

extension_dir = ".\"

and change it into :

extension_dir = "c:/php/extensions"

assuming you have installed php in c: ...

Search for :

;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.

and uncomment (delete the ; in the front) the following modules :

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

Ok! now let's change the smtp settings (this is good for you mail() function . you need this !!!) Search for :

[mail function]
; For Win32 only.
SMTP =
smtp_port = 25

; For Win32 only.
;sendmail_from =

and change to :

[mail function]
; For Win32 only.
SMTP = mail.isp.org
smtp_port = 25

; For Win32 only.
sendmail_from = mail@your_domain.org

if you don't have a mail server or :

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
sendmail_from = mail@your_domain.org

if you have a mail server ...

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();
?>

save this file in your htdocs folder (c:/apache/htdocs) as info.php and open up a browser . in the adress bar write :

http://localhost/info.php

you should see php's configuration in a table . a looong file 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 instllation .

3.)  installing mysql :

let's install mysql . download mysql from http://www.mysql.com/ . this tutorial applyes to verion 4.0. here is a direct link :

after downloading , extract the arhive somewhere and run the setup.exe . install mysql in c:/mysql and complete the installation . open up command prompt and write this :

cd mysql
cd bin
mysqld-max-nt --install

this will install mysql as a service . recomended . now you would probably consider downloading mysql control center . a gui tool to administrate the server in a graphical mode . here is a link :

install it like any other program and run the shortcut in the desktop . a 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 :

click add , expand the databases menu and delete databse text . now 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 !

4.) installing phpMyADmin :

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'] = '';

change it to your phpmyadmin url . eg. :

$cfg['PmaAbsoluteUri'] = http://www.your_domain.org/phpMyAdmin/';

now search for :

$cfg['blowfish_secret'] = '';

and change it to your mysql root password like this :

$cfg['blowfish_secret'] = 'password';

now search for :

$cfg['Servers'][$i]['auth_type'] = 'config';

and change it to :

$cfg['Servers'][$i]['auth_type'] = 'cookie';

save and exit . that's it ! phpMyAdmin works .

5.) installing Perl :

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 :

download , install and you are ready . put your perl scripts in the /cgi-bin/
folder (c:/apache/cgi-bin) .

Other articles :

  1. Tips and Tricks about Google Talk (New IM from Google )
  2. Firefox Tips and Tricks / Tweaks / Secrets / Codes
  3. introduction to ASP.NET
  4. Tips and Tricks about Google
  5. Tips and Tricks about GMail
  6. Bulk Rename (Source Code Project)


Copyright 2012, ProgrammerWorld.NET

Comments | Suggest a Site | Contact us for Advertisement | Submit Article | Submit Source Code |
For any queries regarding this web site or to contribute to this site mail me at Admin@ProgrammerWorld.NET