By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,731 Members | 1,129 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,731 IT Pros & Developers. It's quick & easy.

session_start(0), session already sent error

P: 2
Warning: session_start(): open(/tmp\sess_bd6e0da1ed76c6b86f102376e2efb508, O_RDWR) failed: No such file or directory (2) in C:\Program Files\Apache Group\Apache2\htdocs\Care2x\installer\Installer.ph p on line 104

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\Care2x\installer\Installer.ph p:104) in C:\Program Files\Apache Group\Apache2\htdocs\Care2x\installer\Installer.ph p on line 104

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Program Files\Apache Group\Apache2\htdocs\Care2x\installer\Installer.ph p:104) in C:\Program Files\Apache Group\Apache2\htdocs\Care2x\installer\Installer.ph p on line 104


I applay one installation process i got this error, please give the correct solution of this problem as soon as possible.
Jan 9 '08 #1
Share this Question
Share on Google+
3 Replies


Markus
Expert 5K+
P: 6,050
There's no possible way we can help without the code that is causing this error - we're not pyschics.

use CODE tags when posting code.
Jan 9 '08 #2

P: 2
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. /*
  3.  * Base Installer include file 
  4.  *
  5.  */
  6. error_reporting(E_ALL ^ E_NOTICE);
  7. define('INSTALLER_PATH', realpath(dirname(__FILE__)));
  8. define('INSTALLER_API', true);
  9. define('APP_PATH', realpath(INSTALLER_PATH.'/..'));
  10. require_once(INSTALLER_PATH.'/includes/InstallerConfig.php');
  11. require_once(INSTALLER_PATH.'/includes/InstallerEngine.php');
  12. require_once(INSTALLER_PATH.'/includes/InstallerSmarty.php');
  13. require_once(INSTALLER_PATH.'/includes/Field.php');
  14. require_once(INSTALLER_PATH.'/includes/TextField.php');
  15. require_once(INSTALLER_PATH.'/includes/PasswordField.php');
  16. require_once(INSTALLER_PATH.'/includes/SelectField.php');
  17. require_once(INSTALLER_PATH.'/includes/SeparatorField.php');
  18. require_once(INSTALLER_PATH.'/includes/ErrorStack.php');
  19. require_once(INSTALLER_PATH.'/actions/BaseAction.php');
  20. require_once(INSTALLER_PATH.'/actions/SQLAction.php');
  21. require_once(INSTALLER_PATH.'/actions/SQLFile.php');
  22. require_once(INSTALLER_PATH.'/actions/SQLOptions.php');
  23. require_once(INSTALLER_PATH.'/tests/BaseTest.php');
  24. require_once(INSTALLER_PATH.'/includes/BaseSet.php');
  25. require_once(INSTALLER_PATH.'/includes/VersionSet.php');
  26. require_once(INSTALLER_PATH.'/includes/Version.php');
  27. require_once(INSTALLER_PATH.'/includes/VersionCheck.php');
  28. class Installer{
  29. function Installer() {}
  30.     function getTemplatePath($template_name){
  31.         if(isset($GLOBALS['INSTALLER']['TEMPLATE_DIR'])){
  32.             if(file_exists($GLOBALS['INSTALLER']['TEMPLATE_DIR'].'/'.$template_name)){
  33.                 return     $GLOBALS['INSTALLER']['TEMPLATE_DIR'].'/'.$template_name;
  34.             }
  35.         }
  36.  
  37.         if(file_exists(INSTALLER_PATH.'/templates/'.$template_name)){
  38.             return INSTALLER_PATH.'/templates/'.$template_name;
  39.         }
  40.  
  41.         ErrorStack::addError("Could not find template file $template_name!", ERRORSTACK_ERROR, 'Installer');
  42.         return $template_name;
  43.     }    
  44.  
  45.     function getTestPath($class_name){
  46.         if(isset($GLOBALS['INSTALLER']['TEST_DIRS']) && is_array($GLOBALS['INSTALLER']['TEST_DIRS'])){
  47.             foreach($GLOBALS['INSTALLER']['TEST_DIRS'] as $dir){
  48.                 if(file_exists($dir.'/'.$class_name.'.php')){
  49.                     return $dir.'/'.$class_name.'.php';
  50.                 }
  51.             }
  52.         }
  53.  
  54.         if(file_exists(INSTALLER_PATH.'/tests/'.$class_name.'.php')){
  55.             return INSTALLER_PATH.'/tests/'.$class_name.'.php';
  56.         }
  57.  
  58.         ErrorStack::addError("Could not find file for Test class $class_name", ERRORSTACK_FATAL, 'Installer');
  59.         return FALSE;
  60.     }
  61.  
  62.     function getActionPath($class_name){
  63.         if(isset($GLOBALS['INSTALLER']['ACTION_DIRS']) && is_array($GLOBALS['INSTALLER']['ACTION_DIRS'])){
  64.             foreach($GLOBALS['INSTALLER']['ACTION_DIRS'] as $dir){
  65.                 if(file_exists($dir.'/'.$class_name.'.php')){
  66.                     return $dir.'/'.$class_name.'.php';
  67.                 }
  68.             }
  69.         }
  70.  
  71.         if(file_exists(INSTALLER_PATH.'/actions/'.$class_name.'.php')){
  72.             return INSTALLER_PATH.'/actions/'.$class_name.'.php';
  73.         }
  74.  
  75.         ErrorStack::addError("Could not find file for Action class $class_name", ERRORSTACK_FATAL, 'Installer');
  76.         return FALSE;
  77.     }
  78.  
  79. }
  80. // Bootstrapping tests
  81. // Setup PHP Version numbers
  82. $version_components = split('\.', phpversion());
  83. $GLOBALS['INSTALLER']['PHP_VERSION_MAJOR'] = $version_components[0];
  84. $GLOBALS['INSTALLER']['PHP_VERSION_MINOR'] = $version_components[1];
  85. $GLOBALS['INSTALLER']['PHP_VERSION_REMAINING'] = implode('.', array_splice($version_components, 2));
  86.  
  87. // A basic version check we need at least PHP 4.2 to run
  88. $ver = $GLOBALS['INSTALLER']['PHP_VERSION_MAJOR'].'.'.$GLOBALS['INSTALLER']['PHP_VERSION_MINOR'];
  89. if (version_compare($ver, '4.2', '<')) {
  90.     print("Installer Error: PHP version 4.2 or greater is required to run the installer!");
  91.     die();    
  92. }
  93. $GLOBALS['INSTALLER']['CONFIG_FILE'] = INSTALLER_PATH.'/config.php'; 
  94. if(!file_exists($GLOBALS['INSTALLER']['CONFIG_FILE'])){
  95.     print("Installer Error: Cound not find config file at ".$GLOBALS['INSTALLER']['CONFIG_FILE']);
  96.     die();    
  97. }
  98. $GLOBALS['INSTALLER']['INSTALLER_CONFIG'] =& new InstallerConfig($GLOBALS['INSTALLER']['CONFIG_FILE']);
  99. if($GLOBALS['INSTALLER']['INSTALLER_CONFIG']->parse() === FALSE){
  100.     print("Installer Error: Error parsing config file {$GLOBALS['INSTALLER']['CONFIG_FILE']}<BR>\n");
  101.     print($GLOBALS['INSTALLER']['INSTALLER_CONFIG']->getErrorsHTML());
  102.     die();
  103. }
  104. set_time_limit(0);
  105. session_start();
  106. if(isset($_REQUEST['restart_installer']) || !isset($_SESSION['INSTALLER']['ENGINE']) || !is_a($_SESSION['INSTALLER']['ENGINE'], 'InstallerEngine')){
  107.     $_SESSION['INSTALLER']['ENGINE'] =& new InstallerEngine($GLOBALS['INSTALLER']['INSTALLER_CONFIG']);     
  108. }
  109. $GLOBALS['INSTALLER']['ENGINE'] =& $_SESSION['INSTALLER']['ENGINE'];
  110.  
  111. if(isset($_REQUEST['previous_step'])){
  112.     $GLOBALS['INSTALLER']['ENGINE']->previousStep();
  113. }elseif(isset($_REQUEST['next_step'])){
  114.     $GLOBALS['INSTALLER']['ENGINE']->nextStep();
  115. }
  116. ?>
error:

Warning: session_start(): open(/tmp\sess_7472f367973622b1a3de23b88e1eefb6, O_RDWR) failed: No such file or directory (2) in C:\Program Files\Apache Group\Apache2\htdocs\Care2x\installer\Installer.ph p on line 105

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\Care2x\installer\Installer.ph p:105) in C:\Program Files\Apache Group\Apache2\htdocs\Care2x\installer\Installer.ph p on line 105

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Program Files\Apache Group\Apache2\htdocs\Care2x\installer\Installer.ph p:105) in C:\Program Files\Apache Group\Apache2\htdocs\Care2x\installer\Installer.ph p on line 105
please give me good idea about this problem
Jan 10 '08 #3

ak1dnar
Expert 100+
P: 1,584
The error is is saying clearly what's missing in your script, fix it first then post back if more errors comes.
Jan 10 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.