Problems, need help? Have a tip or advice? Post it here.
13 posts Page 1 of 2
Hi all,

I'm trying out CouchCMS for the first time but thing aren't going too well... Any help appreciated.

My system:
  • Ubuntu 12.10 64-bits
  • Apache 2.2
  • CouchCMS 1.3RC1 (build 20120622) - Free Edition
  • PHP 5.4
  • Ioncube 5.4 for 64-bit Linux (wizard says loader is ok)
  • MySQL 5.5
  • Chrome 23 and Firefox 17

What I did is below. I tried this a couple of times, clearing the database between installs. The problem is repeatable, it always occurs at the same place:
  • Installed CouchCMS in the couch/ folder under my website
  • Created my database, made sure it was accessible
  • Edited config.php to the values below
  • Visited the couch/ page with my browser and got through the install script successfully
  • Logged in the admin panel successfully
  • Added the opening and closing couch tags on one of the pages of my site (index.php)
  • Visited the index.php page successfully
  • Reloaded the admin panel and now the index page was visible
  • Added an editable section (see below). Refreshed the index.php page, and then refreshed the admin panel
  • Admin panel no longer visible

From my browser I see:
Screenshot from 2012-12-16.png
Screenshot from 2012-12-16.png (18.55 KiB) Viewed 4138 times


From the apache log:
Code: Select all
[Sun Dec 16 12:48:05 2012] [notice] child pid 20951 exit signal Segmentation fault (11)


My config.php file (with comments removed):
Code: Select all
<?php
   /*
      CouchCMS
      Copyright(c) 2009 - 2010 kksidd@gmail.com

      THIS IS COPYRIGHTED SOFTWARE
      PLEASE READ THE LICENSE AGREEMENT
   */
   if ( !defined('K_COUCH_DIR') ) die(); // cannot be loaded directly

   define( 'K_SITE_OFFLINE', 0 );
   //define( 'K_SITE_URL', 'http://www.test.com/subfolder1/subfolder2/mysite/' );
   //define( 'K_ADMIN_PAGE', 'index.php' );
   define( 'K_GMT_OFFSET', -5 );
   define( 'K_CHARSET', 'utf-8' );

   define( 'K_DB_NAME', 'bdsp_couch' );
   define( 'K_DB_USER', 'bcouch' );
   define( 'K_DB_PASSWORD', 'AnotherPassword' );
   define( 'K_DB_HOST', 'localhost' );
   define( 'K_DB_TABLES_PREFIX', '' );       

   define( 'K_PRETTY_URLS', 0);

   define( 'K_USE_CACHE', 0 );
   define( 'K_CACHE_PURGE_INTERVAL', 24 );
   define( 'K_MAX_CACHE_AGE', 7 * 24 ); // Default is 7 days

   //define( 'K_UPLOAD_DIR', 'myuploads' );
   //define( 'K_SNIPPETS_DIR', 'mysnippets' );

   define( 'K_EMAIL_TO', 'my@email.ca' );
   define( 'K_EMAIL_FROM', 'my@email.ca' );
   define( 'K_USE_ALTERNATIVE_MTA', 0 );

   define( 'K_GOOGLE_KEY', 'ABQIAAAAD7z_FToS5NSqosnG9No1ABQYPrehWcZJH1ec0SZqipYFbK_nfRT1ryCGKzl5KGpFG3y5jyPe_uClVg' );

   define( 'K_PAYPAL_USE_SANDBOX', 1 );
   define( 'K_PAYPAL_EMAIL', 'seller_1272492192_biz@gmail.com' );
   define( 'K_PAYPAL_CURRENCY', 'USD' );

   define( 'K_COMMENTS_REQUIRE_APPROVAL', 1 );
   define( 'K_COMMENTS_INTERVAL', 5 * 60 );

   define( 'K_ADMIN_LANG', 'EN' );

   //define( 'K_LOGO_LIGHT', 'couch.gif' );
   //define( 'K_LOGO_DARK', 'couch_dark.gif' );

   //define( 'K_ADMIN_FOOTER', '<a href="http://www.yourcompany.com">COMPANY NAME</a>' );
   
   //define( 'K_HTML4_SELFCLOSING_TAGS', 1 );
   
   define( 'K_EXTRACT_EXIF_DATA', 0 );   


The tag that makes it all crash (in French, oui oui, there are unicode characters in there):
Code: Select all
<div class="welcome">
   <cms:editable name='Texte_accueil' label='Texte Accueil' type='richtext'>
      <h2>Bienvenue sur le site du salon Bien dans sa peau!</h2>
      <p class="under">Ce texte (incluant le titre ci-dessus) peut être modifié dans la console d'administration du site</p>
   </cms:editable>
