Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/hooninside/domains/hooninside.co.cc/public_html/configuration.php:1) in /home/hooninside/domains/hooninside.co.cc/public_html/libraries/joomla/session/session.php on line 412
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/hooninside/domains/hooninside.co.cc/public_html/configuration.php:1) in /home/hooninside/domains/hooninside.co.cc/public_html/libraries/joomla/session/session.php on line 412
Warning: Cannot modify header information - headers already sent by (output started at /home/hooninside/domains/hooninside.co.cc/public_html/configuration.php:1) in /home/hooninside/domains/hooninside.co.cc/public_html/libraries/joomla/session/session.php on line 415
Configuration.php
*******************************************************************************************************
<?php
class JConfig {
var $offline = '0';
var $editor = 'jce';
var $list_limit = '50';
var $helpurl = '';
var $debug = '0';
var $debug_lang = '0';
var $sef = '1';
var $sef_rewrite = '0';
var $sef_suffix = '0';
var $feed_limit = '10';
var $secret = 'oK2Cf0AD597Fmr1x';
var $gzip = '1';
var $error_reporting = '-1';
var $xmlrpc_server = '0';
var $log_path = '/home/hooninside/domains/hooninside.co.cc/public_html/logs';
var $tmp_path = '/home/hooninside/domains/hooninside.co.cc/public_html/tmp';
var $live_site = '';
var $offset = '7';
var $caching = '1';
var $cachetime = '15';
var $cache_handler = 'file';
var $memcache_settings = array();
var $ftp_enable = '0';
var $ftp_host = 'ftp.hooninside.co.cc';
var $ftp_port = '21';
var $ftp_user = '[email protected]';
var $ftp_pass = 'xxxxxxxx';
var $ftp_root = '/home/hooninside/domains/hooninside.co.cc/public_html/';
var $dbtype = 'mysql';
var $host = 'localhost';
var $user = 'hooninside_user';
var $db = 'hooninside_joomla';
var $dbprefix = 'jos_';
var $mailer = 'smtp';
var $mailfrom = '[email protected]';
var $fromname = 'หุ้น Inside';
var $sendmail = '/usr/sbin/sendmail';
var $smtpauth = '1';
<?php
/**
* @version $Id: session.php 10707 2008-08-21 09:52:47Z eddieajau $
* @package Joomla.Framework
* @subpackage Session
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();
//Register the session storage class with the loader
JLoader::register('JSessionStorage', dirname(__FILE__).DS.'storage.php');
/**
* Class for managing HTTP sessions
*
* Provides access to session-state values as well as session-level
* settings and lifetime management methods.
* Based on the standart PHP session handling mechanism it provides
* for you more advanced features such as expire timeouts.
*
* @package Joomla.Framework
* @subpackage Session
* @since 1.5
*/
class JSession extends JObject
{
/**
* internal state
*
* @access protected
* @var string $_state one of 'active'|'expired'|'destroyed|'error'
* @see getState()
*/
var $_state = 'active';
/**
* Maximum age of unused session
*
* @access protected
* @var string $_expire minutes
*/
var $_expire = 15;
/**
* The session store object
*
* @access protected
* @var object A JSessionStorage object
*/
var $_store = null;
/**
* security policy
*
* Default values:
* - fix_browser
* - fix_adress
*
* @access protected
* @var array $_security list of checks that will be done.
*/
var $_security = array( 'fix_browser' );
/**
* Constructor
*
* @access protected
* @param string $storage
* @param array $options optional parameters
*/
function __construct( $store = 'none', $options = array() )
{
// Register faked "destructor" in PHP4, this needs to happen before creating the session store
if (version_compare(PHP_VERSION, '5') == -1) {
register_shutdown_function((array(&$this, '__destruct')));
}
//Need to destroy any existing sessions started with session.auto_start
if (session_id()) {
session_unset();
session_destroy();
}
//set default sessios save handler
ini_set('session.save_handler', 'files');
//disable transparent sid support
ini_set('session.use_trans_sid', '0');
/**
* Returns a reference to the global Session object, only creating it
* if it doesn't already exist.
*
* This method must be invoked as:
* <pre> $session = &JSession::getInstance();</pre>
*
* @access public
* @return JSession The Session object.
* @since 1.5
*/
function & getInstance($handler, $options)
{
static $instance;
if (!is_object($instance)) {
$instance = new JSession($handler, $options);
}
return $instance;
}
/**
* Get current state of session
*
* @access public
* @return string The session state
*/
function getState() {
return $this->_state;
}
/**
* Get expiration time in minutes
*
* @access public
* @return integer The session expiration time in minutes
*/
function getExpire() {
return $this->_expire;
}
/**
* Get a session token, if a token isn't set yet one will be generated.
*
* Tokens are used to secure forms from spamming attacks. Once a token
* has been generated the system will check the post request to see if
* it is present, if not it will invalidate the session.
*
* @param boolean $forceNew If true, force a new token to be created
* @access public
* @return string The session token
*/
function getToken($forceNew = false)
{
$token = $this->get( 'session.token' );
/**
* Method to determine if a token exists in the session. If not the
* session will be set to expired
*
* @param string Hashed token to be verified
* @param boolean If true, expires the session
* @since 1.5
* @static
*/
function hasToken($tCheck, $forceExpire = true)
{
// check if a token exists in the session
$tStored = $this->get( 'session.token' );
/**
* Get session name
*
* @access public
* @return string The session name
*/
function getName()
{
if( $this->_state === 'destroyed' ) {
// @TODO : raise error
return null;
}
return session_name();
}
/**
* Get session id
*
* @access public
* @return string The session name
*/
function getId()
{
if( $this->_state === 'destroyed' ) {
// @TODO : raise error
return null;
}
return session_id();
}
/**
* Get the session handlers
*
* @access public
* @return array An array of available session handlers
*/
function getStores()
{
jimport('joomla.filesystem.folder');
$handlers = JFolder::files(dirname(__FILE__).DS.'storage', '.php$');
/**
* Check whether this session is currently created
*
* @access public
* @return boolean $result true on success
*/
function isNew()
{
$counter = $this->get( 'session.counter' );
if( $counter === 1 ) {
return true;
}
return false;
}
/**
* Get data from the session store
*
* @static
* @access public
* @param string $name Name of a variable
* @param mixed $default Default value of a variable if not set
* @param string $namespace Namespace to use, default to 'default'
* @return mixed Value of a variable
*/
function &get($name, $default = null, $namespace = 'default')
{
$namespace = '__'.$namespace; //add prefix to namespace to avoid collisions
if (isset($_SESSION[$namespace][$name])) {
return $_SESSION[$namespace][$name];
}
return $default;
}
/**
* Set data into the session store
*
* @access public
* @param string $name Name of a variable
* @param mixed $value Value of a variable
* @param string $namespace Namespace to use, default to 'default'
* @return mixed Old value of a variable
*/
function set($name, $value, $namespace = 'default')
{
$namespace = '__'.$namespace; //add prefix to namespace to avoid collisions
/**
* Check wheter data exists in the session store
*
* @access public
* @param string $name Name of variable
* @param string $namespace Namespace to use, default to 'default'
* @return boolean $result true if the variable exists
*/
function has( $name, $namespace = 'default' )
{
$namespace = '__'.$namespace; //add prefix to namespace to avoid collisions
/**
* Unset data from the session store
*
* @access public
* @param string $name Name of variable
* @param string $namespace Namespace to use, default to 'default'
* @return mixed $value the value from session or NULL if not set
*/
function clear( $name, $namespace = 'default' )
{
$namespace = '__'.$namespace; //add prefix to namespace to avoid collisions
/**
* Start a session
*
* Creates a session (or resumes the current one based on the state of the session)
*
* @access private
* @return boolean $result true on success
*/
function _start()
{
// start session if not startet
if( $this->_state == 'restart' ) {
session_id( $this->_createId() );
}
session_cache_limiter('none');
session_start();
// Send modified header for IE 6.0 Security Policy
header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"');
return true;
}
/**
* Frees all session variables and destroys all data registered to a session
*
* This method resets the $_SESSION variable and destroys all of the data associated
* with the current session in its storage (file or DB). It forces new session to be
* started after this method is called. It does not unset the session cookie.
*
* @static
* @access public
* @return void
* @see session_unset()
* @see session_destroy()
*/
function destroy()
{
// session was already destroyed
if( $this->_state === 'destroyed' ) {
return true;
}
// In order to kill the session altogether, like to log the user out, the session id
// must also be unset. If a cookie is used to propagate the session id (default behavior),
// then the session cookie must be deleted.
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-42000, '/');
}
session_unset();
session_destroy();
$this->_state = 'destroyed';
return true;
}
/**
* restart an expired or locked session
*
* @access public
* @return boolean $result true on success
* @see destroy
*/
function restart()
{
$this->destroy();
if( $this->_state !== 'destroyed' ) {
// @TODO :: generated error here
return false;
}
// Re-register the session handler after a session has been destroyed, to avoid PHP bug
$this->_store->register();
/**
* Create a new session and copy variables from the old one
*
* @abstract
* @access public
* @return boolean $result true on success
*/
function fork()
{
if( $this->_state !== 'active' ) {
// @TODO :: generated error here
return false;
}
// restart session with new id
session_id( $id );
session_start();
return true;
}
/**
* Writes session data and ends session
*
* Session data is usually stored after your script terminated without the need
* to call JSession::close(),but as session data is locked to prevent concurrent
* writes only one script may operate on a session at any time. When using
* framesets together with sessions you will experience the frames loading one
* by one due to this locking. You can reduce the time needed to load all the
* frames by ending the session as soon as all changes to session variables are
* done.
*
* @access public
* @see session_write_close()
*/
function close() {
session_write_close();
}
/**
* Create a session id
*
* @static
* @access private
* @return string Session ID
*/
function _createId( )
{
$id = 0;
while (strlen($id) < 32) {
$id .= mt_rand(0, mt_getrandmax());
}
// record proxy forwarded for in the session in case we need it later
if( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
$this->set( 'session.client.forwarded', $_SERVER['HTTP_X_FORWARDED_FOR']);
}
Warning: Cannot modify header information - headers already sent by (output started at /home/hooninside/domains/hooninside.co.cc/public_html/configuration.php:1) in /home/hooninside/domains/hooninside.co.cc/public_html/libraries/joomla/session/session.php on line 416