пятница, 22 апреля 2016 г.

Установка PHP 5.2 и PHP 5.3 DirectAdmin

Потребовалось доставить PHP 5.3 на сервер с DirectAdmin. Что бы по умолчанию остался PHP 5.2, вот как это делается:

# cd /usr/local/directadmin/custombuild
# ./build set custombuild 1.2
# ./build update
# mkdir -p custom/suphp
# cp -pf configure/suphp/configure.php5 custom/suphp/configure.php6
# perl -pi -e 's/php53/phprep/' versions.txt
# perl -pi -e 's/php6/php53/' versions.txt
# perl -pi -e 's/phprep/php6/' versions.txt
# ./build set php5_ver 5.2
# ./build set php6_cgi yes
# ./build set php5_cgi no
# ./build set php5_cli yes
# ./build php n

Отредактируем, что бы не путаться:
# vim /usr/local/suphp/etc/suphp.conf

# vim /etc/httpd/conf/extra/httpd-suphp.conf
AddHandler x-httpd-php6 .php6
suPHP_AddHandler x-httpd-php6
AddHandler x-httpd-php5 .php5
suPHP_AddHandler x-httpd-php5

Перезагружаем apache:
# /etc/init.d/httpd restart

Теперь, что бы у домена был PHP 5.3 (можно в любой директории отдельный PHP) создаем в нужном каталоге файл .htaccess с содержимым:
<FilesMatch "\.php$">
AddHandler x-httpd-php5 .php


1 комментарий:

  1. Progressive jackpot slots are related 토토사이트 to|similar to} any slot video games you would attempt on our web site. Of course, regardless of wanting related on the surface, and sharing some rules, designs, themes, and bonuses, there's be} one vital difference between the 2. They provide massive winnings amassed over an extended time frame, versus small, extra frequent wins. As a UK member of our casino, would possibly be} lucky to expertise an enormous vary of our jackpot slots from a few of our main sport supplier partners. One of our brand new features is being able to|with the flexibility to|having the power to} guess on our web site utilizing your smartphone! Some took time to withdraw the successful quantity, some took time in buyer assist.