Post by GuessWho » Wed Oct 10, 2018 10:02 pm

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

Newbie

Posts

Joined
Wed Oct 10, 2018 9:56 pm

Post by cube10025 » Wed Oct 10, 2018 11:52 pm

In the admin folder look at the config.php compare the dir path to the config.php in root

Newbie

Posts

Joined
Mon Jun 05, 2017 8:19 pm

Post by GuessWho » Thu Oct 11, 2018 12:32 am

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

Newbie

Posts

Joined
Wed Oct 10, 2018 9:56 pm

Post by GuessWho » Thu Oct 11, 2018 12:49 am

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

Newbie

Posts

Joined
Wed Oct 10, 2018 9:56 pm

Post by IP_CAM » Thu Oct 11, 2018 2:20 am

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:

Code: Select all

define('DIR_STORAGE', '/home/cluster-sites/6/a/adultsonlytime.co.uk/public_html/system/storage/');
I assume ... 8)
Ernie
---
it's part of the install process, to generate this line in OC-3:
Image

Attachments

dir_storage_install_routines.jpg

dir_storage_install_routines.jpg (270.6 KiB) Viewed 145 times


For Sale: Top URL's, including an OpenCart V-Pro Shop!
A wide range of matching Designs can be seen here: http://www.opencart.li
For Information on URL's offered, please contact me at: jti@jacob.ch
Hundreds of Mods in 380+ Repositories for OC v.1.5.x - v.2.3.x
to be found on my Github Site: https://github.com/IP-CAM
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by GuessWho » Thu Oct 11, 2018 3:48 am

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

Attachments

error_aot.png

error_aot.png (33.17 KiB) Viewed 143 times


Newbie

Posts

Joined
Wed Oct 10, 2018 9:56 pm

Post by IP_CAM » Thu Oct 11, 2018 6:25 am

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.
You are an absolute star and live up to the status of GURU.
That's, why I plan to stop here by 9'999 Postings, or I would lose my Status ... :-\ :laugh:

For Sale: Top URL's, including an OpenCart V-Pro Shop!
A wide range of matching Designs can be seen here: http://www.opencart.li
For Information on URL's offered, please contact me at: jti@jacob.ch
Hundreds of Mods in 380+ Repositories for OC v.1.5.x - v.2.3.x
to be found on my Github Site: https://github.com/IP-CAM
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 8 guests