Forums / General Questions / How to use the Local folder to have a local configure

How to use the Local folder to have a local configure

Views: 1,049

Results 1 to 6 of 6
1 Mar 2016, 11:03 AM
#1
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

How to use the Local folder to have a local configure

hi
I've always seen it, but never use it, but now I was going to take advantage of this, but I don't get it:
I only see a local folder in the admin/includes

Should I create a new one on the includes also ?

I just need to copy the configure files and change the paths ? or this is all happening in the admin/includes/local ?

I've google it a little, but the word local sends me to different contexts

Thanks

“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

1 Mar 2016, 11:35 AM
#2
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: How to use the Local folder to have a local configure

mesnitu:

Should I create a new one on the includes also ?
Yes you need to create a "local" folder in includes to.
mesnitu:

I just need to copy the configure files and change the paths ? or this is all happening in the admin/includes/local ?
Yes

1 Mar 2016, 11:43 AM
#3
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: How to use the Local folder to have a local configure

Thanks !

“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

1 Mar 2016, 3:33 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to use the Local folder to have a local configure

Also for what it's worth, you don't have to have everything from a standard configure.php file in the local one. Whatever defined constant(s) are not in the local version, but are in the standard one will be loaded when the standard one is processed... So, if for example you have locally mirrored your database including username, password, database name, etc... You could leave off/out the DB information and perhaps only need to include the HTTP_SERVER, HTTPS_SERVER, and for the catalog the directory paths to those or whatever constants have a direct listing of file paths... Other paths that incorporate a constant will point to the directory structure made by substituting the path described in the local file if present.

But, of course the "safest" way is to just use the whole file. Even though that too can be subjective. :)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

1 Mar 2016, 4:19 PM
#5
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: How to use the Local folder to have a local configure

Thanks !

“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

2 Mar 2016, 4:05 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: How to use the Local folder to have a local configure

mc12345678:

Also for what it's worth, you don't have to have everything from a standard configure.php file in the local one. Whatever defined constant(s) are not in the local version, but are in the standard one will be loaded when the standard one is processed... So, if for example you have locally mirrored your database including username, password, database name, etc... You could leave off/out the DB information and perhaps only need to include the HTTP_SERVER, HTTPS_SERVER, and for the catalog the directory paths to those or whatever constants have a direct listing of file paths... Other paths that incorporate a constant will point to the directory structure made by substituting the path described in the local file if present.
True, and v1.5.5 has simplified this even more by having much smaller configure.php files.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.