Results 1 to 3 of 3

Thread: How to use a different PHP version on a subdomain with custombuild 2?

  1. #1
    Join Date
    Dec 2004
    Posts
    11

    How to use a different PHP version on a subdomain with custombuild 2?

    Hi all,

    I am trying to get PHP7.1 working on a subdomain. Default is PHP5.5 for that domain.
    I use custombuild 2 and when I use the PHP selector to change the PHP version for the domain it works as expected. But I need PHP 7.1 for the subdomain new.domain.com and not the default PHP 5.5 for testing.

    I have this in de options.conf

    #PHP Settings
    php1_release=5.5
    php1_mode=mod_php
    php2_release=7.1
    php2_mode=php-fpm


    I have tried adding this to the custom hhtpd.conf of that domain.

    Code:
    <Directory |DOCROOT|/new/>
       <FilesMatch "\.(inc|php|phtml|phps|php|PHP2_RELEASE|)$">
          AddHandler "proxy:unix:/usr/local/php|PHP2_RELEASE|/sockets/|USER|.sock|fcgi://localhost" .php|PHP2_RELEASE|
       </FilesMatch>
     </Directory>
    According to a forum post here, but is does not work, running phpinfo on the new subdomain it gives me still PHP 5.5

    I think I am doing something wrong... But what?

    Who can point me in the right direction.
    Last edited by pinooo; 11-05-2018 at 12:14 PM.

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,498
    Hello,

    Try

    Code:
    <Directory |DOCROOT|/new/>
       <FilesMatch "\.(inc|php|phtml|phps|php|PHP2_RELEASE|)$">
          AddHandler "proxy:unix:/usr/local/php|PHP2_RELEASE|/sockets/|USER|.sock|fcgi://localhost" .php
       </FilesMatch>
     </Directory>

  3. #3
    Join Date
    Dec 2004
    Posts
    11
    Whoohoo,

    That did the trick! Thnx!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •