PHP5 .htaccess

IPaddress

Verified User
Joined
Feb 21, 2004
Messages
86
Hi.
Im running Directadmin 1.33.6 on a CentOS 5 Final.
I've all Domains working fine in PHP4 and PHP5.
However, theres the web site of the domains stop working when they are changed from PHP5 to PHP5 using the "PHP Version Selector".
I've found the problem: When i change the PHP Version using control Panel, the .htaccess created on the public_html folder of the domain is wrong.
# cat /home/camacho/domains/MYDOMAIN/public_html/.htaccess
<FilesMatch "\.(inc|php|php3|php4|php5|php6|phtml|phps)$"> # PHP5
AddHandler x-httpd-php5 .php # PHP5
</FilesMatch> # PHP5

And it should be:
<FilesMatch "\.(inc|php|php3|php4|php5|php6|phtml|phps)$">
AddHandler x-httpd-php5 .php
</FilesMatch>
(WITHOUD THE "# PHP5" at the end of every linem cause it shows an error).

Looking in the "PHP Version Selector" in admin level, the "PHP 5 CGI" seems to be OK (without the " # PHP5 " at the end). So the file that creates the .htaccess in the public_html folder is writing that at the end of every line. Wheres is that file? Can i modify to stop doing that?


And another problem:
I change some Domain to PHP5, but after a while, in the user level, under "PHP Version Selector" it shows me PHP4 again (and i know its working on PHP5!). Why is happening this?


Thanks in advance.

Bye.


PD: Sorry for my poor English.
 
Hi!
Sorry to respond to my own thread but, anyone has any idea of what can i do with this problem?

Thanks!

Bye.
 
The # symbol is generally taken as a comment, but evidently it's tripping up and causing the error.

I don't know where it's coming from; perhaps someone from DirectAdmin will reply and help you.

Jeff
 
Hello,

I'm not sure where the #PHP5 would be coming from..but the php selector isn't an automated thing in DA.. it would done by an admin or plugin or something like that.
In any case, remove the bit that's causing the error.

John
 
/usr/local/directadmin/plugins/phpvs/user/index.html

That file is the one that add's the "# phpv5" at the end of the line.
Im triyng to modify it.

Bye.
 
Back
Top