Fatal error: Call to a member function https() on a non-object in C:\xampp\htdocs\pevexenterprises.co.uk\admin\controller\common\header.php on line 80
Can anyone help as the spreadsheet function will assist in uploading products etc.
Regards
Best Regards,
David Catherall,
AireTech IT.
Fatal error: Call to a member function query() on a non-object in C:\xampp\htdocs\pevexenterprises.co.uk\admin\model\tool\export.php on line 72
Trying to export current database using Import / Export
Has anyone experienced this?
Mark
For query issue: http://forum.opencart.com/viewtopic.php?f=22&t=12077
In future use this http://forum.opencart.com/search.php
Best Regards,
David Catherall,
AireTech IT.
Not another thing has been done. Installed it, then installed the imp/exp and get messages.
Latest - Fatal error: Call to a member function https() on a non-object in /home/lingcust/public_html/admin/controller/common/header.php on line 80
This is with the 1.4.x import export installed, then the "fix" installed.
Using the further URL edited index.php files only results in different messages about line 129.
A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!
Best Regards,
David Catherall,
AireTech IT.
Was hoping maybe some could work from the one error.
Here is the message going into admin with the "fix" and the URL edit in the index.php files -
Warning: require_once(/home/lingcust/public_html/system/engine/url.php) [function.require-once]: failed to open stream: No such file or directory in /home/lingcust/public_html/admin/index.php on line 92
Fatal error: require_once() [function.require]: Failed opening required '/home/lingcust/public_html/system/engine/url.php' (include_path='.:/usr/lib/php') in /home/lingcust/public_html/admin/index.php on line 92
And get these trying to go to the front end home page -
Warning: require_once(/home/lingcust/public_html/system/engine/url.php) [function.require-once]: failed to open stream: No such file or directory in /home/lingcust/public_html/index.php on line 119
Fatal error: require_once() [function.require]: Failed opening required '/home/lingcust/public_html/system/engine/url.php' (include_path='.:/usr/lib/php') in /home/lingcust/public_html/index.php on line 119
Actually, line 92 is empty, it is between
$registry->set('response', $response);
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<92 is blank. My <<<<<<<
// Store
And line 119 is the middle of the code Q said to add -
// Q: Restore the Url class
require_once(DIR_SYSTEM . 'engine/url.php'); <<<<<<<<<<<<< 119
$registry->set('url', new Url());
Here's the whole file
<?php
// Configuration
require_once('config.php');
// Install
if (!defined('DIR_APPLICATION')) {
header('Location: install/index.php');
exit;
}
// Startup
require_once(DIR_SYSTEM . 'startup.php');
// Application Classes
require_once(DIR_SYSTEM . 'library/customer.php');
require_once(DIR_SYSTEM . 'library/currency.php');
require_once(DIR_SYSTEM . 'library/tax.php');
require_once(DIR_SYSTEM . 'library/weight.php');
require_once(DIR_SYSTEM . 'library/length.php');
require_once(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);
// Settings
$query = $db->query("SELECT * FROM " . DB_PREFIX . "setting");
foreach ($query->rows as $setting) {
$config->set($setting['key'], $setting['value']);
}
// Log
$log = new Log($config->get('config_error_filename'));
$registry->set('log', $log);
// Error Handler
function error_handler($errno, $errstr, $errfile, $errline) {
global $config, $log;
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');
$registry->set('response', $response);
// Store
$query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE url = '" . $db->escape('http://' . $request->server['HTTP_HOST'] . rtrim(dirname($request->server['PHP_SELF']), '/.\\') . '/') . "' OR url = '" . $db->escape('http://' . str_replace('www.', '', $request->server['HTTP_HOST']) . rtrim(dirname($request->server['PHP_SELF']), '/.\\') . '/') . "'");
if (!$query->num_rows) {
$query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE store_id = '" . (int)$config->get('config_store_id') . "'");
}
foreach ($query->row as $key => $value) {
$config->set('config_' . $key, $value);
}
define('HTTP_SERVER', $config->get('config_url'));
define('HTTP_IMAGE', HTTP_SERVER . 'image/');
if ($config->get('config_ssl')) {
define('HTTPS_SERVER', 'https://' . substr($config->get('config_url'), 0, 7));
define('HTTPS_IMAGE', HTTPS_SERVER . 'image/');
} else {
define('HTTPS_SERVER', HTTP_SERVER);
define('HTTPS_IMAGE', HTTP_IMAGE);
}
// Cache
$registry->set('cache', new Cache());
// Q: Restore the Url class
require_once(DIR_SYSTEM . 'engine/url.php');
$registry->set('url', new Url());
// Session
$session = new Session();
$registry->set('session', $session);
// Document
$registry->set('document', new Document());
// Language Detection
$languages = array();
$query = $db->query("SELECT * FROM " . DB_PREFIX . "language");
foreach ($query->rows as $result) {
$languages[$result['code']] = array(
'language_id' => $result['language_id'],
'name' => $result['name'],
'code' => $result['code'],
'locale' => $result['locale'],
'directory' => $result['directory'],
'filename' => $result['filename']
);
}
$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) {
$locale = explode(',', $value['locale']);
if (in_array($browser_language, $locale)) {
$detect = $key;
}
}
}
}
if (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']);
// Language
$language = new Language($languages[$code]['directory']);
$language->load($languages[$code]['filename']);
$registry->set('language', $language);
// Customer
$registry->set('customer', new Customer($registry));
// Currency
$registry->set('currency', new Currency($registry));
// Tax
$registry->set('tax', new Tax($registry));
// 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);
// 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();
?>
A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!
Missed that #1 entirely.
A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!
In order to get an idea of the structure of the data, I did an export. There was no questions about categories or products, it reads like you will get both in 1 file called backup_categories_products.xls
But, there is only categories in the file. Not a product one shown, but all of the demo products are there. What has to be done to get them? The file name suggests you will get them all.
Also, when entering new categories, how do you know what the ID numbers are? Can these be auto-assigned, or do you have to work up some sort of numbering scheme on your own?
If there is a method to numbering the parents and the children, how is it organized? I've got 100 or more cats and subcats, so I'd like to import them and be done with it. Then get the numbers for the product import, I imagine.
How to export the products?
A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!
What exactly is the problem regarding products as you have contradicted yourself at least twice in your message, and no offence intended but you have just totally blagged my head with the way you have worded the above LOL... As you say the demo products are there, I can't actually see an issue here.peteVA wrote:OK, moving on -
In order to get an idea of the structure of the data, I did an export. There was no questions about categories or products, it reads like you will get both in 1 file called backup_categories_products.xls
But, there is only categories in the file. Not a product one shown, but all of the demo products are there. What has to be done to get them? The file name suggests you will get them all.
Also, when entering new categories, how do you know what the ID numbers are? Can these be auto-assigned, or do you have to work up some sort of numbering scheme on your own?
If there is a method to numbering the parents and the children, how is it organized? I've got 100 or more cats and subcats, so I'd like to import them and be done with it. Then get the numbers for the product import, I imagine.
How to export the products?
Regarding categories ID, I just increase the numbers myself, I tried leaving the field in the excel file blank and mine wouldn't insert so I assume it does not do this automatically.
To be honest the method for numbering is a bit of a pain, how I did it with our 100+ categories is import them first, get the numbers and then use them to set the products up...
Best Regards,
David Catherall,
AireTech IT.
The demo products are in the cart / database.
The demo products do not export.
I added an additional category through the normal admin process - that new cat showed in the export.
I added an additional product in the new category, entering something in every field, but just as with the pre-installed demo products, that new product also did not export.
So, categories export - products do not.
A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!
Just tried again on the export - same results, Get the cats, no product.
If I could get the correct string of fields, I'd try an import, just to see if it works, but without knowing exactly how to set up the csv I can't do much of anything.
That's the only reason I want to export, so I can see the exact format of the file. If I had that, I could at least try an import, but it would have to be for the multistore version.
A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!
Yes - I reported this problem with the version for OC 1.3.4 a looooooong time ago (now moving to 1.4.4. I was able to get Categories, but not even a heading for "product" showed in the export file.peteVA wrote:clean, no errors.
Just tried again on the export - same results, Get the cats, no product.
Look forward to seeing what the solution is for this.....
A stupid question is the one you -don't- ask.........(Anon)
)C1.5.0.1 (IN devel)
OC V1.4.9.5
OC V1.4.9.2
OC V1.4.7
OC V1.3.4
Users browsing this forum: No registered users and 138 guests