Skip to content

Commit

Permalink
Fix dbconn.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ProklUng committed Jul 22, 2021
1 parent 02f2325 commit 52b232b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions environments/default/bitrix/php_interface/dbconn.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<?php

use Symfony\Component\Dotenv\Dotenv;

if (!file_exists($autoloadPathDbconn= realpath(__DIR__).'/../../vendor/autoload.php')) {

$autoloadPathDbconn= realpath(__DIR__).'/../../../current/vendor/autoload.php';
}

require_once($autoloadPathDbconn) ;

$dotenv = new Dotenv\Dotenv(realpath(__DIR__.'/../../'));
$dotenv->load();
$dotenv = new Dotenv();

$dotenv->load(realpath(__DIR__.'/../') . '/../.env');

define("BX_USE_MYSQLI", true);
define("DBPersistent", false);
Expand Down
6 changes: 4 additions & 2 deletions environments/dev/bitrix/php_interface/dbconn.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<?php

use Symfony\Component\Dotenv\Dotenv;

if (!file_exists($autoloadPathDbconn= realpath(__DIR__).'/../../vendor/autoload.php')) {

$autoloadPathDbconn= realpath(__DIR__).'/../../../current/vendor/autoload.php';
}

require_once($autoloadPathDbconn) ;

$dotenv = new Dotenv\Dotenv(realpath(__DIR__.'/../../'));
$dotenv->load();
$dotenv = new Dotenv();

$dotenv->load(realpath(__DIR__.'/../') . '/../.env');

define("BX_USE_MYSQLI", true);
define("DBPersistent", false);
Expand Down
6 changes: 4 additions & 2 deletions environments/prod/bitrix/php_interface/dbconn.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<?php

use Symfony\Component\Dotenv\Dotenv;

if (!file_exists($autoloadPathDbconn= realpath(__DIR__).'/../../vendor/autoload.php')) {

$autoloadPathDbconn= realpath(__DIR__).'/../../../current/vendor/autoload.php';
}

require_once($autoloadPathDbconn) ;

$dotenv = new Dotenv\Dotenv(realpath(__DIR__.'/../../'));
$dotenv->load();
$dotenv = new Dotenv();

$dotenv->load(realpath(__DIR__.'/../') . '/../.env');

define("BX_USE_MYSQLI", true);
define("DBPersistent", false);
Expand Down

0 comments on commit 52b232b

Please sign in to comment.