logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: Hot configure two php versions in apache
Author
amichelins



Joined: 03 Aug 2017
Posts: 3
Location: Brazil

PostPosted: Thu 03 Aug '17 13:38    Post subject: Hot configure two php versions in apache Reply with quote

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

PostPosted: Thu 03 Aug '17 13:43    Post subject: Reply with quote

Have a look at https://www.apachelounge.com/viewtopic.php?t=6615
Back to top
amichelins



Joined: 03 Aug 2017
Posts: 3
Location: Brazil

PostPosted: Thu 03 Aug '17 16:10    Post subject: Reply with quote

Steffen wrote:
Have a look at https://www.apachelounge.com/viewtopic.php?t=6615


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

PostPosted: Thu 03 Aug '17 16:47    Post subject: Reply with quote

More Posts :

https://www.apachelounge.com/viewtopic.php?t=6928
Back to top
amichelins



Joined: 03 Aug 2017
Posts: 3
Location: Brazil

PostPosted: Thu 03 Aug '17 19:03    Post subject: Reply with quote

admin wrote:
More Posts :

https://www.apachelounge.com/viewtopic.php?t=6928


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: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 03 Aug '17 19:08    Post subject: Reply with quote

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


Reply to topic   Topic: Hot configure two php versions in apache View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules