Post by butte » Wed Aug 21, 2013 9:43 am

Given how server packages tend (not) to work quite right, consider getting the genuine OC .zip from OC if that jumps the tracks. The pairs of files and .htaccess will be important steps, and sequence matters. Let us know if . . .

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Wed Aug 21, 2013 11:08 am

I was just going through these files as per your earlier post:

config.php and admin/config.php
index.php and admin/index.php

There are no instances of admin in either config.php and index.php. Could this be a feature of the developer's rewriting the core code for version 1.5.6?

I downloaded admin/config.php and admin/index.php and modified all instances of admin. Then I renamed my admin folder and ran install/index.php, which produced another error message.

I reinstalled the original files and renamed the admin folder to admin again, and was/am able to get into my login console again...

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by butte » Wed Aug 21, 2013 1:52 pm

There should be admin references in both. More tomorrow . . .

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Thu Aug 22, 2013 1:31 am

If you're going to check the files I mentioned previously then please be sure to look at them in OC v.1.5.6

I just finished another search for 'admin' in both my OC and vqmod folders and files. I'm only finding instances of 'admin' in the following folder/files:

OC
admin/config.php

vqmod
pathReplace.php
admin/index.php
install/index.php

I reiterate that I am not finding any instances of 'admin' in OC/config.php, OC/index.php, or in the vqmod xml file.

I've now made downloads of all the original files and have copied them. I made my updates to change 'admin' to 'newadmin' in separate copies of the original files, in order to retain the originals.

I've done this in all the above mentioned places but the pathReplace.php, because I don't quite understand the instructions. I have not run anything yet because I surmise I'm going to get an error message in the event I don't make the correct changes to pathReplace.php

Specifically, I'm not sure how to create the required line of code to install in the pathReplace.php file below, in the space between // START REPLACES // code goes here // END REPLACES //

/**
* File for path replacements in xml paths. Examples:
*
* $replaces[] = array('~^admin\b~', 'admin123'); // This replaces the admin folder name for use when admin folder's renamed
* $replaces[] = array('~\btheme/default\b~', 'theme/my-theme-name'); // Theme name replace to apply mods to your theme
*
* Place your replaces between the START and END lines below
**/


// START REPLACES //

// END REPLACES //

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by butte » Thu Aug 22, 2013 2:16 am

(1) The reason why "both the file /config.php and the file /othername/config.php need to know about it" and there is need to "change every instance" of the admin directory name is that both of those two files tell OC both where its own admin is, and where the rest of itself is. The "admin" part of OC sits in its own "admin" directory; it begins life as /admin/ but you can rename that and if you so so then you must tell OC, back in the two config.php files, that you did so.

(2) The reason why to "simply replace both /index.php and /admin/index.php" (in sequence above) is that vqmod will modify them, and in doing so vqmod will automatically insert the proper directory name. The "admin" one happens to sit in the "admin" directory. Both files are necessary to install and run OC. It happens that vqmod later rewrites part of the "first page" of each of them.

(3) The reason why to re-install vqmod is to let it revamp the two index.php files as well as its own files to match where OC is installed. Then you know that vqmod is not harkening back to something prior. (If you moreover flush the vqcache then its memories are lopped, if you just rerun the vqmod installer without redoing vqmod from scratch, best way when something went haywire.)

(4) After vqmod is (re)installed, then extensions can be added (.xml files for the most part).

(5) Read htaccess.txt, noting the OC directory part, edit as needed, and rename it .htaccess (namelessDOTextension).

(6) Let the MACHINE edit these as it pleases:

(a) OC main lower index.php and admin upper index.php; twice, once during OC installation, then later in vqmod installation.

(b) DURING A CLEAN INSTALL, OC main lower config.php and admin upper config.php -- however they happened to end up having no reference to admin is not pro forma.

(c) At any time, files that are intrinsic parts of vqmod: pathReplace.php, admin/index.php, install/index.php,

(7) No, do not yourself "create the required line of code to install in the pathReplace.php file below, in the space between // START REPLACES // code goes here // END REPLACES //" -- see (6)(c).

(8) You get 10 points for security and 10 more for extra credit effort, but a winning score is 1 out of 1. Relax. The genuine OC and the genuine vqmod file sets and installers actually do know what they are doing. The host's "package" should not have left you with two config.php files having no idea where admin existed. The sidestep into that help link WHILE something else was already underway didn't help matters.

If you have (if need be, get) the real McCoy from OC, and if you have (if need be, get) the proper version (for OC) of the real McCoy vqmod, and install them according to Hoyle, then your store should run the first time you turn the key.

(9) And now all of us know to ask someone to verify whether his two config.php files even mention where the admin directory is or went during a clean install or an upgrade using a host "package".

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Thu Aug 22, 2013 5:31 am

I've taken your advice and have manually installed both OC and vqmod to my webhost. I left the SQL database from the last install. Should I reinstall that too?

I've gotten to the install page but am stuck. The error reads:

Error: Could not connect to the database please make sure the database server, username and password is correct!

1. Please enter your database connection details.

Database Driver: mySQL
* Database Host: localhost
* User:
Password:
* Database Name:
Database Prefix: oc_

2. Please enter a username and password for the administration. (I used the ones originally assigned to me from the last automated oc install at my host, and they took me to the install page.)

* Username: admin
* Password:
* E-Mail:

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by butte » Thu Aug 22, 2013 6:46 am

That appears good, just fill in the blanks. It found both of the two config.php files and is readying to update the database, as it is supposed to do.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Thu Aug 22, 2013 6:50 am

I have filled in the blanks, so one or more of the parameter's (database server, username, and/or password) is/are incorrect! I'm just not sure which ones...

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by butte » Thu Aug 22, 2013 8:46 am

Capslock off when you typed? Mysql server set as specified by host and visible in cPanel (usually localhost with Linux, although not so on some hosts)? The username may or may not require being suffixed by @whatever.whichever -- as you'll see specified inside cPanel.

Please tell us that you do not have "free" hosting somewhere and do not have godaddy. Fib if you have to.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Thu Aug 22, 2013 10:10 pm

No, I'm not using free hosting...I'm using one of the better known webhosts and am paying $6.00/mo. for service. And no, I'm not using GoDaddy, nor will I ever use GoDaddy!

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by butte » Thu Aug 22, 2013 11:16 pm

That is off to a very good start, then, on both counts.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Fri Aug 23, 2013 4:07 am

If it ends up being that I can't change the admin file to another name (because of the problems with the OC/config.php and OC/index.php) then how about simply increasing security to the amount I am able to, via other methods, i.e. .htaccess, purchasing an ssl certificate and following the other security parameter's outlined in the following link...

http://docs.opencart.com/display/openca ... +practices

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by butte » Fri Aug 23, 2013 4:25 am

Keep your terms straight when you later get into this (yes, a directory is technically a special file that holds files, but no, it is not a file). The /admin/ directory can be renamed, so, too, can the /download/ directory, both for security reasons. Then edit the two config.php files to conform to all directories and files in those directories. The point is not to try to make the /admin/ or /download/ or other directories conform to the editable config.php files, but vice-versa, BEFORE firing it up after the first of those changes is made. Whether you decide to change the two files and then manually rename the two directories seconds later, or vice-versa seconds-later, is academic; the hard drive and the two files must agree.

"If it ends up being that I can't change" those, then whatever caused the odd outcome of blank config.php and index.php files will not yet have been fixed.

As for the link, yes. And you'll notice how it differs from that other "help" link that neglected to tell you not to wander off the cliff in the dark.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Fri Aug 23, 2013 8:24 am

Thanks for the reminder re: directories vs. files. I still have a hunch that the problem with the OC/config.php and OC/index.php files has something to do with v.1.5.6.

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by butte » Fri Aug 23, 2013 10:02 am

Whatever caused blanks wasn't helpful . . .

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Sat Aug 24, 2013 12:37 am

Still waiting for cPanel to come back online. I surmise I can't/shouldn't do anything like begin building a catalog until my webhost get's its act together...

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by butte » Sat Aug 24, 2013 12:50 am

Right. Whenever a server is screwy is not the time to do anything but wait for the server to become normal, again.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Sun Aug 25, 2013 1:31 pm

Okay, I've been poking around inside the vqmod directory while I wait for my cPanel to come back online, and I just found this piece of information in vqmod\install\index.php (lines 11 through 16)...

* @information
* This file will perform all necessary file alterations for the
* OpenCart index.php files both in the root directory and in the
* Administration folder. Please note that if you have changed your
* default folder name from admin to something else, you will need
* to edit the admin/index.php in this file to install successfully


I believe I more-or-less just solved the dilemma regarding editing four files mentioned in previous posts, and will update my results once my server is online and I've had a chance to test...

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by markz » Mon Aug 26, 2013 9:01 am

Okay, I'm back in and I've successfully changed the name of my admin folder.

There was one snippet of important information missing from the instructions given in the vqmod\install\index.php file.

Lines 11-16 state...

* @information
* This file will perform all necessary file alterations for the
* OpenCart index.php files both in the root directory and in the
* Administration folder. Please note that if you have changed your
* default folder name from admin to something else, you will need
* to edit the admin/index.php in this file to install successfully


This is partially correct. What these instructions failed to mention is that you also have to edit all instances of 'admin' in the OP\admin\config.php file to match your 'newadmin' name.

To reiterate and summarize: The correct way to enhance security by changing the name of the admin directory in OC v.1.5.6 with vqmod installed is to do the following...

Change all instances of 'admin' to 'newadmin' in the following two files:

vqmod\install\index.php
OpenCart\admin\config.php

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by RonnyM82 » Fri Oct 18, 2013 4:52 pm

so it looks like it doesn't even modify the pathReplaces.php file
I had manually placed the path into that file, following the instructions within it. Everything seemed to work as it should at that point. So I hadn't changed the name of the admin folder in the vqmod\install\index.php file. I've now done that though & removed the line I placed in the pathReplaces.php file & everything works exactly the same way.

Update for new users:
Adding the new admin folder name to the pathReplaces.php file just replaces the folder name in any VQMOD xml files you add to the xml folder. It works very nicely & saves you having to modify the xml files you download from the Extensions library.
Last edited by RonnyM82 on Sun Oct 20, 2013 7:24 am, edited 1 time in total.

Newbie

Posts

Joined
Fri Oct 18, 2013 3:24 pm
Who is online

Users browsing this forum: No registered users and 105 guests