2543
Comment:
|
← Revision 12 as of 2009-02-13 17:14:47 ⇥
3860
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
Go to http://httpd.apache.org/download.cgi and download the latest stable version. For example, the installer for Version 2.2.4 was called apache_2.2.4-win32-x86-no_ssl.msi. Specify an arbitrary target directory; for the following description we will assume | Go to http://httpd.apache.org/download.cgi and download the latest stable version. Specify an arbitrary target directory; for the following description we will assume |
Line 13: | Line 13: |
Go to http://www.php.net/downloads.php and download the latest stable version. For example, the zip package for version 5.1.6 was called php-5.1.6-Win32.zip. Specify an arbitrary target directory; for the following description we will assume | Go to http://www.php.net/downloads.php and download the latest stable version. Specify an arbitrary target directory; for the following description we will assume |
Line 19: | Line 19: |
'''Note:''' There might not be a compatible PHP handler for the latest stable PHP version. In that case you might have to install an older version of PHP, which can be found under http://www.php.net/releases/index.php === 3. Install the Apache PHP Handler for Windows === Go to http://www.apachelounge.com/download and download the Apache PHP handler. For example, The Apache 2 handler for PHP version 5.1 (it's enough if the first two digits agree) is called php5apache2.dll-php5.1.x.zip Copy the following files from this package to the following locations (assuming that Apache and PHP have been installed in the directories as stated above): |
You will be asked with which (version of which) web server you want to run PHP. Select Apache 2.2 + specify the directory of the configuration file when asked: |
Line 28: | Line 22: |
C:\Program Files\CompleteSearch\Apache2.2\bin\hpptd.exe.manifest (TODO: needed for what?) C:\Program Files\CompleteSearch\Apache2.2\conf\httpd.conf.templ (TODO: needed for what?) C:\Program Files\CompleteSearch\php5\php5apache2.dll (TODO: why necessary if one is already there?) |
C:\Program Files\CompleteSearch\Apache2.2\conf |
Line 33: | Line 25: |
=== 4. Configure Apache + PHP and test it === | The installer will then automatically edit the httpd.conf config file, so that Apache will run with PHP. You will also be asked which non-standard extensions you want to be enabled. Specify the following: {{{ mb_string }}} === 3. Configure Apache + PHP and test it === |
Line 44: | Line 44: |
ServerRoot "C:/Program Files/CompleteSearch/Apache2.2" Listen 8080 LoadModule php5_module "C:/Program Files/CompleteSearch/php5/php5apache2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/Program Files/CompleteSearch/php5" DocumentRoot "C:/Program Files/CompleteSearch/www" <Directory "C:/Program Files/CompleteSearch/www"> Options Indexes FollowSymLinks Order allow,deny Allow from all </Directory> <IfModule dir_module> DirectoryIndex index.html index.php </IfModule> |
|
Line 45: | Line 59: |
In the PHP config file {{{ C:\Program Files\CompleteSearch\php5\php.ini }}} add/modify the following lines: {{{ display_errors = On log_errors = On error_log = "C:/Program Files/CompleteSearch/php5/error.log" extension_dir = "C:\opt\php5\ext" extension=php_mbstring.dll }}} Test your setup by creating the following file (assuming a cygwin shell). TODO: test should use mb_string! {{{ cd /cygdrive/c/Program Files/CompleteSearch mkdir www cd www echo "<?php echo mb_strtolower(\"HI!\", \"utf-8\"); ?>" > test.php chmod 644 test.php }}} and then viewing the following URL in your browser (it should say "hi!") {{{ http://localhost:8080/test.php }}} TODO: troubleshooting! |
|
Line 53: | Line 101: |
TODO: rename + move the directory cd XXX make startCompletionServer |
mv autocompletion bin cd bin make |
Line 61: | Line 109: |
cd /cygdrive/c/Program Files/CompleteSearch cvs checkout -d hannah@contact.mpi-sb.mpg.de:/KM/ir/CVS autocompletion TODO: rename + move directory |
cd /cygdrive/c/Program Files/CompleteSearch/www cvs -d hannah@contact.mpi-sb.mpg.de://KM/ir/CVS checkout autocomplete-php |
Line 66: | Line 113: |
4.3 Check out a UI instance as follows | 4.3 Create a UI instance as follows {{{ cd /cygdrive/c/Program Files/CompleteSearch/www mkdir test cd autocomplete-php cp -a index.php autocomplete_config.php *.css images ../test cd ../test vim autocomplete_config.php }}} In autocomplete_config.php edit the following lines {{{ $config->autocomplete_path = "/autocomplete-php/autocomplete/"; $config->port = "8888"; $config->access_log = "C:\Program Files\CompleteSearch\log\completesearch.access_log"; $config->error_log = "C:\opt\Program Files\log\completesearch.error_log"; }}} 4.4 Test the UI Start an instance of the completion server. TODO: provide a test database with the source code! {{{ cd /cygdrive/c/Program Files/CompleteSearch/bin startCompletionServer.exe -Z test.hybrid }}} Point your browser to the following URL {{{ http://localhost:8080/test/index.php }}} |
How to install Apache + PHP on Windows for CompleteSearch
1. Install Apache 2.x for Windows
Go to http://httpd.apache.org/download.cgi and download the latest stable version. Specify an arbitrary target directory; for the following description we will assume
C:\Program Files\CompleteSearch\Apache2.2
2. Install PHP 5.x for Windows
Go to http://www.php.net/downloads.php and download the latest stable version. Specify an arbitrary target directory; for the following description we will assume
C:\Program Files\CompleteSearch\php5
You will be asked with which (version of which) web server you want to run PHP. Select Apache 2.2 + specify the directory of the configuration file when asked:
C:\Program Files\CompleteSearch\Apache2.2\conf
The installer will then automatically edit the httpd.conf config file, so that Apache will run with PHP.
You will also be asked which non-standard extensions you want to be enabled. Specify the following:
mb_string
3. Configure Apache + PHP and test it
In the Apache config file
C:\Program Files\CompleteSearch\Apache2.2\conf\httpt.conf
add/change the following lines
ServerRoot "C:/Program Files/CompleteSearch/Apache2.2" Listen 8080 LoadModule php5_module "C:/Program Files/CompleteSearch/php5/php5apache2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/Program Files/CompleteSearch/php5" DocumentRoot "C:/Program Files/CompleteSearch/www" <Directory "C:/Program Files/CompleteSearch/www"> Options Indexes FollowSymLinks Order allow,deny Allow from all </Directory> <IfModule dir_module> DirectoryIndex index.html index.php </IfModule>
In the PHP config file
C:\Program Files\CompleteSearch\php5\php.ini
add/modify the following lines:
display_errors = On log_errors = On error_log = "C:/Program Files/CompleteSearch/php5/error.log" extension_dir = "C:\opt\php5\ext" extension=php_mbstring.dll
Test your setup by creating the following file (assuming a cygwin shell). TODO: test should use mb_string!
cd /cygdrive/c/Program Files/CompleteSearch mkdir www cd www echo "<?php echo mb_strtolower(\"HI!\", \"utf-8\"); ?>" > test.php chmod 644 test.php
and then viewing the following URL in your browser (it should say "hi!")
http://localhost:8080/test.php
TODO: troubleshooting!
4. Install CompleteSearch
4.1 Check out the CompleteSearch source code as follows (assuming the choice of directories above and that you are in a cygwin shell):
cd /cygdrive/c/Program Files/CompleteSearch svn co svn+ssh://hannah@contact.mpi-sb.mpg.de/KM/ir/SVN/autocompletion mv autocompletion bin cd bin make
4.2 Check out the CompleteSearch UI code as follow:
cd /cygdrive/c/Program Files/CompleteSearch/www cvs -d hannah@contact.mpi-sb.mpg.de://KM/ir/CVS checkout autocomplete-php
4.3 Create a UI instance as follows
cd /cygdrive/c/Program Files/CompleteSearch/www mkdir test cd autocomplete-php cp -a index.php autocomplete_config.php *.css images ../test cd ../test vim autocomplete_config.php
In autocomplete_config.php edit the following lines
$config->autocomplete_path = "/autocomplete-php/autocomplete/"; $config->port = "8888"; $config->access_log = "C:\Program Files\CompleteSearch\log\completesearch.access_log"; $config->error_log = "C:\opt\Program Files\log\completesearch.error_log";
4.4 Test the UI
Start an instance of the completion server. TODO: provide a test database with the source code!
cd /cygdrive/c/Program Files/CompleteSearch/bin startCompletionServer.exe -Z test.hybrid
Point your browser to the following URL
http://localhost:8080/test/index.php