mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-03-28 19:02:17 +01:00
This also consolidates INI functions (and trace logging) into a separate file and ensure that mongoc logging is disabled during GSHUTDOWN (avoiding a potential segfault). Enable service ID mocking when testing load balancers with HAProxy.
15 lines
549 B
PHP
15 lines
549 B
PHP
<?php
|
|
|
|
require_once __DIR__ . "/" . "tools.php";
|
|
|
|
define('URI', getenv('MONGODB_URI') ?: 'mongodb://127.0.0.1/');
|
|
define('MONGO_ORCHESTRATION_URI', getenv('MONGO_ORCHESTRATION_URI') ?: 'http://localhost:8889/v1');
|
|
define('DATABASE_NAME', getenv('MONGODB_DATABASE') ?: 'phongo');
|
|
define('COLLECTION_NAME', makeCollectionNameFromFilename($_SERVER['SCRIPT_FILENAME']));
|
|
define('NS', DATABASE_NAME . '.' . COLLECTION_NAME);
|
|
define('SSL_DIR', realpath(getenv('SSL_DIR')));
|
|
|
|
if (getenv('MOCK_SERVICE_ID')) {
|
|
ini_set('mongodb.mock_service_id', '1');
|
|
}
|