Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use single config file for site and admin #2098

Closed
syammohanmp opened this issue Oct 23, 2014 · 5 comments
Closed

Use single config file for site and admin #2098

syammohanmp opened this issue Oct 23, 2014 · 5 comments

Comments

@syammohanmp
Copy link
Contributor

It is more difficult to host the entire project to another location. At this time, database configuration should be applied in two locations ( both root folder and admin ) and this piece of code are same in root and admin.

Also please use dirname(FILE) instead of direct writing DOCUMNET_ROOT path in config file.

@edirpedro
Copy link

They don't want to simplify, I've sent a solution before.
#1946

@OpenCartAddons
Copy link
Contributor

If I recall correctly the config files were setup this way to allow you to host the admin side of the site in a completely different directory from the root OpenCart installation.

Cheers,
Joel.

@edirpedro
Copy link

The solution I propose do not invalid this situation! Most of the configurations are just code repetition.

@OpenCartAddons
Copy link
Contributor

@edirpedro I agree the use of a single directory constant would be easier so you only have to change it once. I was responding to this thread in particular where he requests the use of a single config file.

Cheers,
Joel.

@edirpedro
Copy link

Just a note, this invalid to that situation you mentioned because you will need to edit /admin/index.php to point to the right path to config.php. The problem is when you upgrade OC and replace the index.php.

But, at least the Constants I propose is better because it do not conflict like the ones HTTP_SERVER, HTTPS_SERVER, DIR_APPLICATION, DIR_LANGUAGE and DIR_TEMPLATE. So for normal installations, we could just copy and paste in both files or point /admin/config.php to include the /config.php.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants