Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
I am new to this and have been struggling with Couch CMS for days. I could really use some help! I have reviewed and followed the tutorial documentation to no avail.

I am trying to do something VERY simple: create a new page on our site (for simplicity, we'll call it domain/seller). We use GoDaddy as our host and CouchCMS. I have tried to create a new page through GoDaddy file manager (named the file seller.php). However, no matter what script I use on the page - even if it is just a blank page - I receive a 403 error that reads "You don't have permission to access /seller/ on this server. Server unable to read htaccess file, denying access to be safe"

I have verified that the .htaccess file already exists within GoDaddy's file manager. I contacted support from the server side and they could not fix the error, instead stating that I needed to produce a specific script via CouchCMS for this new page.

I tried creating the desired page through the CouchCMS admin panel, as shown in the tutorial. I was able to create a "clone" of our home page that accessible at domain/seller.html. However, trying it without the .html suffix (either domain/seller or domain/seller.php) still produces the 403 error. Furthermore, the homepage template isn't even the one I'd like to use, but that was the only way I could achieve the domain/seller URL. I have tried creating a new seller.html file through GoDaddy's file manager and creating files with names other than seller, but the same error occurs every time. I am totally lost. Basically, I only want to create a new site page! It should be so simple, but nothing I do is working.
Hey, could you try something?
(1) Create a sample clonable template "test.php" with CouchCMS boilerplate code ("require" and "invoke" lines).
(2) Make sure to have pretty urls DISABLED in config
(3) Delete / rename any couch-generated htaccess files from root
(4) Place test.php in your site's root and visit it as superadmin.
What happens if you make it as simple as this? We'll deal with suffixes later.
Hi trendoman, thanks for the assist!

I have attempted to follow all of the steps.

Here is the entirety of the script for test.php right now:
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='test.php' clonable='1' />

<?php COUCH::invoke(); ?>


Pretty urls were enabled, so I set the value to 0 in config.

I renamed the htaccess file on root and placed test.php.

If I visit domain.com/test.php I bring up my blank page. If I visit without the .php suffix I receive the 403 error.

trendoman wrote: Hey, could you try something?
(1) Create a sample clonable template "test.php" with CouchCMS boilerplate code ("require" and "invoke" lines).
(2) Make sure to have pretty urls DISABLED in config
(3) Delete / rename any couch-generated htaccess files from root
(4) Place test.php in your site's root and visit it as superadmin.
What happens if you make it as simple as this? We'll deal with suffixes later.
Okay, thanks for the report.

If you can visit the template as site/test.php and its cloned pages as site/test.php?p=xx - it means that Couch works good on your server. The errors you reported above are very much likely due to server's config - if some file is inaccessible, then server throws error. (This idea can be proved if typed any kind of non-existent url.)

So what happens when you type domain/test (without ".php") - is that server can not determine what to return - there is no file named 'test', only 'test.php'. When we use pretty urls setting in Couch to skip extensions - we rely on apache's rewrite engine - with the help of htaccess we say that if /test is accessed, then apache should look for /test.php. If /test/my-page.html is accessed, then Couch internally converts that to /test.php?p=xx and asks apache to return that url which it can definitely do because physical file 'test.php' can be easily found.

So, what you should do - is to follow the path everyone takes. Develop your template, cloned pages and codes without pretty urls on. Only after everything is tested properly and your page works as intended (code-wise it is advisable to use cms:link tag and prefix relative links with <cms:show k_site_link />) - then and only then we can generate htaccess in backend. Why is it so? Because script takes into consideration all relevant aspects of a template - whether it has folders, its type (clonable/nested_pages/nonclonable) etc. So you see - generation of htaccess is really the last step.

Next, you place that htaccess in root and still do not turn pretty urls on. You should be able to access the page as usual without issues. It guarantees at very least that there are no obvious errors in htaccess. Only then you enable the pretty urls in config. I guess, all reported errors are connected with the steps taken in the wrong order :)
You are a lifesaver! It works perfectly now. Thanks so, so much! Maybe I won't throw out CouchCMS out of frustration after all.
You are welcome :)


EmmaS wrote: Maybe I won't throw out CouchCMS out of frustration after all.

Who cares.
6 posts Page 1 of 1