Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
28 posts Page 2 of 3
This looks like an issue with the data in your config file. Try moving it back into the couch folder and see if it works there, if not, then you'll need to have a chat with KK.
@martijn
I agree with Daniel - there must be some error in the data you have entered in your config file.
Try moving the config file back to its original location (i.e. couch folder) and you should see the same problem here too.
Rectify the error and then move the config file as shown by Daniel.

Hope this helps.
I've moved the original 'config.php' file back to the 'couch' folder and there is nothing wrong with it.
I use the latest Couch version:

CouchCMS Version 1.3RC1 (build 20120622)
OK, change the /couch/config.php to this:

Code: Select all
<?
$folder = dirname(dirname(__FILE__));
var_dump($folder);
require $folder.'/config.php';


What do you see, and is this the same location as your settings config.php file?
I still get the same error:

Could not connect to databaseUnknown MySQL server host 'K_DB_HOST' (2)

I've renamed the 'couch' folder to something else, but I also tried it with the original name of the folder (couch).

I also will try this tomorrow on a real hosted server and let you know how it went.

Thanks!
I'm not sure then. The var_dump should have printed something out to the screen, try this one:

Code: Select all
<?
$folder = dirname(dirname(__FILE__));
exit($folder);


My hack isn't hard, all it does is workout the path to the directory that the /couch/ directory sits in, then uses this to require the correct config.php file - very basic PHP stuff.
I just tried this hack on a real hosted webserver, but it return with an error:

Could not connect to databaseUnknown MySQL server host 'K_DB_HOST' (1)

Am I the only one who has this problem?
What do you get when you use the code in my previous message?

It seems to me, for whatever reason, it isn't able to load the settings in the config.php which is outside the couch folder. I don't know why this would be, but we might be able to get to the bottom of it by using the code I put in my previous message in your /couch/config.php
@martijn
Intriguing..this should have been fairly straightforward to implement.
Could you PM me your server's FTP creds please? I'd like to see what is going wrong.

Thanks
28 posts Page 2 of 3