Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Examples won't connect to DB in 4.2.4 #263

clmarshall opened this Issue · 4 comments

2 participants


On localhost and in web environment DB test is successful but example pages attempt to connect with incorrect root@localhost, despite the config.php file being properly set.

Same is true of


This is actually issue in atk4-example project.

  1. I guess I didn't really understand what you mean here "On localhost and in web environment DB test is successful...". So it's kind of working for you in your localhost environment, great. But what you exactly mean by "in web environment DB test is successful". So DB connection is working for you in other environment too. Where it's not working then? :)

  2. Have you changed this line to fit your environment? You can create file config.php and put your modified config line there. That's preferred way how to do this, but for simple testing you can modify your settings in config-default.php file too.


@DarkSide666 - Sorry for being unclear. What I mean to say is that I tested the ATK4 install and default page in both local and web environments. The example failed in both.

You did turn me on to something though, there is a config.php IN the example folder. I replaced that config w/ the config from my root folder and it worked.

Why the example folder isn't using the config from the root folder

Overall, here are my recommendations for the project.

1) Eliminate config-default and config-distb from the package and replace them with a config.php
Reason: I've seen multiple threads from people looking for a config.php and everything that is done in those 2 provided config files can be done in 1 config.php with example comments.

2) In the examples folder config.php add an include line to include the ../config.php, so the config.php set in root is used.

3) Provide clarity up front in the documentation on the site, and in the default web page that the config file must be set and how to set it so that users configure this up front.

Just my $0.02

I look forward to using the project.


Ah, now I understand your problem with atk4-example :)

1) I agree, that config-distrib.php is quite useless. At least I don't see real need for that. But config-default.php (for defaults) and config.php (for environment specific configuration) is a good idea I guess. What I'm doing is - I keep all project configuration in config-default.php and settings which are specific to particular environment (usernames, passwords, paths) I kepp in config.php.

2 & 3) Probably you're right about examples folder. To tell the truth, I guess this examples folder need quite a bit of rewriting to better fit current ATK version and also more explanation about what is where and how this all works.

I guess @romaninsh (Romans, author of this framework) will take a look on that at some point.

Welcome "in" ATK framework BTW ! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.