Post by truelegacygroup » Sat May 12, 2012 11:58 pm

Greetings!! My website path where I am trying to login is located at exnsupplements.com/store/admin but when you go there you getthe error:
Warning: require_once(/home/content/69/9123769/html/exnsupplements/store/system/startup.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/69/9123769/html/store/admin/index.php on line 19

Fatal error: require_once() [function.require]: Failed opening required '/home/content/69/9123769/html/exnsupplements/store/system/startup.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/69/9123769/html/store/admin/index.php on line 19


So when I go to
My Code for index.php it reads

Code: Select all

<?php
// Version
define('VERSION', '1.5.1.3');

// Config
require_once('config.php');
   
// Install 
if (!defined('DIR_APPLICATION')) {
header('Location: install/index.php');
exit;
}

// VirtualQMOD
require_once('./vqmod/vqmod.php');
$vqmod = new VQMod();

// VQMODDED Startup
require_once($vqmod->modCheck(DIR_SYSTEM . 'startup.php'));

// Application Classes
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/customer.php'));
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/affiliate.php'));
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/currency.php'));
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/tax.php'));
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/weight.php'));
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/length.php'));
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/cart.php'));

// Registry
$registry = new Registry();

// Loader
$loader = new Loader($registry);
$registry->set('load', $loader);

// Config
$config = new Config();
$registry->set('config', $config);

// Database 
$db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
$registry->set('db', $db);

// Store
if (isset($_SERVER['HTTPS']) && (($_SERVER['HTTPS'] == 'on') || ($_SERVER['HTTPS'] == '1'))) {
$store_query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE REPLACE(`ssl`, 'www.', '') = '" . $db->escape('https://' . str_replace('www.', '', $_SERVER['HTTP_HOST']) . rtrim(dirname($_SERVER['PHP_SELF']), '/.\\') . '/') . "'");
} else {
$store_query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE REPLACE(`url`, 'www.', '') = '" . $db->escape('http://' . str_replace('www.', '', $_SERVER['HTTP_HOST']) . rtrim(dirname($_SERVER['PHP_SELF']), '/.\\') . '/') . "'");
}

if ($store_query->num_rows) {
$config->set('config_store_id', $store_query->row['store_id']);
} else {
$config->set('config_store_id', 0);
}
// Settings
$query = $db->query("SELECT * FROM " . DB_PREFIX . "setting WHERE store_id = '0' OR store_id = '" . (int)$config->get('config_store_id') . "' ORDER BY store_id ASC");

foreach ($query->rows as $setting) {
if (!$setting['serialized']) {
$config->set($setting['key'], $setting['value']);
} else {
$config->set($setting['key'], unserialize($setting['value']));
}
}

if (!$store_query->num_rows) {
$config->set('config_url', HTTP_SERVER);
$config->set('config_ssl', HTTPS_SERVER);
}

// Url
$url = new Url($config->get('config_url'), $config->get('config_use_ssl') ? $config->get('config_ssl') : $config->get('config_url'));
$registry->set('url', $url);

// Log 
$log = new Log($config->get('config_error_filename'));
$registry->set('log', $log);

function error_handler($errno, $errstr, $errfile, $errline) {
global $log, $config;
switch ($errno) {
case E_NOTICE:
case E_USER_NOTICE:
$error = 'Notice';
break;
case E_WARNING:
case E_USER_WARNING:
$error = 'Warning';
break;
case E_ERROR:
case E_USER_ERROR:
$error = 'Fatal Error';
break;
default:
$error = 'Unknown';
break;
}
if ($config->get('config_error_display')) {
echo '<b>' . $error . '</b>: ' . $errstr . ' in <b>' . $errfile . '</b> on line <b>' . $errline . '</b>';
}
if ($config->get('config_error_log')) {
$log->write('PHP ' . $error . ':  ' . $errstr . ' in ' . $errfile . ' on line ' . $errline);
}

return true;
}
// Error Handler
set_error_handler('error_handler');

// Request
$request = new Request();
$registry->set('request', $request);
 
// Response
$response = new Response();
$response->addHeader('Content-Type: text/html; charset=utf-8');
$response->setCompression($config->get('config_compression'));
$registry->set('response', $response); 
// Cache
$cache = new Cache();
$registry->set('cache', $cache); 

// Session
$session = new Session();
$registry->set('session', $session); 

// Language Detection
$languages = array();

$query = $db->query("SELECT * FROM " . DB_PREFIX . "language"); 

foreach ($query->rows as $result) {
$languages[$result['code']] = $result;
}

$detect = '';

if (isset($request->server['HTTP_ACCEPT_LANGUAGE']) && ($request->server['HTTP_ACCEPT_LANGUAGE'])) { 
$browser_languages = explode(',', $request->server['HTTP_ACCEPT_LANGUAGE']);
foreach ($browser_languages as $browser_language) {
foreach ($languages as $key => $value) {
if ($value['status']) {
$locale = explode(',', $value['locale']);

if (in_array($browser_language, $locale)) {
$detect = $key;
}
}
}
}
}

if (isset($request->get['language']) && array_key_exists($request->get['language'], $languages) && $languages[$request->get['language']]['status']) {
$code = $request->get['language'];
} elseif (isset($session->data['language']) && array_key_exists($session->data['language'], $languages)) {
$code = $session->data['language'];
} elseif (isset($request->cookie['language']) && array_key_exists($request->cookie['language'], $languages)) {
$code = $request->cookie['language'];
} elseif ($detect) {
$code = $detect;
} else {
$code = $config->get('config_language');
}

if (!isset($session->data['language']) || $session->data['language'] != $code) {
$session->data['language'] = $code;
}

if (!isset($request->cookie['language']) || $request->cookie['language'] != $code) {  
setcookie('language', $code, time() + 60 * 60 * 24 * 30, '/', $request->server['HTTP_HOST']);
}

$config->set('config_language_id', $languages[$code]['language_id']);
$config->set('config_language', $languages[$code]['code']);

// Language
$language = new Language($languages[$code]['directory']);
$language->load($languages[$code]['filename']);
$registry->set('language', $language); 

// Document
$document = new Document();
$registry->set('document', $document);

// Customer
$registry->set('customer', new Customer($registry));

// Affiliate
$affiliate = new Affiliate($registry);
$registry->set('affiliate', $affiliate);

if (isset($request->get['tracking']) && !isset($request->cookie['tracking'])) {
setcookie('tracking', $request->get['tracking'], time() + 3600 * 24 * 1000, '/');
}
// Currency
$registry->set('currency', new Currency($registry));

// Tax
$tax = new Tax($registry);
$registry->set('tax', $tax);

// Weight
$registry->set('weight', new Weight($registry));

// Length
$registry->set('length', new Length($registry));

// Cart
$registry->set('cart', new Cart($registry));
// Front Controller 
$controller = new Front($registry);

// Maintenance Mode
$controller->addPreAction(new Action('common/maintenance'));

// SEO URL's
$controller->addPreAction(new Action('common/seo_url'));
// Router
if (isset($request->get['route'])) {
$action = new Action($request->get['route']);
} else {
$action = new Action('common/home');
}

// Dispatch
$controller->dispatch($action, new Action('error/not_found'));

// Output
$response->output();
?>

Please help :(


Posts

Joined
Sat May 12, 2012 11:55 pm

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by MarketInSG » Sun May 13, 2012 3:18 pm

check your config.php. Most likely it's because your host changed the path to directory.

use this code to test. create a test.php file and add this

Code: Select all

<?php
echo realpath("test.php");
?>
then compare the path with the config.php file.


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by haydent » Tue Jun 19, 2012 3:58 pm

note there is config.php in admin folder too

User avatar
Active Member

Posts

Joined
Wed Nov 09, 2011 9:50 am
Location - Sydney, Australia

Post by adqa » Tue Nov 11, 2014 5:39 pm

Hi! Thanks MarketInSG. I used this code and, indeed, the path was wrong. I changed it, and now it works again.

Thank you!

Image


Newbie

Posts

Joined
Fri May 21, 2010 6:45 pm

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by magzen » Sat Mar 07, 2015 6:50 pm

Thanks MarketInSG this helped me out

Active Member

Posts

Joined
Tue Jun 05, 2012 7:04 pm

Post by rajeevdutta » Thu Sep 24, 2015 7:57 pm

Please Help..... I can not Log into my Admin Panel

I recieve this ERROR message

Warning: require_once(/home/ac4e19c4/public_html/oc1551/system/startup.php): failed to open stream: No such file or directory in /home/ac4e19c4/public_html/admin/index.php on line 17

Fatal error: require_once(): Failed opening required '/home/ac4e19c4/public_html/oc1551/system/startup.php' (include_path='.:/usr/local/lib/php') in /home/ac4e19c4/public_html/admin/index.php on line 17

Attachments


Newbie

Posts

Joined
Wed Sep 23, 2015 10:20 pm

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore
Who is online

Users browsing this forum: Bing [Bot] and 35 guests