Installing Pika On Windows
From PikaDocs
This isn't really a HOWTO, just some notes I kept on installing Pika on a Windows 2000 server.
- Install and configure OS, etc.
- Installed MySQL 4.1. graphical installer, very easy, chose Typical install. After the install is done, a graphical configurator runs, I chose standard config. Don�t grant root access from other machines. Root password gets stored in plain text in pika settings file so use something not valuable but not guessable
Best practice?:create a separate MySQL login account for Pika instead of root and grant more restrictive permissions?
- Apache 2.0.54 from the MSI package, does not have SSL support. (will try add-on later). Graphical installer, didn't have to choose anything.
- PHP 5 - install manually.
There are some instructions here: [1] (http://www.php.net/manual/en/install.windows.manual.php)
Unzip .zip package to c:\php
copy php_mysql.dll out of c:\php\ext into c:\php
copy libmysql.dll from c:\php into c:\winnt
(we want php to run as an apache MODULE, not as a cgi.)
- Copy php.ini-recommended to php.ini and edit:
doc_root = "c:\phpweb" ; extension_dir = "c:\php" extension=php_mysql.dll ; uncomment this line include_path=".;c:\phpweb" register_globals = On
(are those last 2 still necessary ?)
I also recommend you comment out the default error log settings by putting a semicolon in front of it like so:
; error_reporting = E_ALL
and instead add this line:
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
This will log many fewer PHP errors in your Apache error.log. On our installation at least, I've noticed Pika throws lots of PHP errors like this but still work fine:
PHP Notice: Undefined index: lsc_elig in C:\\www\\phpweb\\pika_cms.php on line 1115, referer: http://pika/matter.php?case_id=20&screen=act
Now move php.ini to c:\winnt or wherever your windows directory is
- edits to httpd.conf:
DocumentRoot "C:/phpweb" <Directory "C:/phpweb"> (Note: Don;t change the section beginning with: <Directory />) AddType application/x-httpd-php .php LoadModule php5_module "c:/php/php5apache2.dll" #DirectoryIndex index.html index.html.var ## comment out this existing line DirectoryIndex index.php
- Create directory c:\phpweb (need this before Apache will start)
- Follow Aaron's instructions to install Pika itself:
move the files in www directory to c:\phpweb start the sql service or start it manually login to mysql with mysql -u root -p issue this command: CREATE DATABASE pika; (semicolon is important) then issue: show databases; that should show you if it is there
Now, with the Pika sql files do the following: create a subdirectory pika under c:\mysql\bin and move the sql files in. then: mysql -u root -p -D pika < pika\structure.sql ""default-groups.sql ""default-user.sql ""menus.sql "'reset-counters.sql
log into mysql use pika UPDATE users SET password=MD5('password') WHERE username='amworley'; (this is for web user) edit the c:\phpweb\app\config\settings.php file for pika to reflect the new password and file paths NOTE: in the settings.php file the username and password are for mysql The username and password in the table users in the database pika are for actually logging into pika at the web screen
<snipped from settings.php>:
'db_name' => 'pika', 'db_password' => 'password',
How to change root Mysql password:
update mysql.user set Password=PASSWORD('your_new_root_password') where User='root' and Host='localhost';
flush privileges;
quit;
- Edit the pika settings.php file
'base_url' => 'http://servername', 'base_directory1' => 'c:/phpweb', 'docs_directory1' => 'c:/phpweb/doc_storage', 'base_directory' => 'c:/phpweb', 'docs_directory' => 'c:/phpweb/doc_storage',
(Need forward slashes even on Windows)
- Check on NTFS file security on pika files - need to lock down better
- web server SSL (haven't done this yet, we are running it entirely inside the firewall. Somebody fill in details here if you are doing it.)
- Set the Apache server to run as a user account instead of LocalSystem depending on your needs. You can then lock down this user a bit more if you want. However, make sure the user can write files to c:\program files\apache group and all subdirectories and files so it can write log files (or give it write permission more specifically only to the logs directory - I think that will work but didn't try it)
- experimenting with log rotation in httpd.conf:
CustomLog "|\"c:/Program Files/Apache Group/Apache2/bin/rotatelogs.exe\" \"c:/Program Files/Apache Group/Apache2/logs/access.%d.log\" 86400" common ErrorLog "|\"c:/Program Files/Apache Group/Apache2/bin/rotatelogs.exe\" \"c:/Program Files/Apache Group/Apache2/logs/error.%d.log\" 86400"
phpMyAdmin
Instructions here (http://www.devside.net/web/server/windows/phpmyadmin) for installing phpMyAdmin on Windows box.
