This is the installation and configuration of the dokuwiki development platform on Windows that we use.
We are not working with WSL or any docker anymore because it causes too much pain for little improvement. ie:
This is a sort of keep it simple by staying with the smallest tech stack as possible.
The PHP version is the lowest supported by Dokuwiki which is 7.4.20 (See splitbrain/dokuwiki/blob/stable/.travis.yml) This is also the lowest version supported by webhosting provider such as OVH.
For the version 7.4.20:
php.exe -i > phpinfo.txt
Add in the PATH the php directory
Optional
; some compilation needs the whole path for the extension dir
; extension_dir = "c:/php-7.2.28-Win32-VC15-x64/ext"
; some compilation (ie apache.dll) does not need the extension dir (ie 7)
extension_dir = "ext"
[PHP]
; for image
extension=gd2
; for composer
extension=curl
extension=fileinfo
extension=mbstring
extension=pdo_sqlite
; openssl (ie fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?)
extension=openssl
; for locale
extension=intl
You can check if they are loaded with:
php -m
and with apache via a phpinfo web page:
This section is a summary of the article Xdebug for php 7.4
To enable Xdebug on a dokuwiki devel computer:
[Xdebug]
zend_extension = xdebug
# zend_extension=C:\php-7.4.20-Win32-VC15-x64\ext\php_xdebug-3.1.16-7.4-vc15-x86_64.dll
; enable the debugger
xdebug.mode=debug
; Xdebug 3 - default debugging port has changed from 9000 to 9003.
xdebug.client_port=9003
cd yourProject
wget -O phpunit.phar https://phar.phpunit.de/phpunit-7.phar
optional
Install
Apache installation, virtual host and php configuration
Create the virtual host to the dokuwiki root.
Example:
<VirtualHost *:80>
DocumentRoot "d:/dokuwiki"
ServerName doku
DirectoryIndex index.php
ErrorLog "logs/doku.com-error.log"
CustomLog "logs/doku.com-access.log" common
<Directory "d:/dokuwiki/" >
Require all granted
AllowOverride All
Options Indexes FollowSymLinks Includes ExecCGI
</Directory>
</VirtualHost>
You need to clone it in order to get the dokuwiki test class.
git clone git://github.com/splitbrain/dokuwiki.git .
Go to: http://VitrualHost/install.php to configure it
Go to the configuration manager:
Install Stale to stale the cache easily.
Because we are the authors, we clone it.
cd $DOKUWIKI\lib\plugins
git clone https://github.com/ComboStrap/stale
See also the dokuwiki documentation
Set the php interpreter to 7.1
Phpunit Settings: To run individual test file on plugin:
Then:
Add Jquery as library:
extension=mbstring
; extension_dir="ext"