WAMP: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
 
Line 7: Line 7:
* Apache, the Web server;
* Apache, the Web server;
* [[MySQL]], the database management system
* [[MySQL]], the database management system
* Perl, PHP, or Python programming languages.
* The [[PHP]] (and sometimes the Perl or Python) programming languages.


See [[LAMP]], the original Linux-based solution
See [[LAMP]], the original Linux-based solution
Line 13: Line 13:
== WAMP for Windows products ==
== WAMP for Windows products ==


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.


== Running a mediawiki on your travail PC ==
=== EasyPHP ===
* [[http://www.easyphp.org/ Easy PHP]].
* Used to be a good package, but supports older versions of PHP and MySQL


* Attention, il faut PHP 5.x pour Mediawiki 1.7 !!
; Upgrade of EasyPHP
** Easyphp ne le fait pas, mais on peut upgrader:
Easyphp 1.8 (current on 16:11, 4 December 2006 (MET)) does only PHP 4, but you can upgrade:
** Vider le répertoire ./php et ensuite le remplir avec le zip: http://www.php.net/downloads.php
* Empty the ./php directory and http://www.php.net/downloads.php
** IMPORTANT: Il faut editer php.ini et charger '''explicitement''' php_mysql (pour php 4 c'était pas le cas)
** IMPORTANT: 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
 
* cela marche, c.f. http://tecfa.unige.ch/guides/tie/html/tie-wiki/tie-wiki.html
=== WAMP5 / WAMPServer ===
* D'abord exporter (cf. ci-dessus) et importer la base de données
 
* [[http://www.wampserver.com WampServer]] (also on SourceForge)
* 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 ==
 
To run Mediawiki 1.7 (and better) you need to have PHP 5.0 installed !
 
From [http://tecfa.unige.ch/guides/tie/html/tie-wiki/tie-wiki.html]:
; Export / dump the database on your server
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
  par ex. mysqldump -p wikimedia > /tmp/wikimedia.sql
  Example: mysqldump -p wikimedia > /tmp/wikimedia.sql
** Ensuite transférer sur le PC.
 
* Importation:
; Import the database in your PC
** Je suggère d'utiliser mysql en ligne de commande (alternativement augmenter LARGEMENT tous les paramètres dans php.ini)
Firstly create a database on you PC-based MysQL server
** Se trouve dans c:\program files\Easyphp-XX\mysql\bin\mysql.exe
 
  mysql.exe base_de_donnees -u root -p < c:\tmp\wikimedia.sql               ... attendre un bon moment ;)
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).
* Ensuite copier les fichiers PHP
 
* Adapter LocalSettings.php
In EasyPHP 1.8 the mysql.exe program is here:
** changer mot de passe de la bd (j'utilise root sur mon pc ... juste pour jouer ca va)  
\program files\Easyphp-XX\mysql\bin\mysql.exe
** changer $IP
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 type:
  mysql.exe base_de_donnees -u root -p < c:\tmp\wikimedia.sql  
 
Then wait a good moment ...
 
; Copy the MediaWiki server
 
* Adapt LocalSettings.php
** Change the DataBase user and password (on the PC I simple use the root)
** change the IP Number
** '''Vérifier''' le include path (les anciens, genre Mediawiki 1.5 était fait pour Unix)
** '''Vérifier''' le include path (les anciens, genre Mediawiki 1.5 était fait pour Unix)
  $path = array( $IP, "$IP/includes", "$IP/languages" );
  $path = array( $IP, "$IP/includes", "$IP/languages" );
  set_include_path( implode( PATH_SEPARATOR, $path ) );
  set_include_path( implode( PATH_SEPARATOR, $path ) );
  require_once( "includes/DefaultSettings.php" );
  require_once( "includes/DefaultSettings.php" );
* Finalement faire des alias Apache s'il en a (sinon ca crée un problème je pense)
 
; Short URLs
 
If you use short URLs on your production server, fix the Apache configuration on your PC too.

Revision as of 17:11, 4 December 2006

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, the 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 for Windows products

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.

EasyPHP

  • [Easy PHP].
  • Used to be a good package, but supports older versions of PHP and MySQL
Upgrade of EasyPHP

Easyphp 1.8 (current on 16:11, 4 December 2006 (MET)) does only PHP 4, but you can upgrade:

extensions_dir = "./ext"
extensions = php_mysql.dll

WAMP5 / WAMPServer

  • [WampServer] (also on SourceForge)
  • Supports PHP 5x and MySQL 5x (16:11, 4 December 2006 (MET)).
  • This may be the best bet, but DSchneider didn't do any serious testing.

Running a mediawiki on your travail PC

To run Mediawiki 1.7 (and better) you need to have PHP 5.0 installed !

From [1]:

Export / dump the database on your server

Export your database on the server and transfer the file to your PC

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 paramters 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 type:

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

Then wait a good moment ...

Copy the MediaWiki server
  • Adapt LocalSettings.php
    • Change the DataBase user and password (on the PC I simple use the root)
    • change the IP Number
    • Vérifier le include path (les anciens, genre Mediawiki 1.5 était fait pour Unix)
$path = array( $IP, "$IP/includes", "$IP/languages" );
set_include_path( implode( PATH_SEPARATOR, $path ) );
require_once( "includes/DefaultSettings.php" );
Short URLs

If you use short URLs on your production server, fix the Apache configuration on your PC too.