Archive | CakePHP RSS feed for this section

Multilingual apps with CakePHP

TweetNote: If you are looking for a way to set page titles in CakePHP it is here There are basic two ways to creating a multilingual app in traditional PHP, using a file with variables for each of the phrase which our Coppermine Picture Gallery uses and then there is the gettext series of functions [...]

Read full story · Comments { 17 }

Use cake console with XAMPP

TweetIf you have problem while running cake console scripts for your LAMPP installation and get an error like './cake: line 34: exec: php: not found', fix this problem by editing 'cake' shell script and changing line PLAIN TEXT CODE: exec php -q ${LIB}cake.php "$@" -working "${APP}" to PLAIN TEXT CODE: exec /opt/lampp/bin/php -q ${LIB}cake.php "$@" [...]

Read full story · Comments { 2 }

PHP array to JSON in CakePHP

TweetIt is an often asked question on the CakePHP google groups, how to pass a php array to javascript. The answer is to convert the PHP array to JSON, I have seen several solutions recommended which included using vendor classes, the PHP 5 extension for JSON - however the recommended way is to use the [...]

Read full story · Comments { 8 }