PHP 5.4 + mod_fcgi returning source code in place of running PHP

rjd22

Verified User
Joined
Jul 10, 2008
Messages
80
I've installed custombuild 2.0 with the following settings:
php1_release=5.3
php2_release=5.4
php1_mode=mod_php
php2_mode=fastcgi
php_ini=no
php_timezone=CEST
#Possible values - production or development
php_ini_type=production
ioncube=yes
zend=no

And set the following handler in my .htaccess
<FilesMatch \.php$>
SetHandler php54-fcgi
</FilesMatch>

But my PHP isn't executed and there are no errors in my errors logs. Does someone know what might be going wrong or how I can debug this?
I have no custom scripts except ban_ip.sh and I runned ./build rewrite_confs
 
Last edited:
Ok, I did so but I can't see this selector at the CMD_ADDITIONAL_DOMAINS page.

I'm running Directadmin 1.43.0
 
Ok I've installed the complete release candidate and set it like this:
First PHP PHP 5.4 Fastcgi php
Second PHP PHP 5.3 mod_php php53

and then restarted httpd. But when I'm doing PHP info I still get version: PHP 5.3.26
 
Hello,

I believe I've found the issue to be the quirky nature of the <FilesMatch> directive.


I've updated our test httpd.conf from this:
Code:
                        AddHandler fcgid-script .php
                        FCGIWrapper "/usr/local/safe-bin/fcgid54.sh /usr/local/directadmin/data/users/[B]username[/B]/php/[B]domain.com[/B].ini" .php
                        <FilesMatch "\.php$">
                                Options +ExecCGI
                        </FilesMatch>
to be this:
Code:
                        <FilesMatch "\.php$">
                                AddHandler fcgid-script .php
                                FCGIWrapper "/usr/local/safe-bin/fcgid54.sh /usr/local/directadmin/data/users/[B]username[/B]/php/[B]domain.com[/B].ini" .php
                                Options +ExecCGI
                        </FilesMatch>
where the FilesMatch can only override another setting if that setting is within another FilesMatch. I'm not exactly sure why it does that, but it seems to resolve the issue on our test system, as I was able to get the same result you had described.

I'll update the templates for the next release.

John
 
I can confirm that is is working. Thank you for posting the solution
 
Back
Top