JanTvrdik / PhpVersionSwitcher

Simple and straightforward C# app for switching PHP versions
35 stars 4 forks source link

Easier major PHP version switching #14

Closed ViliamKopecky closed 9 years ago

ViliamKopecky commented 9 years ago
# httpd.conf

LoadModule php5_module "C:/utils/php/php/active/php5apache2_4.dll"
#LoadModule php7_module "C:/utils/php/php/active/php7apache2_4.dll"

maybe like this?

# httpd.conf

LoadModule php%phpVersionMajor%_module "C:/utils/php/php/active/php%phpVersionMajor%apache2_4.dll"
JanTvrdik commented 9 years ago

I personally solved this by switching from mod_php to fastcgi because I was lazy to solve it properly.

LoadModule fcgid_module modules/mod_fcgid.so
FcgidInitialEnv PATH "C:/Web/Soft/PHP/active;C:/Windows/system32;C:/Windows;C:/Windows/System32/Wbem;"
FcgidInitialEnv SystemRoot "C:/Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:/Windows/Temp"
FcgidInitialEnv TMP "C:/Windows/Temp"
FcgidInitialEnv windir "C:/Windows"
FcgidIOTimeout 3600
FcgidConnectTimeout 16
FcgidMaxRequestsPerProcess 100000000
FcgidMaxProcesses 50
FcgidMaxRequestLen 813107200
FcgidInitialEnv PHPRC "C:/Web/Soft/PHP/active"
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 100000000

<Files ~ "\.php$>"
  AddHandler fcgid-script .php
  FcgidWrapper "C:/Web/Soft/PHP/active/php-cgi.exe" .php
</Files>