Post by nitika » Thu Nov 24, 2011 6:59 pm

I dont knw what path to give in the config file. because of this config file problem my admin is showing errors..

Newbie

Posts

Joined
Thu Nov 24, 2011 6:41 pm

Post by webvet » Thu Nov 24, 2011 7:10 pm

Is this a fresh install? If so can you post the config.php file contents?

If not do you have a backup, or did you change something before this happened?

Genuine, Honest Opencart Support @ http://webvetservices.com


User avatar
Active Member

Posts

Joined
Thu May 14, 2009 2:04 am
Location - Shropshire, UK

Post by nitika » Thu Nov 24, 2011 7:21 pm

ya i changed the config file because i installed the opencart firstly on localhost.. so in the config file it was using the server path with ""wamp/www/opencart/admin/"" like this.
So i changed it with
<?php


// DIR
define('DIR_APPLICATION', $_SERVER['DOCUMENT_ROOT'].'/admin/');
define('DIR_SYSTEM', $_SERVER['DOCUMENT_ROOT'].'/system/');
define('DIR_DATABASE', $_SERVER['DOCUMENT_ROOT'].'/system/database/');
define('DIR_LANGUAGE', $_SERVER['DOCUMENT_ROOT'].'/admin/language/');
define('DIR_TEMPLATE', $_SERVER['DOCUMENT_ROOT'].'/admin/view/template/');
define('DIR_CONFIG', $_SERVER['DOCUMENT_ROOT'].'/system/config/');
define('DIR_IMAGE', $_SERVER['DOCUMENT_ROOT'].'/image/');
define('DIR_CACHE', $_SERVER['DOCUMENT_ROOT'].'/cache/');
define('DIR_DOWNLOAD', $_SERVER['DOCUMENT_ROOT'].'/download/');
define('DIR_LOGS', $_SERVER['DOCUMENT_ROOT'].'/system/logs/');
define('DIR_CATALOG', $_SERVER['DOCUMENT_ROOT'].'/catalog/');


?>

So i dont know whether its ok or not..but by doing this it shows error.what to do?

Newbie

Posts

Joined
Thu Nov 24, 2011 6:41 pm

Post by webvet » Thu Nov 24, 2011 7:38 pm