</div>
Salut et bienvenue sur notre site :)

This is a tough one - 'Segmentation fault' suggests it is an error internal to either Apache or PHP. More likely one of the enabled PHP modules is not playing fair with your code (which incidentally is working without a hitch on my test machines).

To tell the truth, this is the first time I'm encountering this kind of error with Couch so I'll be unable to give a definitive answer. However, I can try and advance a few suggestions.

The first thing that I'd suggest is that you make sure the template is saved using UTF-8 without BOM. That 'without BOM' is important and your text editor should have an option for that (you can use the free & open-source Notepad++).

Next remove all the text enclosed within the 'cms:editable' tag, visit the template and see if the empty editable region gets created. If it does try pasting into the CKEditor the text we deleted and seeing if saving the text causes any problem. If it does, some PHP security module is the likely cause.

If the two steps do not help, the only recourse would be to disable PHP modules one by one (like Zend optimizer, Accelerator etc.) and see if this solves the problem.

Finally you could try using PHP 5.2.x version as the 5.4.x has been reported to cause random problems with IonCube.

Hope this helps. Please keep us posted.
Thanks.
Bonjour KK,

Thanks for the reply.

  • I'm using NetBeans 7.1.2 as an editor. The default encoding for the project is UTF-8 but there is no reference to BOM. Unfortunately, Linux has no Notepad++
  • I tried removing all the text between the cms:editable tags but the admin panel still crashes. This seems to indicate that the unicode characters are not at fault. However, I tried changing type=richtext to type=text and the admin panel was back! This seems to point to the richtext editor as the culprit. Perhaps I'm missing a dependency? How would I verify that?
  • Unfortunately, I can't disable the PHP modules as the Linux version is built with them rather than have them load dynamically as is usually the case with Windows.

If the richtext trail leads nowhere, I'm willing to try downgrading PHP to 5.3 or 5.2. I'll probably get an older Ubuntu in a virtual machine and see how that works out.
Thank you for your patient debugging effort.
We seem to be on the right track - CKEditor (the wysiwyg editor used by richtext region) indeed looks like the problem component here.

As to why this is so, beats me. I've seen local stacks like XAMPP or WAMP having trouble with serving the main JS file used by CKEditor (perhaps due to the file size) but this only causes the editor to disappear. Causing the executable to fault is extreme behaviour

Not sure if this would help but maybe you can try upgrading to the later version of CKEditor available for download here: viewtopic.php?f=6&t=7050

Finally, as I mentioned, local stacks have been reported to have issues with CKEditor but I've never had a report of anything similar on hosted servers. I am sure you won't have to encounter this problem once you move the site online. In the meanwhile you can use the nicedit type region (http://www.couchcms.com/docs/tags-refer ... cedit.html) for testing purpose if CKEditor continues to be problematic.
Try to downgrade your php 5.4 to php 5.2.
Quick follow up. I set a VM up with the following characteristics:

  • Ubuntu 12.04 32-bits
  • Apache 2.2
  • CouchCMS 1.3RC1 (build 20120622) - Free Edition
  • PHP 5.3
  • Ioncube 5.3 for 32-bit Linux
  • MySQL 5.5
  • Chrome 23 and Firefox 17

Everything seems to be working now. Let it be known that CouchCMS and/or IonCube do not play well with the latest Ubuntu distro. This is either a PHP 5.4 issue or a 32- vs. 64-bit thing.
I had to change "localhost" to "127.0.0.1:3306"
though I have a new problem, editable regions don't show in the admin panel, the headers are there but you can't type in info.
---
You live many times, but only ever remember your lives.length - 1
---
Image
@cholasimmons
This again looks like a Javascript error. The JS file not being served properly by the server is the most probable reason.
Could you please use Chrome's 'Inspect element' menu (or FireFox's Firebug) and see if any JS error is being reported?
Im not familiar with the debugger, this is all i can see and i dont understand jack!
it used to work right after installation, i never altered any of the cms files...so how do i fix my couch? the same files work from my local server..
Image
---
You live many times, but only ever remember your lives.length - 1
---
Image
Im not familiar with the debugger, this is all i can see and i dont understand jack!

That is perfectly alright :)

The problem is that the installation is on your local machine and hence not accessible to me. (otherwise I would have logged-in myself to try and find the problem ).

For now I can only suggest that if 'localhost' was working fine, why don't you continue using that instead of making it '127.0.0.1:3306'?

Once the site goes online, I am sure you won't see this problem (this has something to do with local LAMP/WAMP stacks). And in case you do, I'll be able to help you in a more effective manner than by making simple suggestions.

What do you say?
13 posts Page 1 of 2
cron