Cannot send behaviour letters

Dear Ross,

Hi, I’m testing the behaviour letters function, but sorry to tell you that I am not good at php code. When I just run command “php behaviour_letters.php” at gibbon\cli folder, the following message appear:

PHP Notice: Undefined index: SERVER_PORT in /opt/lampp/htdocs/gibbon/gibbon.php on line 22
PHP Notice: Undefined index: SERVER_NAME in /opt/lampp/htdocs/gibbon/gibbon.php on line 23
PHP Notice: Undefined index: SERVER_PORT in /opt/lampp/htdocs/gibbon/gibbon.php on line 23
PHP Fatal error: Call to undefined function ___() in /opt/lampp/htdocs/gibbon/cli/behaviour_letters.php on line 257

Do you have any idea about this situation? Thank you very much.

Chun

Chun,

Thanks for getting in touch. Have you tried the instructions shown at:

https://gibbonedu.org/support/administrators/command-line-tools?

Thanks,

Ross

Hi Chun,

Turns out there was indeed a typo in the script. Ross just commited a fix in in current development branch. If you’ve running v13, you can pull the latest version or simply replace core/cli/behaviour_letters.php with this file:
https://github.com/GibbonEdu/core/blob/567f1de5d86e469983dc141da489ec260a0ccc89/cli/behaviour_letters.php

If you’re running v12 or earlier, the fix can be applied by replacing ___( with <code class="CodeInline">__( (only two underscores) on lines 257 and 269.

Hope this helps! Give a shout if you have any questions.

  • Sandra