That should be your admin/config.php.
define('DIR_CACHE', $_SERVER['DOCUMENT_ROOT'].'/cache/');
should be define('DIR_CACHE', $_SERVER['DOCUMENT_ROOT'.'/system/cache/');


Have you changed both config.php and admin/config.php?

Which version of OC are you using - if it is v1.5 there should be some definitions for
//HTTP
and
//HTTPS
before your //DIR

Genuine, Honest Opencart Support @ http://webvetservices.com


User avatar
Active Member

Posts

Joined
Thu May 14, 2009 2:04 am
Location - Shropshire, UK

Post by nitika » Thu Nov 24, 2011 8:08 pm

I m using 1.5.13

And still confused about the config file:

Congif.php

// DIR
define('DIR_APPLICATION', 'catalog/');
define('DIR_SYSTEM', 'system/');
define('DIR_DATABASE', 'system/database/');
define('DIR_LANGUAGE', 'catalog/language/');
define('DIR_TEMPLATE', 'catalog/view/theme/');
define('DIR_CONFIG', 'system/config/');
define('DIR_IMAGE', 'image/');
define('DIR_CACHE', 'system/cache/');
define('DIR_DOWNLOAD', 'download/');
define('DIR_LOGS', 'system/logs/');


admin/config.php
// DIR
define('DIR_APPLICATION', $_SERVER['DOCUMENT_ROOT'].'/admin/');
define('DIR_SYSTEM', $_SERVER['DOCUMENT_ROOT'].'/system/');
define('DIR_DATABASE', $_SERVER['DOCUMENT_ROOT'].'/system/database/');
define('DIR_LANGUAGE', $_SERVER['DOCUMENT_ROOT'].'/admin/language/');
define('DIR_TEMPLATE', $_SERVER['DOCUMENT_ROOT'].'/admin/view/template/');
define('DIR_CONFIG', $_SERVER['DOCUMENT_ROOT'].'/system/config/');
define('DIR_IMAGE', $_SERVER['DOCUMENT_ROOT'].'/image/');
define('DIR_CACHE', $_SERVER['DOCUMENT_ROOT'].'/cache/');
define('DIR_DOWNLOAD', $_SERVER['DOCUMENT_ROOT'].'/download/');
define('DIR_LOGS', $_SERVER['DOCUMENT_ROOT'].'/system/logs/');
define('DIR_CATALOG', $_SERVER['DOCUMENT_ROOT'].'/catalog/');


Now tell me where is the problem>> or its correct?? i hv shown both files to you..now tel which is wrong.? i hv shown yuo the directory path

Newbie

Posts

Joined
Thu Nov 24, 2011 6:41 pm

Post by webvet » Thu Nov 24, 2011 10:29 pm

The config files both look wrong.

The best way to move from one server to another is outlined here http://www.opencart.com/index.php?route ... h=77_49_51 in the Opencart Documentation.

You make a completely new, fresh install on your target server which populates the two config files correctly.

Then, after emptying the database using phpmyadmin, outwrite the fresh install with your backup from localhost (except the two config files).

I've always done it this was without any problems. Maybe best to follow these rather than trying to manually correct these files?

Genuine, Honest Opencart Support @ http://webvetservices.com


User avatar
Active Member

Posts

Joined
Thu May 14, 2009 2:04 am
Location - Shropshire, UK

Post by benzy » Fri May 31, 2013 6:19 pm

I had some fatal error problems and copyed old saved config.php over this one and my site is not showing anymore.i try to fix the config file but im a newbie.Admin config works.Can you please check and advise what i did wrong so my page is blank and dont want to laod up.



http://www.benzy-eshop.si/ is not working
http://www.benzy-eshop.si/ admin is working


Normal config

<?php
// HTTP
define('HTTP_SERVER', 'http://www.benzy-eshop.si/public_html/');


// HTTPS
define('HTTPS_SERVER', 'http://www.benzy-eshop.si/public_html/');


// DIR
define('DIR_APPLICATION', '/home/benzy/public_html/catalog/');
define('DIR_SYSTEM', '/home/benzy/public_html/system/');
define('DIR_DATABASE', '/home/benzy/public_html/system/database/');
define('DIR_LANGUAGE', '/home/benzy/public_html/admin/language/');
define('DIR_TEMPLATE', '/home/benzy/public_html/admin/view/template/');
define('DIR_CONFIG', '/home/benzy/public_html/system/config/');
define('DIR_IMAGE', '/home/benzy/public_html/image/');
define('DIR_CACHE', '/home/benzy/public_html/system/cache/');
define('DIR_DOWNLOAD', '/home/benzy/public_html/download/');
define('DIR_LOGS', '/home/benzy/public_html/system/logs/');


Admin config

<?php
// HTTP
define('HTTP_SERVER', 'http://www.benzy-eshop.si/admin/');
define('HTTP_CATALOG', 'http://www.benzy-eshop.si/');

// HTTPS
define('HTTPS_SERVER', 'http://www.benzy-eshop.si/admin/');
define('HTTPS_CATALOG', 'http://www.benzy-eshop.si/');

// DIR
define('DIR_APPLICATION', '/home/benzy/public_html/admin/');
define('DIR_SYSTEM', '/home/benzy/public_html/system/');
define('DIR_DATABASE', '/home/benzy/public_html/system/database/');
define('DIR_LANGUAGE', '/home/benzy/public_html/admin/language/');
define('DIR_TEMPLATE', '/home/benzy/public_html/admin/view/template/');
define('DIR_CONFIG', '/home/benzy/public_html/system/config/');
define('DIR_IMAGE', '/home/benzy/public_html/image/');
define('DIR_CACHE', '/home/benzy/public_html/system/cache/');
define('DIR_DOWNLOAD', '/home/benzy/public_html/download/');
define('DIR_LOGS', '/home/benzy/public_html/system/logs/');
define('DIR_CATALOG', '/home/benzy/public_html/catalog/');

Newbie

Posts

Joined
Fri May 31, 2013 6:10 pm

Post by karabo » Fri Mar 06, 2015 5:44 pm

Update the main config head with :-

<?php
// HTTP
define('HTTP_SERVER', 'http://www.benzy-eshop.si/');


// HTTPS
define('HTTPS_SERVER', 'http://www.benzy-eshop.si/');

Newbie

Posts

Joined
Fri Mar 06, 2015 5:42 pm

Post by fassimak » Sun Mar 15, 2015 2:19 am

Hi. It's my first time to send message. I have problem with my site. After I removed to other server, doesn't run admin after I put in user and password to admin.I see emty page. My config.php in main is:

<?php
// HTTP
define('HTTP_SERVER', 'http://url/');
define('HTTP_ADMIN', 'http://url/admin/');
define('HTTP_IMAGE', 'http://url/image/');

// HTTPS
define('HTTPS_SERVER', 'http://url/');
define('HTTPS_IMAGE', 'http://url/image/');

// DIR
define('DIR_APPLICATION', '/home/name/public_html/catalog/');
define('DIR_SYSTEM', '/home/name/public_html/system/');
define('DIR_DATABASE', '/home/name/public_html/system/database/');
define('DIR_LANGUAGE', '/home/name/public_html/catalog/language/');
define('DIR_TEMPLATE', '/home/name/public_html/catalog/view/theme/');
define('DIR_CONFIG', '/home/name/public_html/system/config/');
define('DIR_IMAGE', '/home/name/public_html/image/');
define('DIR_CACHE', '/home/name/public_html/system/cache/');
define('DIR_DOWNLOAD', '/home/name/public_html/download/');
define('DIR_LOGS', '/home/name/public_html/system/logs/');

// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'username');
define('DB_PASSWORD', 'password');
define('DB_DATABASE', 'db_name');
define('DB_PREFIX', 'dbnew_');
?>

and config.php in admin is

<?php
// HTTP
define('HTTP_SERVER', 'http://url/admin/');
define('HTTP_CATALOG', 'http://url/');
define('HTTPS_IMAGE', 'http://url/image/');

// HTTPS
define('HTTPS_SERVER', 'http://url/admin/');
define('HTTPS_CATALOG', 'http://url/');

// DIR
define('DIR_APPLICATION', '/home/name/public_html/admin/');
define('DIR_SYSTEM', '/home/name/public_html/system/');
define('DIR_DATABASE', '/home/name/public_html/system/database/');
define('DIR_LANGUAGE', '/home/name/public_html/admin/language/');
define('DIR_TEMPLATE', '/home/name/public_html/admin/view/template/');
define('DIR_CONFIG', '/home/name/public_html/system/config/');
define('DIR_IMAGE', '/home/name/public_html/image/');
define('DIR_CACHE', '/home/name/public_html/system/cache/');
define('DIR_DOWNLOAD', '/home/name/public_html/download/');
define('DIR_LOGS', '/home/name/public_html/system/logs/');
define('DIR_CATALOG', '/home/name/public_html/catalog/');

// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'user name');
define('DB_PASSWORD', 'password');
define('DB_DATABASE', 'db_name');
define('DB_PREFIX', 'dbnew_');
?>

PLEASE HELP ??? ??? ??? ???

Newbie

Posts

Joined
Sat Mar 14, 2015 5:35 pm

Post by hobiesan » Sun Mar 11, 2018 11:06 am

config.php has the database username and password saved in it. Since this is readable by the world, isn't that a security hole? Can't someone simply do a 'wget sitename/config.php' to get peoples passwords?

Newbie

Posts

Joined
Sun Mar 11, 2018 9:50 am

Post by Johnathan » Thu Mar 15, 2018 12:42 am

No, it doesn't work that way. Try it yourself on any OpenCart-based site and you'll see that it doesn't work.

Image
Image Image Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 11 guests