Community Forums

Securing the /admin/ folder in OpenCart Help "Error"

Please post any issues you are having concerning installation or upgrade of OpenCart v1.x

Securing the /admin/ folder in OpenCart Help "Error"

Postby clo2012 » Thu May 24, 2012 7:39 pm

Hi,

I am new to opencart. I am trying to secure my admin folder by changing the file name and the config.php file.

I followed these steps:

Right click on the “admin” folder and select “rename”
Type in your new name for the “admin” folder (you can change it to whatever you want but the more obscure the name the better such as “ADMIN889723”)
Now, open the /admin/config.php with the code editor (Remember, you changed changed the name of the folder. Replace 'admin' with the new folder name)
There should be 5 instances referencing the /admin/ folder that would need to be updated to the new name you changed the folder to

I followed all of these steps but when I go to my admin (I changed the name) I get the following

"Notice: Error: Could not load language english! in /home/cdkeysta/public_html/system/library/language.php on line 26"

Any help would be great.

Thank You.
clo2012
 
Posts: 10
Joined: Thu May 24, 2012 7:34 pm

Re: Securing the /admin/ folder in OpenCart Help "Error"

Postby bigchili » Thu May 24, 2012 7:50 pm

There are two config.php files. One in the admin folder and one in the root folder. Did you change both of them?

Security through obscurity is not really secure at all. If you really want to make your admin folder secure, password protect the folder from within your cPanel and use a really hard password.
User avatar
bigchili
 
Posts: 550
Joined: Tue May 15, 2012 7:00 pm

Re: Securing the /admin/ folder in OpenCart Help "Error"

Postby clo2012 » Thu May 24, 2012 8:15 pm

bigchili wrote:There are two config.php files. One in the admin folder and one in the root folder. Did you change both of them?

Security through obscurity is not really secure at all. If you really want to make your admin folder secure, password protect the folder from within your cPanel and use a really hard password.


I didn't change both but I now have but now I get the message "Error: Could not load database file mysql!" Can you give me any help?

I am also going to password protect my directories as well.
clo2012
 
Posts: 10
Joined: Thu May 24, 2012 7:34 pm

Re: Securing the /admin/ folder in OpenCart Help "Error"

Postby bigchili » Thu May 24, 2012 8:22 pm

What version of OpenCart are you using?
User avatar
bigchili
 
Posts: 550
Joined: Tue May 15, 2012 7:00 pm

Re: Securing the /admin/ folder in OpenCart Help "Error"

Postby clo2012 » Thu May 24, 2012 8:26 pm

bigchili wrote:What version of OpenCart are you using?


1.5.1.3
clo2012
 
Posts: 10
Joined: Thu May 24, 2012 7:34 pm

Re: Securing the /admin/ folder in OpenCart Help "Error"

Postby bigchili » Thu May 24, 2012 8:30 pm

Does the bottom of your config.php files look something like this?

Code: Select all
// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'YOURUSERNAME');
define('DB_PASSWORD', 'YOURPASSWORD');
define('DB_DATABASE', 'YOURDATABASE');
define('DB_PREFIX', '');
Last edited by bigchili on Thu May 24, 2012 8:36 pm, edited 2 times in total.
User avatar
bigchili
 
Posts: 550
Joined: Tue May 15, 2012 7:00 pm

Re: Securing the /admin/ folder in OpenCart Help "Error"

Postby clo2012 » Thu May 24, 2012 8:33 pm

Yes
clo2012
 
Posts: 10
Joined: Thu May 24, 2012 7:34 pm

Re: Securing the /admin/ folder in OpenCart Help "Error"

Postby bigchili » Thu May 24, 2012 8:37 pm

Check this line in your config files to make sure the path is correct.
Code: Select all
define('DIR_DATABASE', '/home/xxxxxxxx/public_html/OPENCARTFOLDER/system/database/');


Finally, check the permissions on /system/database/mysql.php. Might have to change it to 644 or 755 (ask your host).

If all that fails you might have to do a clean install.
User avatar
bigchili
 
Posts: 550
Joined: Tue May 15, 2012 7:00 pm

Re: Securing the /admin/ folder in OpenCart Help "Error"

Postby clo2012 » Thu May 24, 2012 8:47 pm

bigchili wrote:Check this line in your config files to make sure the path is correct.
Code: Select all
define('DIR_DATABASE', '/home/xxxxxxxx/public_html/OPENCARTFOLDER/system/database/');


Finally, check the permissions on /system/database/mysql.php. Might have to change it to 644 or 755 (ask your host).

If all that fails you might have to do a clean install.


OK thanks. I tried but nothing worked. I will just start a fresh. Thanks.
clo2012
 
Posts: 10
Joined: Thu May 24, 2012 7:34 pm

Re: Securing the /admin/ folder in OpenCart Help "Error"

Postby rph » Thu May 24, 2012 9:38 pm

There's an error with the paths you used. Restore the original config files and try again. Also remember that the paths are likely case sensitive so "ADMIN247" is not going to match "admin247".
-Ryan
VQMod Manager: FREE extension to fully manage your VQMods from Admin!
Admin Enhancement Suite: Powerful Admin features and enhancements
Dependent Options: Option values displayed based on customer input
Catalog Mode: Disable "Add to Cart" and display your store in view-only
Unofficial OpenCart Wiki | Commercial Support and Development
User avatar
rph
 
Posts: 2830
Joined: Thu Jan 07, 2010 9:05 pm
Location: Lincoln, Nebraska

Re: Securing the /admin/ folder in OpenCart Help "Error"

Postby tonerrefillstore » Mon Jun 11, 2012 6:46 pm

Hello,

I am currently trying to change the name of our admin folder and am running into a few problems. I am making the necessary adjustments to both of the config files and as soon as I change the name of the admin directory I am unable to access any page and receive the following message "COULDNT RESOLVE REAL PATH [/XXX/XXX/XXX/XXXX/XXXX/admin/controller/common/header.php]". We are currently using version 1.5.1 and are currently using a template called Gentle. I double checked to make sure I was making the proper adjustments to the config files and there is 1 entry in the config file on the root and then 5 entries in the admin folder. Any help would be greatly appreciated. Thanks in advance.


http://www.tonerrefillstore.com
opencart v. 1.5.1

Josh
Toner Refill Store
tonerrefillstore
 
Posts: 3
Joined: Mon Feb 06, 2012 7:21 pm


Return to Installation, Upgrade, & Config Support

Who is online

Users browsing this forum: inventorgeorge and 16 guests

Hosted by Arvixe Web Hosting