[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This file includes advanced settings for the evoCore framework. 4 * 5 * Please NOTE: You should not comment variables out to prevent 6 * URL overrides. 7 * 8 * @package conf 9 * 10 * @version $Id: _advanced.php,v 1.204 2007/10/10 09:59:28 fplanque Exp $ 11 */ 12 if( !defined('EVO_CONFIG_LOADED') ) die( 'Please, do not access this page directly.' ); 13 14 /** 15 * No Translation. Does nothing. 16 * 17 * Nevertheless, the string will be extracted by the gettext tools 18 */ 19 function NT_( $string ) 20 { 21 return $string; 22 } 23 24 /** 25 * Display debugging informations? 26 * 27 * 0 = no 28 * 1 = yes 29 * 2 = yes and potentially die() to display debug info (needed before redirects, e-g message_send.php) 30 * 31 * @global integer 32 */ 33 $debug = 0; 34 35 // Most of the time you'll want to see all errors, including notices: 36 // b2evo should run notice free! (plugins too!) 37 error_reporting( E_ALL ); 38 39 // To help debugging severe errors, you'll probably want PHP to display the errors on screen. 40 // In this case, uncomment the following line: 41 // ini_set( 'display_errors', 'on' ); 42 43 // If you get blank pages, PHP may be crashing because it doesn't have enough memory. 44 // The default is 8 MB (set in php.ini) 45 // Try uncommmenting the following line: 46 // ini_set( 'memory_limit', '16M' ); 47 48 // NOTE: If you're using PHP newer than 5.2.1, the default is 128M 49 // and because the memory management/reporting has changed 16M 50 // would be probably still too less. 51 52 53 /** 54 * Log application errors through {@link error_log() PHP's logging facilities}? 55 * 56 * This means that they will get logged according to PHP's error_log configuration directive. 57 * 58 * Experimental! This may be changed to use regular files instead/optionally. 59 * 60 * @todo Provide logging into normal file instead (more useful for backtraces/multiline error messages) 61 * 62 * @global integer 0: off; 1: log errors; 2: include function backtraces (Default: 1) 63 */ 64 $log_app_errors = 1; 65 66 67 /** 68 * Demo mode: don't allow changes to the 'demouser' and 'admin' account. 69 * @global boolean Default: false 70 */ 71 $demo_mode = false; 72 73 74 /** 75 * URL of the Home link at the top left. 76 * 77 * By default this is the base url. And unless you do a complex installation, there is no need to change this. 78 */ 79 $home_url = $baseurl; 80 81 82 /** 83 * Comments: Set this to 1 to require e-mail and name, or 0 to allow comments 84 * without e-mail/name. 85 * @global boolean $require_name_email 86 */ 87 $require_name_email = 1; 88 89 /** 90 * Minimum interval (in seconds) between consecutive comments from same IP. 91 * @global int $minimum_comment_interval 92 */ 93 $minimum_comment_interval = 30; 94 95 96 /** 97 * Check antispam blacklist for private messages. 98 * 99 * Do you want to check the antispam blocklist when a message form is submitted? 100 * 101 * @global boolean $antispam_on_message_form 102 */ 103 $antispam_on_message_form = 1; 104 105 106 /** 107 * Set the length of the online session time out (in seconds). 108 * 109 * This is for the Who's Online block. Default: 5 minutes (300s). 110 * 111 * @global integer 112 */ 113 $timeout_online_user = 300; // Default: 5 minutes (300s). 114 115 116 // Get hostname out of baseurl 117 // YOU SHOULD NOT EDIT THIS unless you know what you're doing 118 if( preg_match( '#^(https?://(.+?)(:.+?)?)/#', $baseurl, $matches ) ) 119 { 120 $baseurlroot = $matches[1]; // no ending slash! 121 // echo "baseurlroot=$baseurlroot <br />"; 122 $basehost = $matches[2]; 123 // echo "basehost=$basehost <br />"; 124 } 125 else 126 { 127 die( 'Your baseurl ('.$baseurl.') set in _basic_config.php seems invalid. You probably missed the "http://" prefix or the trailing slash. Please correct that.' ); 128 } 129 130 131 /** 132 * Base domain of b2evolution. 133 * 134 * By default we try to extract it automagically from $basehost (itself extracted from $abaseurl) 135 * But you may need to adjust this manually. 136 * 137 * @todo does anyone have a clean way of handling stuff like .co.uk ? 138 * 139 * @global string 140 */ 141 $basedomain = preg_replace( '/^( .* \. )? (.+? \. .+? )$/xi', '$2', $basehost ); 142 143 144 /** 145 * Short name of this system (will be used for cookies and notification emails). 146 * 147 * Change this only if you install mutliple b2evolutions on the same website. 148 * 149 * WARNING: don't play with this or you'll have tons of cookies sent away and your 150 * readers surely will complain about it! 151 * 152 * You can change the notification email address alone a few lines below. 153 * 154 * @todo generate a random instance name at install and have it saved in the global params in the DB 155 * 156 * @global string Default: 'b2evo' 157 */ 158 $instance_name = 'b2evo'; // MUST BE A SINGLE WORD! NO SPACES!! 159 160 161 /** 162 * Default email address for sending notifications (comments, trackbacks, 163 * user registrations...). 164 * 165 * Set a custom address like this: 166 * <code>$notify_from = 'b2evolution@your_server.com';</code> 167 * 168 * Alternatively you can use this automated address generation (which removes "www." from 169 * the beginning of $basehost): 170 * <code>$notify_from = $instance_name.'@'.preg_replace( '/^www\./i', '', $basehost );</code> 171 * 172 * @global string Default: $instance_name.'@'.$basehost; 173 */ 174 $notify_from = $instance_name.'@'.preg_replace( '/^www\./i', '', $basehost ); 175 176 177 // ** DB options ** 178 179 /** 180 * Show MySQL errors? (default: true) 181 * 182 * This is recommended on production environments. 183 */ 184 $db_config['show_errors'] = true; 185 186 187 /** 188 * Halt on MySQL errors? (default: true) 189 * 190 * Setting this to false is not recommended, 191 */ 192 $db_config['halt_on_error'] = true; 193 194 195 /** 196 * Aliases for table names: 197 * 198 * (You should not need to change them. 199 * If you want to have multiple b2evo installations in a single database you should 200 * change {@link $tableprefix} in _basic_config.php) 201 */ 202 $db_config['aliases'] = array( 203 'T_antispam' => $tableprefix.'antispam', 204 'T_basedomains' => $tableprefix.'basedomains', 205 'T_blogs' => $tableprefix.'blogs', 206 'T_categories' => $tableprefix.'categories', 207 'T_coll_group_perms' => $tableprefix.'bloggroups', 208 'T_coll_user_perms' => $tableprefix.'blogusers', 209 'T_coll_settings' => $tableprefix.'coll_settings', 210 'T_comments' => $tableprefix.'comments', 211 'T_cron__log' => $tableprefix.'cron__log', 212 'T_cron__task' => $tableprefix.'cron__task', 213 'T_files' => $tableprefix.'files', 214 'T_filetypes' => $tableprefix.'filetypes', 215 'T_groups' => $tableprefix.'groups', 216 'T_hitlog' => $tableprefix.'hitlog', 217 'T_items__item' => $tableprefix.'items__item', 218 'T_items__itemtag' => $tableprefix.'items__itemtag', 219 'T_items__prerendering' => $tableprefix.'items__prerendering', 220 'T_items__status' => $tableprefix.'items__status', 221 'T_items__tag' => $tableprefix.'items__tag', 222 'T_items__type' => $tableprefix.'items__type', 223 'T_links' => $tableprefix.'links', 224 'T_locales' => $tableprefix.'locales', 225 'T_plugins' => $tableprefix.'plugins', 226 'T_pluginevents' => $tableprefix.'pluginevents', 227 'T_pluginsettings' => $tableprefix.'pluginsettings', 228 'T_pluginusersettings' => $tableprefix.'pluginusersettings', 229 'T_postcats' => $tableprefix.'postcats', 230 'T_sessions' => $tableprefix.'sessions', 231 'T_settings' => $tableprefix.'settings', 232 'T_skins__container' => $tableprefix.'skins__container', 233 'T_skins__skin' => $tableprefix.'skins__skin', 234 'T_subscriptions' => $tableprefix.'subscriptions', 235 'T_users' => $tableprefix.'users', 236 'T_useragents' => $tableprefix.'useragents', 237 'T_usersettings' => $tableprefix.'usersettings', 238 'T_widget' => $tableprefix.'widget', 239 ); 240 241 242 /** 243 * CREATE TABLE options. 244 * 245 * Edit those if you have control over you MySQL server and want a more professional 246 * database than what is commonly offered by popular hosting providers. 247 */ 248 $db_config['table_options'] = ''; // Low ranking MySQL hosting compatibility Default 249 // Recommended settings: 250 # $db_config['table_options'] = ' ENGINE=InnoDB '; 251 // Development settings: 252 # $db_config['table_options'] = ' ENGINE=InnoDB DEFAULT CHARSET=utf8 '; 253 254 255 /** 256 * Use transactions in DB? 257 * 258 * You need to use InnoDB in order to enable this. See the {@link $db_config "table_options" key}. 259 */ 260 $db_config['use_transactions'] = false; 261 // Recommended settings: 262 # $db_config['use_transactions'] = true; 263 264 265 /** 266 * Foreign key options. 267 * 268 * Set this to true if your MySQL supports Foreign keys. 269 * Recommended for professional use and DEVELOPMENT only. 270 * As of today, upgrading is not guaranteed when foreign keys are enabled. 271 * 272 * Typically requires InnoDB to be set in $db_config['table_options']. 273 * 274 * This is used during table CREATION only. 275 * 276 * @todo provide an advanced install menu allowing to install/remove the foreign keys on an already installed db. 277 * @global boolean $db_use_fkeys 278 */ 279 $db_use_fkeys = false; 280 281 282 /** 283 * Display elements that are different on each request (Page processing time, ..) 284 * 285 * Set this to true to prevent displaying minor changing elements (like time) in order not to have artificial content changes 286 * 287 * @global boolean Default: false 288 */ 289 $obhandler_debug = false; 290 291 292 // ** Cookies ** 293 294 /** 295 * This is the path that will be associated to cookies. 296 * 297 * That means cookies set by this b2evo install won't be seen outside of this path on the domain below. 298 * 299 * @global string Default: preg_replace( '#https?://[^/]+#', '', $baseurl ) 300 */ 301 $cookie_path = preg_replace( '#https?://[^/]+#', '', $baseurl ); 302 303 /** 304 * Cookie domain. 305 * 306 * That means cookies set by this b2evo install won't be seen outside of this domain. 307 * 308 * We'll take {@link $basehost} by default (the leading dot includes subdomains), but 309 * when there's no dot in it, at least Firefox will not set the cookie. The best 310 * example for having no dot in the host name is 'localhost', but it's the case for 311 * host names in an intranet also. 312 * 313 * Note: ".domain.com" cookies will be sent to sub.domain.com too. 314 * But, see http://www.faqs.org/rfcs/rfc2965: 315 * "If multiple cookies satisfy the criteria above, they are ordered in 316 * the Cookie header such that those with more specific Path attributes 317 * precede those with less specific. Ordering with respect to other 318 * attributes (e.g., Domain) is unspecified." 319 * 320 * @global string Default: ( strpos($basehost, '.') ) ? '.'. $basehost : ''; 321 */ 322 if( strpos($basehost, '.') === false ) 323 { // localhost or windows machine name: 324 $cookie_domain = ''; 325 } 326 elseif( preg_match( '~^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$~i', $basehost ) ) 327 { // Use the basehost as it is: 328 $cookie_domain = $basehost; 329 } 330 else 331 { 332 $cookie_domain = preg_replace( '/^(www\. )? (.+)$/xi', '.$2', $basehost ); 333 334 // When hosting multiple domains (not just subdomains) on a single instance of b2evo, 335 // you may want to try this: 336 // $cookie_domain = '.'.$_SERVER['HTTP_HOST']; 337 // or this: -- Have a cookie domain of 2 levels only, base on current basehost. 338 // $cookie_domain = preg_replace( '/^( .* \. )? (.+? \. .+? )$/xi', '.$2', $basehost ); 339 // fp> pb with domains like .co.uk !? 340 } 341 342 // echo $cookie_domain; 343 344 /**#@+ 345 * Names for cookies. 346 */ 347 // The following remember the comment meta data for non registered users: 348 $cookie_name = 'cookie'.$instance_name.'name'; 349 $cookie_email = 'cookie'.$instance_name.'email'; 350 $cookie_url = 'cookie'.$instance_name.'url'; 351 // The following handles the session: 352 $cookie_session = 'cookie'.$instance_name.'session'; 353 /**#@-*/ 354 355 /** 356 * Expiration for cookies. 357 * 358 * Value in seconds, set this to 0 if you wish to use non permanent cookies (erased when browser is closed). 359 * 360 * @global int Default: time() + 31536000; // One year from now 361 */ 362 $cookie_expires = time() + 31536000; 363 364 /** 365 * Expired-time used to erase cookies. 366 * 367 * @global int time() - 86400; // 24 hours ago 368 */ 369 $cookie_expired = time() - 86400; 370 371 372 // ** Location of the b2evolution subdirectories ** 373 374 /* 375 - You should only move these around if you really need to. 376 - You should keep everything as subdirectories of the base folder 377 ($baseurl which is set in _basic_config.php, default is the /blogs/ folder) 378 - Remember you can set the baseurl to your website root (-> _basic_config.php). 379 380 NOTE: All paths must have a trailing slash! 381 382 Example of a possible setting: 383 $conf_subdir = 'settings/b2evo/'; // Subdirectory relative to base 384 $conf_subdir = '../../'; // Relative path to go back to base 385 */ 386 /** 387 * Location of the configuration files. 388 * 389 * Note: This folder NEEDS to by accessible by PHP only. 390 * 391 * @global string $conf_subdir 392 */ 393 $conf_subdir = 'conf/'; // Subdirectory relative to base 394 $conf_path = str_replace( '\\', '/', dirname(__FILE__) ).'/'; 395 396 /** 397 * @global string Path of the base. 398 * fp> made [i]nsensitive to case because of Windows URL oddities) 399 */ 400 $basepath = preg_replace( '#/'.$conf_subdir.'$#i', '', $conf_path ).'/'; 401 402 /** 403 * Location of the include folder. 404 * 405 * Note: This folder NEEDS to by accessible by PHP only. 406 * 407 * @global string $inc_subdir 408 */ 409 $inc_subdir = 'inc/'; // Subdirectory relative to base 410 $inc_path = $basepath.$inc_subdir; // You should not need to change this 411 $misc_inc_path = $inc_path.'_misc/'; // You should not need to change this 412 413 /** 414 * Location of the HTml SeRVices folder. 415 * 416 * Note: This folder NEEDS to by accessible through HTTP. 417 * 418 * @global string $htsrv_subdir 419 */ 420 $htsrv_subdir = 'htsrv/'; // Subdirectory relative to base 421 $htsrv_path = $basepath.$htsrv_subdir; // You should not need to change this 422 $htsrv_url = $baseurl.$htsrv_subdir; // You should not need to change this 423 424 /** 425 * Sensitivee URL to the htsrv folder. 426 * 427 * Set this separately (based on {@link $htsrv_url}), if you want to use 428 * SSL for login, registration and profile updates (where passwords are 429 * involved), but not for the whole htsrv scripts. 430 * 431 * @global string 432 */ 433 $htsrv_url_sensitive = $htsrv_url; 434 435 /** 436 * Location of the XML SeRVices folder. 437 * @global string $xmlsrv_subdir 438 */ 439 $xmlsrv_subdir = 'xmlsrv/'; // Subdirectory relative to base 440 $xmlsrv_url = $baseurl.$xmlsrv_subdir; // You should not need to change this 441 442 /** 443 * Location of the RSC folder. 444 * 445 * Note: This folder NEEDS to by accessible through HTTP. 446 * 447 * @global string $rsc_subdir 448 */ 449 $rsc_subdir = 'rsc/'; // Subdirectory relative to base 450 $rsc_path = $basepath.$rsc_subdir; // You should not need to change this 451 $rsc_url = $baseurl.$rsc_subdir; // You should not need to change this 452 453 /** 454 * Location of the skins folder. 455 * @global string $skins_subdir 456 */ 457 $skins_subdir = 'skins/'; // Subdirectory relative to base 458 $skins_path = $basepath.$skins_subdir; // You should not need to change this 459 $skins_url = $baseurl.$skins_subdir; // You should not need to change this 460 461 462 /** 463 * Location of the admin interface dispatcher 464 */ 465 $dispatcher = 'admin.php'; 466 $admin_url = $baseurl.$dispatcher; 467 468 469 /** 470 * Location of the admin skins folder. 471 * 472 * Note: This folder NEEDS to by accessible by both PHP AND through HTTP. 473 * 474 * @global string $adminskins_subdir 475 */ 476 $adminskins_subdir = 'skins_adm/'; // Subdirectory relative to ADMIN 477 $adminskins_path = $basepath.$adminskins_subdir; // You should not need to change this 478 $adminskins_url = $baseurl.$adminskins_subdir; // You should not need to change this 479 480 /** 481 * Location of the locales folder. 482 * 483 * Note: This folder NEEDS to by accessible by PHP AND MAY NEED to be accessible through HTTP. 484 * Exact requirements depend on future uses like localized icons. 485 * 486 * @global string $locales_subdir 487 */ 488 $locales_subdir = 'locales/'; // Subdirectory relative to base 489 $locales_path = $basepath.$locales_subdir; // You should not need to change this 490 491 /** 492 * Location of the plugins. 493 * 494 * Note: This folder NEEDS to by accessible by PHP AND MAY NEED to be accessible through HTTP. 495 * Exact requirements depend on installed plugins. 496 * 497 * @global string $plugins_subdir 498 */ 499 $plugins_subdir = 'plugins/'; // Subdirectory relative to base 500 $plugins_path = $basepath.$plugins_subdir; // You should not need to change this 501 $plugins_url = $baseurl.$plugins_subdir; // You should not need to change this 502 503 /** 504 * Location of the cron folder. 505 * 506 * Note: Depebding on how you will set up cron execution, this folder may or may not NEED to be accessible by PHP through HTTP. 507 * 508 * @global string $cron_subdir 509 */ 510 $cron_subdir = 'cron/'; // Subdirectory relative to base 511 $cron_url = $baseurl.$cron_subdir; // You should not need to change this 512 513 /** 514 * Location of the install folder. 515 * @global string $install_subdir 516 */ 517 $install_subdir = 'install/'; // Subdirectory relative to base 518 519 /** 520 * Location of the root media folder. 521 * 522 * Note: This folder MAY or MAY NOT NEED to be accessible by PHP AND/OR through HTTP. 523 * Exact requirements depend on $public_access_to_media . 524 * 525 * @global string $media_subdir 526 */ 527 $media_subdir = 'media/'; // Subdirectory relative to base 528 $media_url = $baseurl.$media_subdir; // You should not need to change this 529 530 531 /** 532 * Do you want to allow public access to the media dir? 533 * 534 * WARNING: If you set this to false, evocore will use /htsrv/getfile.php as a stub 535 * to access files and getfile.php will check the User permisssion to view files. 536 * HOWEVER this will not prevent users from hitting directly into the media folder 537 * with their web browser. You still need to restrict access to the media folder 538 * from your webserver. 539 * 540 * @global boolean 541 */ 542 $public_access_to_media = true; 543 544 /** 545 * File extensions that the admin will not be able to enable in the Settings 546 */ 547 $force_upload_forbiddenext = array( 'cgi', 'exe', 'htaccess', 'htpasswd', 'php', 'php3', 'php4', 'php5', 'php6', 'phtml', 'pl', 'vbs' ); 548 549 /** 550 * Admin can configure max file upload size, but he won't be able to set it higher than this "max max" value. 551 */ 552 $upload_maxmaxkb = 10000; 553 554 /** 555 * The admin can configure the regexp for valid file names in the Settings interface 556 * However if the following values are set to non empty, the admin will not be able to customize these values. 557 */ 558 $force_regexp_filename = ''; 559 $force_regexp_dirname = ''; 560 561 562 /** 563 * Set this to 1 to disable using PHP's {@link register_shutdown_function()}, 564 * but not everywhere. 565 * 566 * This is NOT recommened, because it affects things that should be done after delivering the page. 567 * 568 * Currently, it disables using register_shutdown_function() for double checking referers 569 * ({@link basic_antispam_plugin::AppendHitLog()}), but not for {@link Session::dbsave()}. 570 * 571 * It's probably only useful for debugging to disable this feature. 572 * @global int $debug_no_register_shutdown 573 */ 574 $debug_no_register_shutdown = 0; 575 576 577 /** 578 * XMLRPC logging. Set this to 1 to log XMLRPC calls/responses (into /xmlsrv/xmlrpc.log). 579 * 580 * @global int $debug_xmlrpc_logging Default: 0 581 */ 582 $debug_xmlrpc_logging = 0; 583 584 585 /** 586 * Seconds after which a scheduled task is considered to be timed out. 587 */ 588 $cron_timeout_delay = 1800; // 30 minutes 589 590 591 // ----- CHANGE THE FOLLOWING ONLY IF YOU KNOW WHAT YOU'RE DOING! ----- 592 $evonetsrv_host = 'b2evolution.net'; 593 $evonetsrv_port = 80; 594 $evonetsrv_uri = '/evonetsrv/xmlrpc.php'; 595 596 $antispamsrv_host = 'antispam.b2evolution.net'; 597 $antispamsrv_port = 80; 598 $antispamsrv_uri = '/evonetsrv/xmlrpc.php'; 599 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |