Created
January 21, 2016 09:18
-
-
Save putalexey/f21a52773966f9a57408 to your computer and use it in GitHub Desktop.
Обновление php до 5.6 на «1С-Битрикс: Веб-окружение» 4.3.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi | |
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
# enable remi and remi-php56 repository | |
sed -i -e "0,/php55/s/enabled=0/enabled=1/" -e "/\[remi\-php56\]/,/\[remi-/s/enabled=0/enabled=1/" /etc/yum.repos.d/remi.repo | |
rpm -e --nodeps php-mysql | |
rpm -e --nodeps php-pecl-apc | |
yum update php -y | |
yum install -y php-mysqlnd.i686 | |
yum install -y php-xml.i686 | |
# comment allow_call_time_pass_reference param from php ini's as it is not supported by php 5.6 | |
sed -i "0,/allow_call_time_pass_reference/s/allow_call_time_pass_reference/;allow_call_time_pass_reference/" /etc/php.d/bitrixenv.ini | |
sed -i "s/\(max_input_vars =\) [[:digit:]]\+/\1 10000/" /etc/php.d/bitrixenv.ini | |
sed -i "s/^allow_call_time_pass_reference/;\0/" /etc/php.ini | |
# replace old mysql extension to mysqli in bitrix | |
sed -i "/define(\"MYSQL_TABLE_TYPE/a define(\"BX_USE_MYSQLI\", true);" /home/bitrix/ext_www/brain_b/bitrix/php_interface/dbconn.php | |
# f*cking backslashes... | |
sed -i "s/\('className' => '\\\\\\\\Bitrix\\\\\\\\Main\\\\\\\\DB\\\\\\\\\)MysqlConnection/\1MysqliConnection/" /home/bitrix/ext_www/brain_b/bitrix/.settings.php | |
service nginx restart | |
service httpd restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment