wamp author: jun shao project: haiti. what is wamp? wamp = windows+apache+mysql+php note:wamp5 does...

25
WAMP Author: Jun Shao Project: Haiti

Upload: gloria-obee

Post on 31-Mar-2015

240 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

WAMP

Author: Jun ShaoProject: Haiti

Page 2: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

What is WAMP? WAMP = Windows+Apache+MySql+PHP

Note:WAMP5 does not work with Windows 98,Me

Page 3: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

WAMP Installation A single installation file downloaded from

http://www.wampserver.com/en/download.php

Page 4: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

After Installation

Application Service Apache wampapache PHP MySQL database

wampmysql

Page 5: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

WAMP’s Menu

Management Portals

PHPmyadmin SQLitemanager Note: A user has to click on the icon tray to access

WAMP's menu.

Page 6: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

WAMP’s Menu

Configuration and

Settings Loaded Modules Directory Access

Shortcut

Page 7: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

WAMP’s Menu

Services Apache MySQL

Note: The icon tray

reflects the status of your server.

Page 8: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Haiti Migration

ArchitectureWindows Server

IIS

LDAPPHP

SQL Server

Tomcat

Perl (Replication)

Login/offReport

Windows Server

Apache

LDAPPHP

MySQL

Tomcat

Perl (Replication)

Login/offReport

Page 9: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Haiti Migration

New Applications Apache HTTPS Setting MySQL

DDL DML Data Data Migration

Page 10: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Haiti Migration DDLFor example, MsSQL:

CREATE TABLE <TABLENAME> (<TABLENAME>_id bigint IDENTITY (1, 1) NOT NULL

MySQL:CREATE TABLE <TABLENAME> (

<TABLENAME>_id bigint NOT NULL AUTO_INCREMENT,

Page 11: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Haiti Migration

DMLFor example,MsSQL:

select top 10 * from patient;

MySQL:select * from patient limit 0,10;

Page 12: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Haiti Migration Data MsSQL:

MySQL:

Page 13: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Haiti Migration

Data MigrationWe use ODBC to migrate data from

the MsSQL database to the MySQL database.

We use PHP to export data from the MySQL database and then import the data into the MySQL database.

Page 14: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Haiti Migration

MsSQL and MySQL follow the SQL-92 standard. However, each of them have their own extensions.

Source Common Full Name Development

  Name   Method

ANSI SQL/PSM SQL/Persistent Stored Module Standard

IBM SQL PL SQL Procedural Language Proprietary

Microsoft/ T-SQL Transact-SQL Proprietary

Sybase      

MySQL MySQL MySQL Open Source/

      Proprietary

Oracle PL/SQL Procedural Language/SQL Proprietary

Page 15: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Affected Applications QuestionWhich applications will be affected if we

install WAMP?

Windows Server

Apache

LDAPPHP

MySQL

Tomcat

Perl (Replication)

Login/offReport

Windows Server

Apache

LDAPPHP

MySQL

Tomcat

Perl (Replication)

Login/offReport

Page 16: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Affected Applications

PERL(Replication) PHP Tomcat

Page 17: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Affected Applications

PERL (Replication)It uses standard sql in inserting data.

Conclusion: It requires a little change during the WAMP migration.

Page 18: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Affected ApplicationsTomcat

TOMCAT

Presentation

Application & Business

Logic

Config

Data access

Users

Servlets

MySQL database

Embedded reports

Reports.xml Context.xml

JDBC Libary for MySQL

Jasper LibraryJasper

qry = …+cast ( (sum(numerator) as unsigned)*100./..

url="jdbc:jtds:mysql://localhost:1433/(resource.database)"

<aggregateItems>count(*) as 'Compte', ceiling(cast(count(*)/$total.*100…

mysql-connector-java-5.0.6-bin.jar

Page 19: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Affected Applications

Conclusion:Most changes of reports are based

on extension differences between MySQL and MsSQL.

Page 20: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Affected Applications

PHPPHP

Presentation

Application & Business

Logic

Config

Data access

Users

Layout

MySQL database

Monitoring and Evaluation

installation-setting.php

cphr.ini

backend.php

SQL Scripts

Patient Info Administration Authentication

Function Utility Label

DB Defination

reports.xml

backendAddon.php

Layou menu.php mainbody.phpFunction genericsave.php followup.phpUtility chkDate.jsLabel findLabels.php

$mysql_access = mysql_connect (DB_SERV, DB_USER, DB_PASS ) or die ("FATAL ERROR: Unable to connect to the database");mysql_select_db (DB_NAME, $mysql_access) or die ("FATAL ERROR: Unable to select database.");

Page 21: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Affected ApplicationsChanged reasons: Different extension of queries.For example, “Top 10” in MsSQL vs. “Limit 0,10” in MySQL “Convert” in MsSQL vs. “Cast” in MySQL “isDate” in MsSQL vs. “Length(Date(..))” in MySQL Different ways to connect to the database. Different data formats.For example, “mm/dd/yyyy” in MsSQL vs. “yyyy-mm-dd” in MySQL Different Error Messages

Page 22: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Affected Applications ConclusionThe migration is complex since we have

to review every query. The suggestion is to create a wrapped-up interface using standard queries for other pages to call when they want to visit the database.

Problem LeftThe performance of MySQL. We might

tune the database to get decent performance.

Page 23: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Overall

WAMP is easy to install and it is free to use.

Migration from IIS/PHP/MsSQL to WAMP is practical.

The cost of migration is mainly to review queries and change them based on the SQL extension of MySQL.

Page 24: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

Q&A

Page 25: WAMP Author: Jun Shao Project: Haiti. What is WAMP? WAMP = Windows+Apache+MySql+PHP Note:WAMP5 does not work with Windows 98,Me

End