Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Has anyone ever tried to set up CouchCMS on Yahoo? I've had a hard time trying to figure out how to set up the database, but I think I've got it and now when I go to set up my admin I get "Please define your website's URL in config.php". I'm not sure what I'm missing...

Any thoughts?

Thanks,
Mike
Hi Mike,

I personally have no experience with Yahoo hosting but the error message suggests that Couch is unable to figure out your site's URL.
You need to extend an helping hand to it by editing 'couch/config.php' and modifying the following line in it
// 1.
// If neccesary, define the full URL of your site including the subdomain, if any.
// V.IMP: Don't forget the trailing slash!
//define( 'K_SITE_URL', 'http://www.test.com/subfolder1/subfolder2/mysite/' );

Please remove the leading '//' so as to uncomment the line and replace the dummy URL with your site's URL (including the last slash).

Do let us know if this solves the problem.

Thanks.
OK. I did this. Got a result!

I set it as "http://www.hostname.com/" and I was able to do the install and set up my super admin by going to the page "http://www.hostname.com/azadmin".

NOTE: I had changed the "couch" folder to "azadmin" before upload and install.

Once I upload my editable pages (media.php and article.php) to the root directory (one level up from the "azadmin" directory (where the couch files are located) and I try to attempt to view those pages (by refreshing them/loading them in the browser - NOT in couch), I get the following:
"ERROR: 'couch' folder should reside in the main web-site folder", but it already does...

I'm not sure what I'm doing wrong. The "couch" folder was renamed "azadmin" before installation (which worked).

I can log into my admin page...

Any thoughts?

Thanks,
Mike
Hi Mike,

It seems Couch is really having trouble figuring out the physical paths of files.
It is a very very rare occurrence but can happen on certain server configurations.

The solution, I am afraid, involves a little bit of extra work.
It is to help Couch a little by explicitly letting it know the template's name.
This is how we do it -

As you know all Couch managed templates begin with a mandatory
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>

Please place the following line immediately before the above mentioned line
Code: Select all
<?php define( 'K_TEMPLATE_NAME', 'actual_name_of_your_template.php' ); ?>

So, taking the example of your 'media.php', the code at the start of the template will now become -
Code: Select all
<?php define( 'K_TEMPLATE_NAME', 'media.php' ); ?>
<?php require_once( 'couch/cms.php' ); ?>

Of course, you have renamed the 'couch' folder to 'azdmin' so that needs to be taken into account.

Please try it and let me know if this helps.

Also, would it be possible for you to grant me access to your site?
I'd really like to dig further into this problem and see what is throwing Couch's calculations off.

Thank you very much.
4 posts Page 1 of 1
cron