Forum for discussing general topics related to Couch.
7 posts Page 1 of 1
I have successfully downloaded the portable version of couch cms for use on my wamp.
I have followed through all the steps as per the instructions and also logged myself in as a super-admin. Unfortunately, i am now generating an error upon visiting my main content page (index.php) at: localhost:8080/index.php and at localhost:8080.

error: Fatal error: Call to undefined function bindtextdomain() in W:\www\locale.php on line 24

the locale.php contains info from php gettext and i am thus curious if couch cms cannot support my site because of gettext. I intend to use the CMS for updating images mostly, not the text content.

locale.php

<?php
session_start();
if (isset($_GET["lang"])) {
$language = $_GET["lang"];
}
else if (isset($_SESSION["lang"])) {
$language = $_SESSION["lang"];
}
else {
$language = "en_US";
}

$_SESSION["lang"] = $language;

$folder = "locale";
$domain = "messages";
$encoding = "iso-8859-1";
$locale = $language.".".$encoding;

putenv("LANG=" . $language);
setlocale(LC_ALL, $language);
bindtextdomain($domain, $folder); // LINE 24
textdomain($domain);
bind_textdomain_codeset($domain, $encoding);

?>

Any assistance would be highly appreciated as i have already tried to un-install and re-install wamp but all that was in vain.
Hello and welcome @kajoe14

The error you mentioned is not related to Couch at all.
It simply suggests that gettext extension is not enabled on your PHP installation.
Try editing php.ini and enabling
extension=php_gettext.dll

Don't forget to restart the server for the change to be picked up.

Hope this helps.
The extension was working well as i had already started localizing the site and thus had the gettext extension enabled.

I have also, double checked to make sure that it is still enabled.
OK. So as a quick test let us take Couch out of the equation.
Create a new file, say named 'test.php' and place the following within it
Code: Select all
<?php

$folder = "locale";
$domain = "messages";

bindtextdomain($domain, $folder);

echo 'OK';

Access the file through your browser.
What do you get? 'OK' or the same error?

Let us know.
Thanks
It is generating the same error:

Fatal error: Call to undefined function bindtextdomain() in W:\www\test.php on line 7

Line 7 in this case is:
bindtextdomain($domain, $folder);
OK so that settles it - Couch is nowhere in the scene to have caused the problem.
You'll need to troubleshoot the issue at your server's level.

Thanks.
Okay, thanks a lot for your assistance.

You guys are really supportive.
Again, thanks!
7 posts Page 1 of 1