Hi everyone
I set the cache to be 'off via the settings icon in the top RHS. I have just started 'playing' with a new store in opencart. Since then I have not been able to get into the admin panel. I get the following error.
Notice: Use of undefined constant DIR_STORAGE - assumed 'DIR_STORAGE' in /home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/admin/controller/startup/sass.php on line 7Warning: include_once(DIR_STORAGE/vendor/scss.inc.php): failed to open stream: No such file or directory in /home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/admin/controller/startup/sass.php on line 7Warning: include_once(): Failed opening 'DIR_STORAGE/vendor/scss.inc.php' for inclusion (include_path='.:/usr/share/pear7:/usr/share/php') in /home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/admin/controller/startup/sass.php on line 7
Please help. I am very new to Opencart (2 days). The store still load fine, but the admin panel fails to load.
Many thanks in advance.....
G
Hi
This is my config.php file in /admin:
<?php
// HTTP
define('HTTP_SERVER', 'http://adultsonlytime.co.uk/admin/');
define('HTTP_CATALOG', 'http://adultsonlytime.co.uk/');
// HTTPS
//define('HTTPS_SERVER', 'http://adultsonlytime.co.uk/admin/');
//define('HTTPS_CATALOG', 'http://adultsonlytime.co.uk/');
// DIR
define('DIR_APPLICATION', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/admin/');
define('DIR_SYSTEM', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/');
define('DIR_IMAGE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/image/');
define('DIR_LANGUAGE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/admin/language/');
define('DIR_TEMPLATE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/admin/view/template/');
define('DIR_CONFIG', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/config/');
define('DIR_CACHE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/cache/');
define('DIR_DOWNLOAD', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/download/');
define('DIR_LOGS', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/logs/');
define('DIR_MODIFICATION', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/modification/');
define('DIR_UPLOAD', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/upload/');
define('DIR_CATALOG', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/catalog/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'mysql6.clusterdb.net');
define('DB_USERNAME', 'a-ope-bxq-u-208024');
define('DB_PASSWORD', 'xxxxxxxx');
define('DB_DATABASE', 'a-ope-bxq-u-208024');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');
And this is the config.php in root:
<?php
// HTTP
define('HTTP_SERVER', 'http://adultsonlytime.co.uk/');
// HTTPS
//define('HTTPS_SERVER', 'http://adultsonlytime.co.uk/');
// DIR
define('DIR_APPLICATION', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/catalog/');
define('DIR_SYSTEM', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/');
define('DIR_IMAGE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/image/');
define('DIR_LANGUAGE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/catalog/language/');
define('DIR_TEMPLATE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/catalog/view/theme/');
define('DIR_CONFIG', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/config/');
define('DIR_CACHE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/cache/');
define('DIR_DOWNLOAD', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/download/');
define('DIR_LOGS', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/logs/');
define('DIR_MODIFICATION', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/modification/');
define('DIR_UPLOAD', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/upload/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'mysql6.clusterdb.net');
define('DB_USERNAME', 'a-ope-bxq-u-208024');
define('DB_PASSWORD', 'xxxxxxx');
define('DB_DATABASE', 'a-ope-bxq-u-208024');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');
The only difference I can see is in admin/config.php it has:
define('HTTP_SERVER', 'http://adultsonlytime.co.uk/admin/');
define('HTTP_CATALOG', 'http://adultsonlytime.co.uk/');
rather than root config.php:
define('HTTP_SERVER', 'http://adultsonlytime.co.uk/');
I have changed the root config.php file to be:
//define('HTTP_SERVER', 'http://adultsonlytime.co.uk/');
define('HTTP_SERVER', 'http://adultsonlytime.co.uk/admin/');
define('HTTP_CATALOG', 'http://adultsonlytime.co.uk/');
Made no difference, apart from the main site now won't load correctly:
Thanks for your help with this. My Opencart knowledge is rubbish so far.
G
This is my config.php file in /admin:
<?php
// HTTP
define('HTTP_SERVER', 'http://adultsonlytime.co.uk/admin/');
define('HTTP_CATALOG', 'http://adultsonlytime.co.uk/');
// HTTPS
//define('HTTPS_SERVER', 'http://adultsonlytime.co.uk/admin/');
//define('HTTPS_CATALOG', 'http://adultsonlytime.co.uk/');
// DIR
define('DIR_APPLICATION', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/admin/');
define('DIR_SYSTEM', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/');
define('DIR_IMAGE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/image/');
define('DIR_LANGUAGE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/admin/language/');
define('DIR_TEMPLATE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/admin/view/template/');
define('DIR_CONFIG', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/config/');
define('DIR_CACHE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/cache/');
define('DIR_DOWNLOAD', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/download/');
define('DIR_LOGS', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/logs/');
define('DIR_MODIFICATION', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/modification/');
define('DIR_UPLOAD', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/upload/');
define('DIR_CATALOG', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/catalog/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'mysql6.clusterdb.net');
define('DB_USERNAME', 'a-ope-bxq-u-208024');
define('DB_PASSWORD', 'xxxxxxxx');
define('DB_DATABASE', 'a-ope-bxq-u-208024');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');
And this is the config.php in root:
<?php
// HTTP
define('HTTP_SERVER', 'http://adultsonlytime.co.uk/');
// HTTPS
//define('HTTPS_SERVER', 'http://adultsonlytime.co.uk/');
// DIR
define('DIR_APPLICATION', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/catalog/');
define('DIR_SYSTEM', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/');
define('DIR_IMAGE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/image/');
define('DIR_LANGUAGE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/catalog/language/');
define('DIR_TEMPLATE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/catalog/view/theme/');
define('DIR_CONFIG', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/config/');
define('DIR_CACHE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/cache/');
define('DIR_DOWNLOAD', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/download/');
define('DIR_LOGS', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/logs/');
define('DIR_MODIFICATION', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/modification/');
define('DIR_UPLOAD', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/upload/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'mysql6.clusterdb.net');
define('DB_USERNAME', 'a-ope-bxq-u-208024');
define('DB_PASSWORD', 'xxxxxxx');
define('DB_DATABASE', 'a-ope-bxq-u-208024');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');
The only difference I can see is in admin/config.php it has:
define('HTTP_SERVER', 'http://adultsonlytime.co.uk/admin/');
define('HTTP_CATALOG', 'http://adultsonlytime.co.uk/');
rather than root config.php:
define('HTTP_SERVER', 'http://adultsonlytime.co.uk/');
I have changed the root config.php file to be:
//define('HTTP_SERVER', 'http://adultsonlytime.co.uk/');
define('HTTP_SERVER', 'http://adultsonlytime.co.uk/admin/');
define('HTTP_CATALOG', 'http://adultsonlytime.co.uk/');
Made no difference, apart from the main site now won't load correctly:
Thanks for your help with this. My Opencart knowledge is rubbish so far.
G
Hi
Here is a copy of sass.php from the admin/startup dir:
<?php
class ControllerStartupSass extends Controller {
public function index() {
$file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css';
if (!is_file($file) || !$this->config->get('developer_sass')) {
include_once(DIR_STORAGE . '/vendor/scss.inc.php');
$scss = new Scssc();
$scss->setImportPaths(DIR_APPLICATION . 'view/stylesheet/sass/');
$output = $scss->compile('@import "_bootstrap.scss"');
$handle = fopen($file, 'w');
flock($handle, LOCK_EX);
fwrite($handle, $output);
fflush($handle);
flock($handle, LOCK_UN);
fclose($handle);
}
}
}
Just in case that might help someone work out what has happened........
Thanks
G
Here is a copy of sass.php from the admin/startup dir:
<?php
class ControllerStartupSass extends Controller {
public function index() {
$file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css';
if (!is_file($file) || !$this->config->get('developer_sass')) {
include_once(DIR_STORAGE . '/vendor/scss.inc.php');
$scss = new Scssc();
$scss->setImportPaths(DIR_APPLICATION . 'view/stylesheet/sass/');
$output = $scss->compile('@import "_bootstrap.scss"');
$handle = fopen($file, 'w');
flock($handle, LOCK_EX);
fwrite($handle, $output);
fflush($handle);
flock($handle, LOCK_UN);
fclose($handle);
}
}
}
Just in case that might help someone work out what has happened........
Thanks
G
DIR_STORAGE has not been declared/configured in your config.php files.
It looks like you're using an older v.2 configuration in a v.3.0.2 Version ...
would probably be something like:
I assume ...
Ernie
---
it's part of the install process, to generate this line in OC-3:
It looks like you're using an older v.2 configuration in a v.3.0.2 Version ...
would probably be something like:
Code: Select all
define('DIR_STORAGE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/');
Ernie
---
it's part of the install process, to generate this line in OC-3:
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Eric
You are an absolute star and live up to the status of GURU.
I added the line into root/config.php and admin/config.php then was able to login to the admin console.
I did get the following error come up: see attachment but it automatically corrected itself and seems to be working fine now.
Many many thanks for your help with this.
Kind regards
Graham
You are an absolute star and live up to the status of GURU.
I added the line into root/config.php and admin/config.php then was able to login to the admin console.
I did get the following error come up: see attachment but it automatically corrected itself and seems to be working fine now.
Many many thanks for your help with this.
Kind regards
Graham
Attachments
error_aot.png (33.17 KiB) Viewed 8777 times
Good for you!
That error only means, that your STORAGE Folder, as configured, is now placed
INSIDE of the Shop Directory, wich has been the regular case, for many Years.
But in latest OC Version, it shall better be placed OUTSIDE of the Shop Directory,
as they claim, possibly, to better meet CLOUD Specifications, since I cannot think
of anything else, as long as Shop related Directories and Files are CHMOD-ed
correctly, and .htaccess rerouting/securing is done as required.
The only problem is, that, if a Shop is placed in the ROOT Section of a Server, this
Outside-Placement might not work, because on many Sites, Access to other than
inside-of-Server-Root - placed Directories is not possible.
And you can avoid this warning too, by use of some Extension, as linked below,
just to have this mentioned too.
Good Luck
Ernie
---
viewtopic.php?f=202&t=206859&p=733949#p733949
---
PS.
That error only means, that your STORAGE Folder, as configured, is now placed
INSIDE of the Shop Directory, wich has been the regular case, for many Years.
But in latest OC Version, it shall better be placed OUTSIDE of the Shop Directory,
as they claim, possibly, to better meet CLOUD Specifications, since I cannot think
of anything else, as long as Shop related Directories and Files are CHMOD-ed
correctly, and .htaccess rerouting/securing is done as required.
The only problem is, that, if a Shop is placed in the ROOT Section of a Server, this
Outside-Placement might not work, because on many Sites, Access to other than
inside-of-Server-Root - placed Directories is not possible.
And you can avoid this warning too, by use of some Extension, as linked below,
just to have this mentioned too.
Good Luck
Ernie
---
viewtopic.php?f=202&t=206859&p=733949#p733949
---
PS.
That's, why I plan to stop here by 9'999 Postings, or I would lose my Status ...You are an absolute star and live up to the status of GURU.
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Who is online
Users browsing this forum: No registered users and 173 guests