Dont put PHP version in the code

Instead, replace it at build time so it's easy to change
This commit is contained in:
Daniel Berteaud 2017-07-18 10:08:14 +02:00
parent d4a869809e
commit 643b19194d
3 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ if ($fastcgi_mod eq 'mod_fastcgi'){
$OUT .=<<_EOF;
Action phpdokuwiki-fastcgi /php-cgi-bin/phpdokuwiki-wrapper
Alias /php-cgi-bin/phpdokuwiki-wrapper /var/www/php-cgi-bin/phpdokuwiki-wrapper
FastCgiExternalServer /var/www/php-cgi-bin/phpdokuwiki-wrapper -socket /var/run/php-fpm/php71-dokuwiki.sock -pass-header Authorization -idle-timeout 120
FastCgiExternalServer /var/www/php-cgi-bin/phpdokuwiki-wrapper -socket /var/run/php-fpm/php__PHP_VERSION__-dokuwiki.sock -pass-header Authorization -idle-timeout 120
_EOF
}
}

View File

@ -26,7 +26,7 @@ _EOF
elsif ($fastcgi_mod eq 'mod_proxy_fcgi'){
$php =<<_EOF;
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php-fpm/php71-dokuwiki.sock|fcgi://localhost"
SetHandler "proxy:unix:/var/run/php-fpm/php__PHP_VERSION__-dokuwiki.sock|fcgi://localhost"
</FilesMatch>
_EOF
}

View File

@ -1,6 +1,6 @@
{
if ($PHP_VERSION eq '71'){
if ($PHP_VERSION eq '__PHP_VERSION__'){
if (($dokuwiki{'status'} || 'disabled') eq 'enabled'){
my $max_upload_size = ($dokuwiki{MaxUploadSize} || '20') . 'M';
my $id = 'dokuwiki';