| 1 | <?php |
| 2 | /** |
| 3 | * @copyright Copyright (C) 1999-2011 eZ Systems AS. All rights reserved. |
| 4 | * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 |
| 5 | * @version 2011.7 |
| 6 | * @package kernel |
| 7 | */ |
| 8 | |
| 9 | /* |
| 10 | This file should be included from a file containing |
| 11 | clustering database settings. |
| 12 | |
| 13 | Here are sample contents of such file: |
| 14 | ------------------------------------------- |
| 15 | <?php |
| 16 | define( 'STORAGE_BACKEND', 'mysql' ); |
| 17 | define( 'STORAGE_HOST', 'db' ); |
| 18 | define( 'STORAGE_PORT', 3306 ); |
| 19 | define( 'STORAGE_SOCKET', '/tmp/mysql.sock' ); |
| 20 | define( 'STORAGE_USER', 'fred' ); |
| 21 | define( 'STORAGE_PASS', 'secret' ); |
| 22 | define( 'STORAGE_DB', 'cluster' ); |
| 23 | define( 'STORAGE_CHUNK_SIZE', 65535 ); |
| 24 | |
| 25 | // define the Expires HTTP header timeout in seconds. |
| 26 | // It's set to 6000 seconds (100 minutes) if EXPIRY_TIMEOUT is not defined. |
| 27 | // to work around an IE bug, it's recommended to not set it to a value lower |
| 28 | // than 600 seconds (10 minutes). |
| 29 | // Image urls contain the version number, it can be set to a very far future |
| 30 | // without any risk (one year below) |
| 31 | define( 'EXPIRY_TIMEOUT', 60 * 60 * 24 * 365 ); |
| 32 | |
| 33 | // If you use the DFS cluster, you also need to set the path for the shared directory: |
| 34 | define( 'MOUNT_POINT_PATH', 'var/nfsmount' ); |
| 35 | |
| 36 | // If you use Oracle you might want to set these (see README.cluster in the ezoracle extension): |
| 37 | //define( 'USE_ETAG', true ); |
| 38 | //define ( 'STORAGE_PERSISTENT_CONNECTION', true ); |
| 39 | |
| 40 | // If you're not using UTF-8 (which we STRONGLY recommend), |
| 41 | // you MUST define the character set according to your setup: |
| 42 | // site.ini/[DatabaseSettings]/Charset |
| 43 | // Not doing so will use a default UTF-8 connection |
| 44 | // NOTE: Use here a character set as understood by the server! |
| 45 | // MySQL uses for instance 'utf8', 'latin1', 'cp1250',... rather than |
| 46 | // 'utf-8', 'iso-8859-1', 'windows-1250',... |
| 47 | define( 'STORAGE_CHARSET', 'utf8' ); |
| 48 | |
| 49 | //include_once( 'index_image.php' ); |
| 50 | ?> |
| 51 | ------------------------------------------- |
| 52 | */ |
| 53 | |
| 54 | if ( !defined( 'STORAGE_BACKEND' ) ) |
| 55 | die( "No storage backend chosen.\n" ); |
| 56 | ini_set( 'display_errors', 0 ); |
| 57 | include_once( 'index_image_' . STORAGE_BACKEND . '.php' ); |
| 58 | ?> |
| 59 | |