WAMP: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
No edit summary
 
(33 intermediate revisions by 3 users not shown)
Line 5: Line 5:
The acronym WAMP (or Q.A.M.P.) refers to a set of free software programs commonly used together to run dynamic Web sites or servers:
The acronym WAMP (or Q.A.M.P.) refers to a set of free software programs commonly used together to run dynamic Web sites or servers:
* Windows, the operating system;
* Windows, the operating system;
* Apache, the Web server;
* [[Apache web server]];
* [[MySQL]], the database management system
* [[MySQL]], the database management system
* The [[PHP]] (and sometimes the Perl or Python) programming languages.
* The [[PHP]] (and sometimes the Perl or Python) programming languages.
Line 11: Line 11:
See [[LAMP]], the original Linux-based solution
See [[LAMP]], the original Linux-based solution


== WAMP for Windows products ==
== WAMP/MAMP products - Windows and Mac ==


For the Windows world there exist several complete packages that come with installers and a launch/stop/configure tool. Some also work for Linux, but I'd rather not use them on a real server.
For the Windows world there exist several complete packages that come with installers and a launch/stop/configure tool. Some also work for Linux, but I'd rather not use them on a real server.
* Also check out Wikipedia's [http://en.wikipedia.org/wiki/Comparison_of_WAMPs Comparison of WAMPs].
=== WAMP5 / WAMPServer ===
* [http://www.wampserver.com WampServer]
* Also available on [https://sourceforge.net/projects/wampserver/ SourceForge] (try this if the other is down)
* Supports [[PHP]] 5x and [[MySQL]] 5x (16:16, 4 December 2006 (MET)).
* This may be the best bet currently, but [[User:DSchneider|DSchneider]] didn't do any serious comparative testing, but it's the only one I was mostly happy with.
* Only thing missing were some mysql excutables that some programs or yourself may need for command line operations (e.g. [[LAMS]] installer needs this).


=== EasyPHP ===
=== EasyPHP ===
* [[http://www.easyphp.org/ Easy PHP]].
* [http://www.easyphp.org/ Easy PHP].
* Used to be a good package, but supports older versions of PHP and MySQL
* Used to be the most popular PHP 4.x package
* [[User:Daniel K. Schneider|Daniel K. Schneider]] did not test the 2.0beta version yet (mai 2007).


; Upgrade of EasyPHP
; How to upgrade EasyPHP if you really need to
Easyphp 1.8 (current on 16:11, 4 December 2006 (MET)) does only PHP 4, but you can upgrade:
I once managed to upgrade PHP4.x to PHP5.x in Easyphp 1.8 (in nov 2006)
* Empty the ./php directory and http://www.php.net/downloads.php
* Empty the ./php directory and get [http://www.php.net/downloads.php PHP] from PHP
** IMPORTANT: Edit php.ini and '''explicitly''' load php_mysql (for the php 4 this was not necessary)
* Edit php.ini and '''explicitly''' load php_mysql (for the php 4 this was not necessary)
  extensions_dir = "./ext"
  extensions_dir = "./ext"
  extensions = php_mysql.dll
  extensions = php_mysql.dll


=== WAMP5 / WAMPServer ===
=== XAMPP ===
 
* [http://www.apachefriends.org/en/xampp.html XAMPP]
* Also works fine, but this is more intrusive.
 
== MAMP ==
 
* [http://www.mamp.info/en/home/ MAMP] for your MacIntosh
* MAMP stands for: Macintosh, Apache, Mysql and PHP and can be used as light-weight developper's alternative to the built-in servers.
 
== WAMP for Windows running from a memory stick ==
 
WAMP servers that run off a memory stick, your camera or any device that can act as an external drive for a device (usually a PC). Usually these distributions have less functionality, but take up less space and need no (or almost no) installation work. I tested both MoWes and Uniform and both work and are live projects - [[User:Daniel K. Schneider|Daniel K. Schneider]] 11:09, 22 December 2009 (UTC).
 
I suggest always to decompress such distributions on a real hard desk and then transfer to a memory stick (to avoid write errors I ran into).
 
=== The Uniform server ===
 
The Uniform server is a combo of Apache Httpd Server, PHP, Perl, and MySQL. It comes in two variants (or more) and can be enhanced with extra plugins.
* Version 5.5 release in dec 2009 is [http://sourceforge.net/projects/miniserver/files/ described] like this: {{quotation|The Uniform Server is a lightweigt server solution for running a web server under the WindowsOS. 8.78MiB! It includes the latest versions of Apache2, Perl5, PHP5, MySQL5, phpMyAdmin and ... NO INSTALLATION REQUIRED! NO REGISTRY DUST! Just UNPACK and RUN!}}
* Plugins exist, e.g. for a Tomcat server, an FTP server etc.!
* [http://www.uniformserver.com/ The Uniform Server Homepage] homepage, downloads (on sourceforge).
* [http://wiki.uniformserver.com/ Uniform wiki] (documentation)
 
=== MoWes ===
 
* See the [[Modular Webserver System]] article. For beginners working under Windows, this system is probably the ''easiest way for playing with a WAMP'' and some [[portalware]]. Several popular CMSs can be download and installed automatically - [[User:Daniel K. Schneider|Daniel K. Schneider]] 17:18, 15 January 2010 (UTC).


* [[http://www.wampserver.com WampServer]] (also on SourceForge)
=== Distributions of ready-to-run portals ===
* Supports PHP 5x and MySQL 5x (16:11, 4 December 2006 (MET)).
* This may be the best bet, but [[User:DSchneider|DSchneider]] didn't do any serious testing.


== Running a mediawiki on your travail PC ==
There exist some distributions for packages like Drupal, Joomla etc. and that you can run usually directly from a memory stick or any other drive.
* E.g. * [http://jsas.joomlasolutions.com/ JSAS] Joomla! StandAlone Server.
* Otherwise, packages like WOS do include preconfigured servers


To run Mediawiki 1.7 (and better) you need to have PHP 5.0 installed !
== Running a mediawiki on your travel PC ==


From [http://tecfa.unige.ch/guides/tie/html/tie-wiki/tie-wiki.html]:
; If you want to clone a Mediawiki from your "real" server:
; Export / dump the database on your server
Export your database on the server and transfer the file to your PC (e.g. to c:\tmp\wikimedia.sql):
Export your database on the server and transfer the file to your PC
  mysqldump -p base_de_donnees > fichier.sql
  mysqldump -p base_de_donnees > fichier.sql
Example: mysqldump -p wikimedia > /tmp/wikimedia.sql
Example:  
mysqldump -p wikimedia > /tmp/wikimedia.sql


; Import the database in your PC
; Import the database in your PC
Firstly create a database on you PC-based MysQL server
Firstly create a database on you PC-based MysQL server


I suggest to use the command line to do the import, because file upload is limited in a typical PHP installation (else reconfigure the paramters in the php.ini file).
I suggest to use the command line to do the import, because file upload is limited in a typical PHP installation (else reconfigure the parameters in the php.ini file).


In EasyPHP 1.8 the mysql.exe program is here:
In EasyPHP 1.8 the mysql.exe program is here:
Line 52: Line 89:
  c:\wamp\mysql\bin\mysql.exe
  c:\wamp\mysql\bin\mysql.exe


Open a terminal (DOS window, command prompt, or whatever it is called) and type:
Open a terminal (DOS window, command prompt, or whatever it is called) and use this construct:
  mysql.exe base_de_donnees -u root -p < c:\tmp\wikimedia.sql  
  mysql.exe base_de_donnees -u root -p < path_to_sql_dump.sql
Example:
mysql.exe wikidb -u root -p < c:\tmp\wikimedia.sql  


Then wait a good moment ...
Then wait for a long moment ...


; Copy the MediaWiki server
; Copy the MediaWiki server


* Adapt LocalSettings.php
* I suggest to zip the files on the serveur and then dezip exactly in the same place
** Change the DataBase user and password (on the PC I simple use the root)
 
** change the IP Number
Then, adapt the LocalSettings.php file
** '''Vérifier''' le include path (les anciens, genre Mediawiki 1.5 était fait pour Unix)
** Change the DataBase user and password (on the PC I simply use the root)
$path = array( $IP, "$IP/includes", "$IP/languages" );
** You may have to ajust other things too, if you use short URLs on your production server, you may want to fix the Apache configuration on your PC too.
  set_include_path( implode( PATH_SEPARATOR, $path ) );
 
require_once( "includes/DefaultSettings.php" );
See [[ManageMediaWiki]], my somewhat disorganized English/French installation MediaWiki management notes.
 
== PHP/MySQL generators ==
 
These are tips to beginners with almost no php/mySQL skills.
 
Coding Php/MySQL/HTML requires expertise and in most cases it's not a good idea to try learning enough php just to build a simple data-base with a single table. In addition since nowadays all PHP web sites are under heavy attack by intrusion scripts there are security issues. Do never install any PHP application (e.g. a [[portalware]] that is older than 6 month and check the forums first. Make sure that there is a large user base.
 
If you need your own little database application:
 
* Firstly, try to see if you can't get the job done with a "web 2.0" database such as Zoho creator (See [[list of web 2.0 applications]])
 
* If you must create your own application, then try php/mysql generators. They can generate full code for simpler applications.
 
Here is a list (no endorsements so far):
 
; AppGini
* [http://www.bigprof.com/appgini/index.php AppGini].
* This is a Windows program. It creates php,mysql,html. The free version is functional, but has less features, e.g. project files can't be saved, 10 seconds waiting before it loads.
 
; PHP DataGrid
* [http://phpbuilder.blogspot.com/ PHP DataGrid].
These are server-side scripts that need moderate installation skills. Therefore needs apache/php/mysql installed.
 
; PHPRunner
* [http://xlinesoft.com/phprunner/index.htm PHPRunner]
* This is a windows program. PHPRunner builds visually appealing web interface for any local or remote MySQL, MS Access, SQL Server and Oracle databases. Your web site visitors will be able to easily search, add, edit, delete and export data in your database. Advanced security options allow to build password-protected members only Web sites easily. Provides fully-functional 21-day trial version.
 
; PHP Generator fo MySQL
* [http://www.sqlmaestro.com/products/mysql/phpgenerator/ PHP Generator for MySQL].
* This is a windows program. It will connect to a running MySQL/WAMP server (or a remote MySQL server for which you have access rights) and extract information from database tables you have to specify. It then will create the code that you can upload to a production server.
Works fine but with two smaller caveats:
* PHP code generated looks like this: <nowiki><? .... ?> </nowiki> instead of the correct <nowiki><?php .... ?> </nowiki>.
* There are font problems, i.e. some buttons in the margins only show partly.
 
; Web Form Generator
* [http://www.webformgenerator.com/ Web Form Generator]
(also [http://dbwizard.pages4u.net/download.php Php Database Wizard]). This is a Java application with a *.jar installer to create a edit/modify/view form for a table. Registration required.
 
Installation:
* Unzip first. If clicking on the *.jar fails, open a command window, go to the directory and type:
    java -jar install.exe
* However you still will be in trouble, e.g. you will have to start manually the application with the provided *.bat file in the applications directory. So rather just fix you Windows installation and associate *.jar files with Java.
If java is not found, then you need to download java from http://java.com/ and install it. It's useful to have in any case, since many educational applications are written in Java.
* For details, see the help. This application will generate several files. If you work with a local WAMP, just tell it the web directory where to put these (click on the tools icon).
DKS's option. A sleek application that works without any problems. Only caveat is that you likely have to add some code to protect your database. Easiest solution would be to use the servers .htaccess mechanism.
 
; Coffeecup
* [http://www.coffeecup.com/form-builder/ CoffeeCup Web Form Builder]
* Not tested, [[User:Daniel K. Schneider|Daniel K. Schneider]] is not exactly sure what it does, but might be a nice application.
* Commercial ($39), but free for high-schools.
 
; PHP Data Grid
[http://phpbuilder.blogspot.com/ PHP Builder]. DataGrid class for programmers ?
 
 


; Short URLs
[[Category: Installation tips]]


If you use short URLs on your production server, fix the Apache configuration on your PC too.
[[Category:databases]]
[[Category:AMP]]

Latest revision as of 19:52, 1 April 2011

Draft

Definition

The acronym WAMP (or Q.A.M.P.) refers to a set of free software programs commonly used together to run dynamic Web sites or servers:

  • Windows, the operating system;
  • Apache web server;
  • MySQL, the database management system
  • The PHP (and sometimes the Perl or Python) programming languages.

See LAMP, the original Linux-based solution

WAMP/MAMP products - Windows and Mac

For the Windows world there exist several complete packages that come with installers and a launch/stop/configure tool. Some also work for Linux, but I'd rather not use them on a real server.

WAMP5 / WAMPServer

  • WampServer
  • Also available on SourceForge (try this if the other is down)
  • Supports PHP 5x and MySQL 5x (16:16, 4 December 2006 (MET)).
  • This may be the best bet currently, but DSchneider didn't do any serious comparative testing, but it's the only one I was mostly happy with.
  • Only thing missing were some mysql excutables that some programs or yourself may need for command line operations (e.g. LAMS installer needs this).

EasyPHP

How to upgrade EasyPHP if you really need to

I once managed to upgrade PHP4.x to PHP5.x in Easyphp 1.8 (in nov 2006)

  • Empty the ./php directory and get PHP from PHP
  • Edit php.ini and explicitly load php_mysql (for the php 4 this was not necessary)
extensions_dir = "./ext"
extensions = php_mysql.dll

XAMPP

  • XAMPP
  • Also works fine, but this is more intrusive.

MAMP

  • MAMP for your MacIntosh
  • MAMP stands for: Macintosh, Apache, Mysql and PHP and can be used as light-weight developper's alternative to the built-in servers.

WAMP for Windows running from a memory stick

WAMP servers that run off a memory stick, your camera or any device that can act as an external drive for a device (usually a PC). Usually these distributions have less functionality, but take up less space and need no (or almost no) installation work. I tested both MoWes and Uniform and both work and are live projects - Daniel K. Schneider 11:09, 22 December 2009 (UTC).

I suggest always to decompress such distributions on a real hard desk and then transfer to a memory stick (to avoid write errors I ran into).

The Uniform server

The Uniform server is a combo of Apache Httpd Server, PHP, Perl, and MySQL. It comes in two variants (or more) and can be enhanced with extra plugins.

  • Version 5.5 release in dec 2009 is described like this: “The Uniform Server is a lightweigt server solution for running a web server under the WindowsOS. 8.78MiB! It includes the latest versions of Apache2, Perl5, PHP5, MySQL5, phpMyAdmin and ... NO INSTALLATION REQUIRED! NO REGISTRY DUST! Just UNPACK and RUN!”
  • Plugins exist, e.g. for a Tomcat server, an FTP server etc.!
  • The Uniform Server Homepage homepage, downloads (on sourceforge).
  • Uniform wiki (documentation)

MoWes

  • See the Modular Webserver System article. For beginners working under Windows, this system is probably the easiest way for playing with a WAMP and some portalware. Several popular CMSs can be download and installed automatically - Daniel K. Schneider 17:18, 15 January 2010 (UTC).

Distributions of ready-to-run portals

There exist some distributions for packages like Drupal, Joomla etc. and that you can run usually directly from a memory stick or any other drive.

  • E.g. * JSAS Joomla! StandAlone Server.
  • Otherwise, packages like WOS do include preconfigured servers

Running a mediawiki on your travel PC

If you want to clone a Mediawiki from your "real" server

Export your database on the server and transfer the file to your PC (e.g. to c:\tmp\wikimedia.sql):

mysqldump -p base_de_donnees > fichier.sql

Example:

mysqldump -p wikimedia > /tmp/wikimedia.sql
Import the database in your PC

Firstly create a database on you PC-based MysQL server

I suggest to use the command line to do the import, because file upload is limited in a typical PHP installation (else reconfigure the parameters in the php.ini file).

In EasyPHP 1.8 the mysql.exe program is here:

\program files\Easyphp-XX\mysql\bin\mysql.exe

In WAMP 5, the file is here:

c:\wamp\mysql\bin\mysql.exe

Open a terminal (DOS window, command prompt, or whatever it is called) and use this construct:

mysql.exe base_de_donnees -u root -p < path_to_sql_dump.sql

Example:

mysql.exe wikidb -u root -p < c:\tmp\wikimedia.sql 

Then wait for a long moment ...

Copy the MediaWiki server
  • I suggest to zip the files on the serveur and then dezip exactly in the same place

Then, adapt the LocalSettings.php file

    • Change the DataBase user and password (on the PC I simply use the root)
    • You may have to ajust other things too, if you use short URLs on your production server, you may want to fix the Apache configuration on your PC too.

See ManageMediaWiki, my somewhat disorganized English/French installation MediaWiki management notes.

PHP/MySQL generators

These are tips to beginners with almost no php/mySQL skills.

Coding Php/MySQL/HTML requires expertise and in most cases it's not a good idea to try learning enough php just to build a simple data-base with a single table. In addition since nowadays all PHP web sites are under heavy attack by intrusion scripts there are security issues. Do never install any PHP application (e.g. a portalware that is older than 6 month and check the forums first. Make sure that there is a large user base.

If you need your own little database application:

  • If you must create your own application, then try php/mysql generators. They can generate full code for simpler applications.

Here is a list (no endorsements so far):

AppGini
  • AppGini.
  • This is a Windows program. It creates php,mysql,html. The free version is functional, but has less features, e.g. project files can't be saved, 10 seconds waiting before it loads.
PHP DataGrid

These are server-side scripts that need moderate installation skills. Therefore needs apache/php/mysql installed.

PHPRunner
  • PHPRunner
  • This is a windows program. PHPRunner builds visually appealing web interface for any local or remote MySQL, MS Access, SQL Server and Oracle databases. Your web site visitors will be able to easily search, add, edit, delete and export data in your database. Advanced security options allow to build password-protected members only Web sites easily. Provides fully-functional 21-day trial version.
PHP Generator fo MySQL
  • PHP Generator for MySQL.
  • This is a windows program. It will connect to a running MySQL/WAMP server (or a remote MySQL server for which you have access rights) and extract information from database tables you have to specify. It then will create the code that you can upload to a production server.

Works fine but with two smaller caveats:

  • PHP code generated looks like this: <? .... ?> instead of the correct <?php .... ?> .
  • There are font problems, i.e. some buttons in the margins only show partly.
Web Form Generator

(also Php Database Wizard). This is a Java application with a *.jar installer to create a edit/modify/view form for a table. Registration required.

Installation:

  • Unzip first. If clicking on the *.jar fails, open a command window, go to the directory and type:
   java -jar install.exe
  • However you still will be in trouble, e.g. you will have to start manually the application with the provided *.bat file in the applications directory. So rather just fix you Windows installation and associate *.jar files with Java.

If java is not found, then you need to download java from http://java.com/ and install it. It's useful to have in any case, since many educational applications are written in Java.

  • For details, see the help. This application will generate several files. If you work with a local WAMP, just tell it the web directory where to put these (click on the tools icon).

DKS's option. A sleek application that works without any problems. Only caveat is that you likely have to add some code to protect your database. Easiest solution would be to use the servers .htaccess mechanism.

Coffeecup
PHP Data Grid

PHP Builder. DataGrid class for programmers ?