Author |
|
amichelins
Joined: 03 Aug 2017 Posts: 3 Location: Brazil
|
Posted: Thu 03 Aug '17 13:38 Post subject: Hot configure two php versions in apache |
|
|
I need have two php vercions of php in apache.
I try this
Code: |
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "F:/webroot"
ServerName localhost
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
# Modulo PHP
LoadModule php5_module "F:/php646/php5apache2_4.dll"
<IfDefine php56>
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "F:/php646"
</IfDefine>
</VirtualHost>
<VirtualHost *:8081>
ServerAdmin amichelins@hotmail.com
DocumentRoot "F:/webroot/ws/web"
ServerName localhost:8081
ErrorLog "C:/httpd/apache24/logs/error_ws.log"
#TransferLog "C:/httpd/apache24/logs/access_logs_ws"
# Modulo PHP
LoadModule php7_module "F:/php64/php7apache2_4.dll"
<IfDefine php71>
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "F:/php64"
</IfDefine>
</VirtualHost>
|
Can you help my?
Thanks in advance |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
|
Back to top |
|
amichelins
Joined: 03 Aug 2017 Posts: 3 Location: Brazil
|
Posted: Thu 03 Aug '17 16:10 Post subject: |
|
|
I try that configuration ( https://www.apachelounge.com/viewtopic.php?t=6615 ) but geave me this error:
AH00526: Syntax error on line 60 of C:/httpd/Apache24/conf/extra/httpd-vhosts.conf:
Only first PHPINIDir directive honored per configuration tree - subsequent ones ignored
If i comment out PHPINIDir apache stars, but only one php is active, the first. |
|
Back to top |
|
admin Site Admin
Joined: 15 Oct 2005 Posts: 692
|
|
Back to top |
|
amichelins
Joined: 03 Aug 2017 Posts: 3 Location: Brazil
|
Posted: Thu 03 Aug '17 19:03 Post subject: |
|
|
Each post uses fastcgi, i use php module, that is load ones, and stay in memory until apache shutdowns |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 03 Aug '17 19:08 Post subject: |
|
|
You can load only one mod_php at the time. That is why Steffen posted the link to the mod_fcgid solutions. |
|
Back to top |
|