Showing posts with label PHP MySQL Apache Installation Guide. Show all posts
Showing posts with label PHP MySQL Apache Installation Guide. Show all posts

Friday, September 19, 2008

Apache PHP MySQL Installation Guide

Installation

There are two option of installing PHP, MySQL and Apache

Option 1 : Using PHP+MySQL+Apache Package/Bundle
Example:
*For those who choose option 1, you may jump to Step 15 directly since most of PHP Bundle mentioned above has already setup Step 1 to Step 14.

Option 2: Separate Installation
To install Apache PHP and MySQL separately, make sure each version match with one another

Example:


Apache
Step 1:
Install Apache 1.3

Step 2:
Set doc path, default doc and directory index

DirectoryIndex index.htm, index.php
DocumentRoot "C:/Apache" (create this directory)

PHP
Step 3:
Install PHP to c:\php4

Step 4:
Make a copy of php.ini-recommended and renamed to php.ini. Copy it to Windows directory

Step 5:
Set extension and doc path

Step 6:
Copy php4ts.dll from C:\php4 to c:\php4\extensions
doc_root = "C:\Apache"
extension_dir = "C:\php4\extensions"
session.save_path = “C:\temp” ( create this directory )

Step 7:
Load PHP as Apache module

LoadModule php4_module "c:/php4/sapi/php4apache.dll"
AddModule mod_php4.c
AddType application/x-httpd-php .php

ENCODER
There are few encoder available to use for encoding purposed:
· Turck Mmcache
· EAccelerator
· PHPobfuscator

Step 8:
Install Turck Mmcache to c:\php4\mmcache and create c:\php4\tmp\mmcache

Step 9:
Copy mmcache.dll to c:\php4\extensions, copy all mmcache.php, mmcache-password.php and encoder.php to c:\Apache

Step 10:
Load MMcache as PHP module, add the line at the bottom to the extension part of php.ini

zend_extension_ts="c:\php4\extensions\mmcache.dll"
mmcache.shm_size="16"
mmcache.cache_dir="c:\php4\tmp\mmcache"
mmcache.enable="1"
mmcache.optimizer="1"
mmcache.check_mtime="1"
mmcache.debug="0"
mmcache.filter=""
mmcache.shm_max="0"
mmcache.shm_ttl="0"
mmcache.shm_prune_period="0"
mmcache.shm_only="0"
mmcache.compress="1"

Step 11:
Restart Apache server and type

http://localhost/mmcache.php If it works, everything is working.

MYSQL
Step 12:
Install MySQL

Step 13:
Run winmysladmin and configure MySQL

Step 14:
Set root password for MySQL

mysql -u root mysql
SET PASSWORD FOR root@localhost=PASSWORD('123');

Step 15:
After successful MySQL installation, you will need to get a manager to assist you with your data table.

You may pick one of any below:
MySQL Manager
· MySQLyog
· PhpMyAdmin
Install phpmyadmin

Step 16:

Install framework/CMS
Framework/CMS
Starting your php code from scratch? It gonna take very long time, why not use some of the ready-written application in PHP and MVC (Model, View, Controller) below:
(Some are free and some are not)


Which one is better? And which one is easier? you gotta find out yourself by reading some reviews.

Here some of those that I found:
Reviews

http://www.phpit.net/article/ten-different-php-frameworks
http://www.phpwact.org/php/mvc_frameworks
http://www.packtpub.com/article/open-source-cms-php-finalists
http://www.siteground.com/best_cms_tools.htm
http://okto.silaban.net/2008/02/website/menggunakan-cms-atau-framework/


Step 17:
Choose and install edit tools

Edit Tools

http://www.donationcoder.com/Reviews/Archive/TextEditor/index.html
http://forums.htmlcenter.com/programming-scripting/2511-notepad-editplus-vs-dreamweaver-frontpage.html
http://www.astahost.com/best-php-editor-t125.html

Step 18:
Set config file (Set config.inc.php, host, user, password) and run

Step 19:
Do some google search for resources on PHP Tutorial according to your framework/CMS

http://www.apache.org/
http://www.php.net/
http://www.w3schools.com/php/
http://www.zend.com/
http://www.phpbuilder.com/
http://www.mysql.com/
http://www.phpmyadmin.net/
http://sourceforge.net/
http://www.devshed.com