* @copyright (c) 2009-2014 Open Classifieds Team * @license GPL v3 */ ob_start(); error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); ini_set('display_errors', 1); @set_time_limit(0); // Set the full path to the docroot define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR); //we check first short tags if not we can not even load the installer if (! ((bool) ini_get('short_open_tag')) ) die('OE Installation requirement: Before you proceed with your OE installation: Keep in mind OE uses the short tag "short cut" syntax.

Thus the short_open_tag directive must be enabled in your php.ini.

Easy Solution:
  1. Open php.ini file and look for line short_open_tag = Off
  2. Replace it with short_open_tag = On
  3. Restart then your PHP server
  4. Refresh this page to resume your OE installation
  5. Enjoy OE ;)
'); if (file_exists(DOCROOT.'oc/config/database.php')) die('Seems Open eShop it is already insalled'); //read from oc/versions.json on CDN $versions = install::versions(); $last_version = key($versions); $is_compatible = install::is_compatible(); /** * Helper installation classses * * @package Install * @category Helper * @author Chema * @copyright (c) 2009-2014 Open Classifieds Team * @license GPL v3 */ /** * Class with install functions helper */ class install{ /** * * Software install settings * @var string */ const VERSION = '2.7.0'; /** * message to notify * @var string */ public static $msg = ''; /** * installation error messages here * @var string */ public static $error_msg = ''; /** * checks that your hosting has everything that needs to have * @return array */ public static function requirements() { /** * mod rewrite check */ $mod_result = ((function_exists('apache_get_modules') AND in_array('mod_rewrite',apache_get_modules())) OR (getenv('HTTP_MOD_REWRITE')=='On') OR (strpos(@shell_exec('/usr/local/apache/bin/apachectl -l'), 'mod_rewrite') !== FALSE) OR (isset($_SERVER['IIS_UrlRewriteModule']))); $mod_msg = ($mod_result)?NULL:'Can not check if mod_rewrite is installed, probably everything is fine. Try to proceed with the installation anyway ;)'; /** * all the install checks */ return array( 'New Installation'=>array('message' => 'Seems Open eShop it is already insalled', 'mandatory' => TRUE, 'result' => !file_exists('oc/config/database.php') ), 'Write DIR' =>array('message' => 'Can\'t write to the current directory. Please fix this by giving the webserver user write access to the directory.', 'mandatory' => TRUE, 'result' => (is_writable(DOCROOT)) ), 'PHP' =>array('message' => 'PHP 5.6 or newer required, this version is '. PHP_VERSION, 'mandatory' => TRUE, 'result' => version_compare(PHP_VERSION, '5.6', '>=') ), 'mod_rewrite'=>array('message' => $mod_msg, 'mandatory' => FALSE, 'result' => $mod_result ), 'Short Tag' =>array('message' => 'short_open_tag must be enabled in your php.ini.', 'mandatory' => TRUE, 'result' => (bool) ini_get('short_open_tag') ), 'Safe Mode' =>array('message' => 'SPL is either not loaded or not compiled in.', 'mandatory' => TRUE, 'result' => (function_exists('spl_autoload_register')) ), 'Reflection'=>array('message' => 'PHP reflection is either not loaded or not compiled in.', 'mandatory' => TRUE, 'result' => (class_exists('ReflectionClass')) ), 'Filters' =>array('message' => 'The filter extension is either not loaded or not compiled in.', 'mandatory' => TRUE, 'result' => (function_exists('filter_list')) ), 'Iconv' =>array('message' => 'The iconv extension is not loaded.', 'mandatory' => TRUE, 'result' => (extension_loaded('iconv')) ), 'Mbstring' =>array('message' => 'The mbstring extension is not loaded.', 'mandatory' => TRUE, 'result' => (extension_loaded('mbstring')) ), 'CType' =>array('message' => 'The ctype extension is not enabled.', 'mandatory' => TRUE, 'result' => (function_exists('ctype_digit')) ), 'URI' =>array('message' => 'Neither $_SERVER[\'REQUEST_URI\'], $_SERVER[\'PHP_SELF\'], or $_SERVER[\'PATH_INFO\'] is available.', 'mandatory' => TRUE, 'result' => (isset($_SERVER['REQUEST_URI']) OR isset($_SERVER['PHP_SELF']) OR isset($_SERVER['PATH_INFO'])) ), 'cUrl' =>array('message' => 'Install requires the cURL extension for the Request_Client_External class.', 'mandatory' => TRUE, 'result' => (extension_loaded('curl')) ), 'mcrypt' =>array('message' => 'Install requires the mcrypt for the Encrypt class.', 'mandatory' => TRUE, 'result' => (extension_loaded('mcrypt')) ), 'GD' =>array('message' => 'Install requires the GD v2 for the Image class', 'mandatory' => TRUE, 'result' => (function_exists('gd_info')) ), 'MySQL' =>array('message' => 'Install requires the MySQL extension to support MySQL databases.', 'mandatory' => TRUE, 'result' => (function_exists('mysqli_connect')) ), 'ZipArchive' =>array('message' => 'PHP module zip not installed. You will need this to auto update the software.', 'mandatory' => FALSE, 'result' => class_exists('ZipArchive') ), 'SoapClient' =>array('message' => 'Install requires the SoapClient class.', 'mandatory' => FALSE, 'result' => class_exists('SoapClient') ), ); } /** * checks from requirements if its compatible or not. Also fills the msg variable * @return boolean */ public static function is_compatible() { self::$msg = ''; $compatible = TRUE; foreach (install::requirements() as $values) { if ($values['mandatory'] == TRUE AND $values['result'] == FALSE) $compatible = FALSE; if ($values['result'] == FALSE) self::$msg .= $values['message'].'
'; } return $compatible; } /** * get phpinfo clean in a string * @return strin */ public static function phpinfo() { ob_start(); @phpinfo(); $phpinfo = ob_get_contents(); ob_end_clean(); //strip the body html return preg_replace('%^.*(.*).*$%ms', '$1', $phpinfo); } /** * returns array last version from json * @return array */ public static function versions() { return json_decode(core::curl_get_contents('http://open-eshop.com/files/versions.json?r='.time()),TRUE); } } class core{ /** * copies files/directories recursively * @param string $source from * @param string $dest to * @param boolean $overwrite overwrite existing file * @return void */ public static function copy($source, $dest, $overwrite = false) { //Lets just make sure our new folder is already created. Alright so its not efficient to check each time... bite me if(is_file($dest)) { copy($source, $dest); return; } if(!is_dir($dest)) mkdir($dest); $objects = scandir($source); foreach ($objects as $object) { if($object != '.' && $object != '..') { $path = $source . '/' . $object; if(is_file( $path)) { if(!is_file( $dest . '/' . $object) || $overwrite) { if(!@copy( $path, $dest . '/' . $object)) die('File ('.$path.') could not be copied, likely a permissions problem.'); } } elseif(is_dir( $path)) { if(!is_dir( $dest . '/' . $object)) mkdir( $dest . '/' . $object); // make subdirectory before subdirectory is copied core::copy($path, $dest . '/' . $object, $overwrite); //recurse! } } } } /** * deletes file or directory recursevely * @param string $file * @return void */ public static function delete($file) { if (is_dir($file)) { $objects = scandir($file); foreach ($objects as $object) { if ($object != '.' AND $object != '..') { if (is_dir($file.'/'.$object)) core::delete($file.'/'.$object); else unlink($file.'/'.$object); } } reset($objects); @rmdir($file); } elseif(is_file($file)) unlink($file); } /** * gets the html content from a URL * @param string $url * @return string */ public static function curl_get_contents($url) { $c = curl_init(); if ($c === FALSE) return FALSE; curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_URL, $url); curl_setopt($c, CURLOPT_TIMEOUT,30); // curl_setopt($c, CURLOPT_FOLLOWLOCATION, TRUE); // $contents = curl_exec($c); $contents = core::curl_exec_follow($c); curl_close($c); return ($contents)? $contents : FALSE; } /** * [curl_exec_follow description] http://us2.php.net/manual/en/function.curl-setopt.php#102121 * @param curl $ch handler * @param integer $maxredirect hoe many redirects we allow * @return contents */ public static function curl_exec_follow($ch, $maxredirect = 5) { //using normal curl redirect if (ini_get('open_basedir') == '' AND ini_get('safe_mode' == 'Off')) { curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $maxredirect > 0); curl_setopt($ch, CURLOPT_MAXREDIRS, $maxredirect); } //using safemode...WTF! else { curl_setopt($ch, CURLOPT_FOLLOWLOCATION, FALSE); if ($maxredirect > 0) { $newurl = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); $rch = curl_copy_handle($ch); curl_setopt($rch, CURLOPT_HEADER, TRUE); curl_setopt($rch, CURLOPT_NOBODY, TRUE); curl_setopt($rch, CURLOPT_FORBID_REUSE, FALSE); curl_setopt($rch, CURLOPT_RETURNTRANSFER, TRUE); do { curl_setopt($rch, CURLOPT_URL, $newurl); $header = curl_exec($rch); if (curl_errno($rch)) $code = 0; else { $code = curl_getinfo($rch, CURLINFO_HTTP_CODE); if ($code == 301 OR $code == 302) { preg_match('/Location:(.*?)\n/', $header, $matches); $newurl = trim(array_pop($matches)); } else $code = 0; } } while ($code AND --$maxredirect); curl_close($rch); if (!$maxredirect) { if ($maxredirect === NULL) trigger_error('Too many redirects. When following redirects, libcurl hit the maximum amount.', E_USER_WARNING); else $maxredirect = 0; return FALSE; } curl_setopt($ch, CURLOPT_URL, $newurl); } } return curl_exec($ch); } /** * rss reader * @param string $url * @return array */ public static function rss($url) { $rss = @simplexml_load_file($url); if($rss == FALSE OR ! isset($rss->channel->item)) return array(); return $rss->channel->item; } /** * shortcut for the query method $_GET * @param [type] $key [description] * @param [type] $default [description] * @return [type] [description] */ public static function get($key,$default=NULL) { return (isset($_GET[$key]))?$_GET[$key]:$default; } /** * shortcut for $_POST[] * @param [type] $key [description] * @param [type] $default [description] * @return [type] [description] */ public static function post($key,$default=NULL) { return (isset($_POST[$key]))?$_POST[$key]:$default; } /** * shortcut to get or post * @param [type] $key [description] * @param [type] $default [description] * @return [type] [description] */ public static function request($key,$default=NULL) { return (core::post($key)!==NULL)?core::post($key):core::get($key,$default); } } /** * gettext short cut currently just echoes * @param [type] $msgid [description] * @return [type] [description] */ function __($msgid) { return $msgid; } ?> Open eShop <?=__("Installation")?>
open('oe.zip')) { if ( !($folder_update = $zip->getNameIndex(0)) ) { hosting_view(); exit; } $zip->extractTo(DOCROOT); $zip->close(); core::copy($folder_update, DOCROOT); // delete downloaded zip file core::delete($folder_update); @unlink('oe.zip'); @unlink($_SERVER['SCRIPT_FILENAME']); // redirect to install header("Location: index.php"); } else hosting_view(); } //normally if its compaitble just display the form elseif ($is_compatible === TRUE) {?>

v.

phpinfo()

$values): $color = ($values['result'])?'success':'danger';?>

">
%s',$color,$name);?>


Open eShop





Ups! You need a compatible Hosting

Your hosting seems to be not compatible. Check your settings.

We have partnership with hosting companies to assure compatibility. And we include:

  • 100% Compatible High Speed Hosting
  • 1 Premium Theme, of your choice worth $49.99
  • Professional Installation and Support worth $89

  • Get Hosting! Less than $5 Month