We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Expression Enginer 1.6.8 index file

Development and Programming

Robert's avatar
Robert
1 posts
5 years ago
Robert's avatar Robert

Hi all,

Looking for some help, I have a client who is running a ten year old version of Expression Engine, version 1.6.8 😊

For whatever reason the index.php file was overwritten with garbage, and the site no longer works. Just a blank white page for the website.

Would anyone kindly have a copy of the index.php (bootstrap index.php) from around version 1.6 or thereabouts? I’ve searched high and low on the internet with no joy, the Github repo only has code going back as far as version 2 onwards, nothing from Version 1.

Thanks in advance.

Robert

       
earthisland's avatar
earthisland
45 posts
5 years ago
earthisland's avatar earthisland

maybe you already found this, but if not… here’s one from a 1.6x install:

<?php

/*

ExpressionEngine - by EllisLab

http://expressionengine.com/

Copyright (c) 2003 - 2007 EllisLab, Inc.

THIS IS COPYRIGHTED SOFTWARE PLEASE READ THE LICENSE AGREEMENT

http://expressionengine.com/docs/license.html

File: index.php

Purpose: Triggers the main engine

*/

// URI Type // This variable allows you to hard-code the URI type. // For most servers, 0 works fine. // 0 = auto
// 1 = path_info
// 2 = query_string

$qtype = 0;

// DO NOT EDIT BELOW THIS!!!

error_reporting(0);

if (isset($_GET[‘URL’])) { /** ——————————— /** URL Redirect for CP and Links in Comments /** ———————————*/

$_GET[‘URL’] = str_replace(array(“\r”, “\r\n”, “\n”, ‘%3A’,’%3a’,’%2F’,’%2f’, ‘%0D’, ‘%0A’, ‘%09’, ‘[removed]’), array(”, ”, ”, ‘:’, ‘:’, ‘/’, ‘/’, ”, ”, ”, ”), $_GET[‘URL’]);

if (substr($_GET[‘URL’], 0, 4) != “http” AND ! ereg(‘://’, $_GET[‘URL’])) $_GET[‘URL’] = “http://”.$_GET[‘URL’];

$_GET[‘URL’] = str_replace( array(‘”’, “’”, ‘)’, ‘(‘, ‘;’, ‘}’, ‘{‘, ‘script%’, ‘script&’, ‘(’, ‘)’, ‘<’), ”, strip_tags($_GET[‘URL’]));

$host = ( ! isset($_SERVER[‘HTTP_HOST’])) ? ” : (substr($_SERVER[‘HTTP_HOST’],0,4) == ‘www.’ ? substr($_SERVER[‘HTTP_HOST’], 4) : $_SERVER[‘HTTP_HOST’]);

if ( ! isset($_SERVER[‘HTTP_REFERER’]) OR ! stristr($_SERVER[‘HTTP_REFERER’], $host)) { // Possibly not from our site, so we give the user the option // Of clicking the link or not

$str = “<html>\n<head>\n<title>Redirect</title>\n</head>\n<body>”. “To proceed to the URL you have requested, click the link below:”. “”.$_GET[‘URL’].”\n</body>\n</html>”; } else { $str = “<html>\n<head>\n<title>Redirect</title>\n”. ‘<meta http-equiv=”refresh” content=”0; URL=’.$_GET[‘URL’].’”>’. “\n</head>\n<body>\n</body>\n</html>”; }

exit($str); }

$uri = ”; $pathinfo = pathinfo(FILE); $ext = ( ! isset($pathinfo[‘extension’])) ? ‘.php’ : ‘.’.$pathinfo[‘extension’]; $self = ( ! isset($pathinfo[‘basename’])) ? ‘index’.$ext : $pathinfo[‘basename’];

$path_info = (isset($_SERVER[‘PATH_INFO’])) ? $_SERVER[‘PATH_INFO’] : @getenv(‘PATH_INFO’); $query_str = (isset($_SERVER[‘QUERY_STRING’])) ? $_SERVER[‘QUERY_STRING’] : @getenv(‘QUERY_STRING’);

switch ($qtype) { case 0 : $uri = ($path_info != ” AND $path_info != “/”.$self) ? $path_info : $query_str; break; case 1 : $uri = $path_info;
break; case 2 : $uri = $query_str; break; }

unset($system_path); unset($config_file); unset($path_info); unset($query_str); unset($qstr);

require ‘path’.$ext;

if ((isset($template_group) AND isset($template)) && $uri != ” && $uri != ‘/’) { $template_group = ”; $template = ”; }

if ( ! isset($system_path)) { if (file_exists(‘install’.$ext)) { header(“location: install”.$ext); exit; } else { exit(“The system does not appear to be installed. Click here to install it.”); } }

if ( ! ereg(“/$”, $system_path)) $system_path .= ‘/’;

if ( ! @include($system_path.’core/core.system’.$ext)) { exit(“The system path does not appear to be set correctly. Please open your path.php file and correct the path.”); }

?>

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.