install.php
changeset 199 c15c1d2bdeb8
parent 198 d5dff8148dfe
child 200 07cf7b0c175f
equal deleted inserted replaced
198:d5dff8148dfe 199:c15c1d2bdeb8
  1159       $cf_handle = fopen(ENANO_ROOT.'/config.new.php', 'w');
  1159       $cf_handle = fopen(ENANO_ROOT.'/config.new.php', 'w');
  1160       if(!$cf_handle) err('Couldn\'t open file config.php for writing');
  1160       if(!$cf_handle) err('Couldn\'t open file config.php for writing');
  1161       fwrite($cf_handle, $config_file);
  1161       fwrite($cf_handle, $config_file);
  1162       fclose($cf_handle);
  1162       fclose($cf_handle);
  1163       
  1163       
       
  1164       echo 'done!<br />Renaming config.new.php and .htaccess.new...';
       
  1165       if ( !@rename('./config.new.php', './config.php') )
       
  1166         err('failed!<p>Please rename config.new.php manually to config.php. If you selected Tiny URLs, please also rename .htaccess.new to .htaccess.');
       
  1167       
       
  1168       if ( $_POST['urlscheme'] == 'tiny' )
       
  1169       {
       
  1170         if ( !@rename('./.htaccess.new', './.htaccess') )
       
  1171           err('failed!<p>Please rename .htaccess.new manually to .htaccess.');
       
  1172       }
       
  1173             
  1164       echo 'done!<br />Starting the Enano API...';
  1174       echo 'done!<br />Starting the Enano API...';
  1165       
  1175       
  1166       $template_bak = $template;
  1176       $template_bak = $template;
  1167       
  1177       
  1168       // Get Enano loaded
  1178       // Get Enano loaded
  1202       // unset($session);
  1212       // unset($session);
  1203       // $session = new sessionManager();
  1213       // $session = new sessionManager();
  1204       // $session->start();
  1214       // $session->start();
  1205       
  1215       
  1206       PageUtils::flushlogs('Main_Page', 'Article');
  1216       PageUtils::flushlogs('Main_Page', 'Article');
  1207       
       
  1208       echo 'done!<br />Renaming config.new.php and .htaccess.new...';
       
  1209       if ( !@rename('./config.new.php', './config.php') )
       
  1210         err('failed!<p>Please rename config.new.php manually to config.php. If you selected Tiny URLs, please also rename .htaccess.new to .htaccess.');
       
  1211       
       
  1212       if ( $_POST['urlscheme'] == 'tiny' )
       
  1213       {
       
  1214         if ( !@rename('./.htaccess.new', './.htaccess') )
       
  1215           err('failed!<p>Please rename .htaccess.new manually to .htaccess.');
       
  1216       }
       
  1217       
  1217       
  1218       echo 'done!<h3>Installation of Enano is complete.</h3><p>Review any warnings above, and then <a href="install.php?mode=finish">click here to finish the installation</a>.';
  1218       echo 'done!<h3>Installation of Enano is complete.</h3><p>Review any warnings above, and then <a href="install.php?mode=finish">click here to finish the installation</a>.';
  1219       
  1219       
  1220       // echo '<script type="text/javascript">window.location="'.scriptPath.'/install.php?mode=finish";</script>';
  1220       // echo '<script type="text/javascript">window.location="'.scriptPath.'/install.php?mode=finish";</script>';
  1221       
  1221