Skip to content

Commit

Permalink
simplify BX_CACHE_SID based on Bitrix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
paskal committed Jun 2, 2023
1 parent e0c4937 commit 2a33aee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $DBPassword = "<DBPASSWORD>";
define('BX_TEMPORARY_FILES_DIRECTORY', '/tmp');

define("BX_CACHE_TYPE", "memcache");
define("BX_CACHE_SID", "prod"); // or "dev" in case of dev config
define("BX_CACHE_SID", $_SERVER["DOCUMENT_ROOT"]."#01");
define("BX_MEMCACHE_HOST", "memcached");
define("BX_MEMCACHE_PORT", "11211");
define('BX_SECURITY_SESSION_MEMCACHE_HOST', 'memcached-sessions');
Expand Down Expand Up @@ -107,7 +107,7 @@ return array(
'host' => 'memcached',
'port' => '11211',
),
'sid' => "prod" // or "dev" in case of dev config
'sid' => $_SERVER["DOCUMENT_ROOT"]."#01"
),
),
);
Expand Down
2 changes: 0 additions & 2 deletions scripts/renew-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ echo "Changing DB and memcached connection settings"
sed -i "s/.*\$DBName.*/\$DBName = '${DEV_DB}';/" ${DEV_LOCATION}/bitrix/php_interface/dbconn.php
sed -i "s/.*\$DBLogin.*/\$DBLogin = '${DEV_USER}';/" ${DEV_LOCATION}/bitrix/php_interface/dbconn.php
sed -i "s/.*\$DBPassword.*/\$DBPassword = '${DEV_PASSWORD}';/" ${DEV_LOCATION}/bitrix/php_interface/dbconn.php
sed -i "s/.*BX_CACHE_SID.*/define('BX_CACHE_SID', '${DEV_SUBDOMAIN}');/" ${DEV_LOCATION}/bitrix/php_interface/dbconn.php
sed -i "s/.*BX_TEMPORARY_FILES_DIRECTORY.*/define('BX_TEMPORARY_FILES_DIRECTORY', '\/tmp\/${DEV_DOMAIN}');/" ${DEV_LOCATION}/bitrix/php_interface/dbconn.php
sed -i "s/.*'sid'.*/'sid' => '${DEV_SUBDOMAIN}'/" ${DEV_LOCATION}/bitrix/.settings_extra.php
sed -i "s/.*'database' =>.*/'database' => '${DEV_DB}',/" ${DEV_LOCATION}/bitrix/.settings.php
sed -i "s/.*'login' =>.*/'login' => '${DEV_USER}',/" ${DEV_LOCATION}/bitrix/.settings.php
sed -i "s/.*'password' =>.*/'password' => '${DEV_PASSWORD}',/" ${DEV_LOCATION}/bitrix/.settings.php
Expand Down

0 comments on commit 2a33aee

Please sign in to comment.