PHP Selector doesn't work in some case

Now, the same template files has a few different versions. The 2nd one is

Code:
|*if HAVE_PHP1_FPM="1"|
        <IfModule mod_fastcgi.c>
                AddHandler php|PHP1_RELEASE|-fcgi .php
                Action php|PHP1_RELEASE|-fcgi /php|PHP1_RELEASE|-fcgi
                Alias /php|PHP1_RELEASE|-fcgi |DOCROOT|/php|PHP1_RELEASE|-fpm
                FastCgiExternalServer |DOCROOT|/php|PHP1_RELEASE|-fpm -idle-tim$
        </IfModule>
|*endif|

[B]|*if HAVE_PHP1_FPM="2"|[/B]
        <IfModule mod_fastcgi.c>
                AddHandler php|PHP2_RELEASE|-fcgi .php|PHP2_RELEASE|
                Action php|PHP2_RELEASE|-fcgi /php|PHP2_RELEASE|-fcgi
                Alias /php|PHP2_RELEASE|-fcgi |DOCROOT|/php|PHP2_RELEASE|-fpm
                FastCgiExternalServer |DOCROOT|/php|PHP2_RELEASE|-fpm -idle-tim$
        </IfModule>
|*endif|

And the 3rd one [Last edited by smtalk; 06-28-2013 at 11:31 AM.] is

Code:
|*if HAVE_PHP1_FPM="1"|
        <IfModule mod_fastcgi.c>
                AddHandler php|PHP1_RELEASE|-fcgi .php
                Action php|PHP1_RELEASE|-fcgi /php|PHP1_RELEASE|-fcgi
                Alias /php|PHP1_RELEASE|-fcgi |DOCROOT|/php|PHP1_RELEASE|-fpm
                FastCgiExternalServer |DOCROOT|/php|PHP1_RELEASE|-fpm -idle-tim$
        </IfModule>
|*endif|

[B]|*if HAVE_PHP2_FPM="1"|[/B]
        <IfModule mod_fastcgi.c>
                AddHandler php|PHP2_RELEASE|-fcgi .php|PHP2_RELEASE|
                Action php|PHP2_RELEASE|-fcgi /php|PHP2_RELEASE|-fcgi
                Alias /php|PHP2_RELEASE|-fcgi |DOCROOT|/php|PHP2_RELEASE|-fpm
                FastCgiExternalServer |DOCROOT|/php|PHP2_RELEASE|-fpm -idle-tim$
        </IfModule>
|*endif|

This cause different in httpd.conf. The 3rd version cause the httpd.conf to write the config twice as below :

Code:
        <IfModule mod_fastcgi.c>
                AddHandler php55-fcgi .php
                Action php55-fcgi /php55-fcgi
                Alias /php55-fcgi /home/xxx/domains/xxx.com/public_html$
                FastCgiExternalServer /home/xxx/domains/xxx.com/public_$
        </IfModule>



        <IfModule mod_fastcgi.c>
                AddHandler php53-fcgi .php53
                Action php53-fcgi /php53-fcgi
                Alias /php53-fcgi /home/xxx/domains/xxx.com/public_html$
                FastCgiExternalServer /home/xxx/domains/xxx.com/public_$
        </IfModule>

The 2nd version will have only the line below :

Code:
        <IfModule mod_fastcgi.c>
                AddHandler php55-fcgi .php
                Action php55-fcgi /php55-fcgi
                Alias /php55-fcgi /home/xxx/domains/xxx.com/public_html$
                FastCgiExternalServer /home/xxx/domains/xxx.com/public_$
        </IfModule>

I'm not sure if this make any different and cause the problem when using mod_fcgid + PHP-FPM. (Already switched to both PHP-FPM. So, there is no problem here.) Still can't test anything much on the server since it's a production one.
 
Thank you for the report. It's a known issue and should be fixed in the next DA pre-release version. security.limit_extensions parameter causes the 1st PHP version not to work if it's selected to be 2nd one.
 
My custombuild RC6, php1 5.3 suphp, php2 5.5 php-fpm, selector seems doesn't work too...
 
That is a know problem with the latest DA pre-release version. We hope to get it fixed soon. Thank you for the report.
 
Martynas, please give us information when it will be ready.

BTW is there a way to force using php2? Something in htaccess?
 
Hi,

CB 2.0.0-RC6, change PHP for domain works ok, BUT not for subdomain (related to this domain). After change PHP for domain, subdomain has "old" PHP setting.

Is there a place where I can change this?
 
Hi,

CB 2.0.0-RC6, change PHP for domain works ok, BUT not for subdomain (related to this domain). After change PHP for domain, subdomain has "old" PHP setting.

Is there a place where I can change this?
The easiest user/admin solution would be to create the subdomain as a standalone domain.

but this looks like something that needs to be solved from the DA side...
 
The easiest user/admin solution would be to create the subdomain as a standalone domain.

It's quite opposite to usefulness proposition... (but admit - it's kind of solution ;-))

DA support - can you answer?

P.S. Optimal way will be - I think - possibility declare PHP for every subdomain...
 
Last edited:
It's quite opposite to usefulness proposition... (but admit - it's kind of solution ;-))

DA support - can you answer?

P.S. Optimal way will be - I think - possibility declare PHP for every subdomain...
yes, but then you are actually giving a subdomain the functionality of a domain, so... use it as a domain :)
 
Why? I want change PHP for subdomain only - not create as domain.
I understood what you want/meant, I'm just saying that if you use your subdomain (sub.domain.com), which is now a simple subdirectory, domain.com/sub, into a standalone domain called sub.domain.com you get exactly what you want.
 
Hello,

Can you include *exactly* which options.conf settings you're using for php?
I'm testing with:
Code:
php1_release=5.3
php2_release=5.5
php1_mode=fastcgi
php2_mode=php-fpm
and in the selector, I set:
Second PHP: FastCGI 5.3 php53

Which .. seems to be working.
Let me know which scenario isn't working for you, so I can test it out in more detail.

John
 
Hello,

Thanks for the info.
I tested, and when I set "PHP 2" to fpm 5.4, I got the error:
Code:
Access denied.
when accessing a test info.php54, which was because this line was missing from the /usr/loca/directadmin/data/users/username/php/php-fpm54.conf:
Code:
security.limit_extensions = .php .php52 .php53 .php54 .php55 .php60 .php54 .php5
I've changed the DA code to add this line which seems to have fixed that error.

Note that the error showed up for the domain.com as well, so wasn't just related to subdomain.
I'll update the pre-release biniaries shortly.

If you're getting a different error for the sub domain, please let me know.
Also check the related apache error log entry for the domain, as it should be telling you something.

John
 
I didn't mention I switch off open_base_dir.
Php settings for domain: set.jpg
And domain works on 5.5 BUT subdomain on 5.4.
I use only .php extension.
 
Hello,

I've tested this, using:
Code:
php1_release=5.4
php2_release=5.5
php1_mode=php-fpm
php2_mode=php-fpm

I test:
First PHP: PHP 5.5 php-fpm php
Second PHP: PHP 5.4 php-fpm php54


When I ran:
domain.com/info.php : phpinfo() showed 5.5
sub.domain.com/info.php: phpinfo() also showed 5.5


If you're not getting the same result, then I'm not too sure.
1) Check for any .htaccess files which may be affecting it.

2) Try a full rewrite:
./build rewrite_confs

3) Try the latest pre-release binaries:
http://help.directadmin.com/item.php?id=408

Beyond that, I'm not too sure.
If you'd like us to check, send us your IP, root pass, admin pass, and a sample domain/subdomain for testing.

John
 
Sorry, my fault...
I have modified htaccess - that was a reason.

John - thank you for your time to check this.
 
Back
Top