CakePHP DB_ACL install

Posted on March 6, 2006 | 1 comment

In trying to install the new CakePHP DB_ACL functionality I ran across some issues with my php CLI setup.

I was following the link here CakePHP ACL.

My setup was created by the “xampp-win32-1.5.1-installer.exe” installer. Basically a light version of Apache 2.2.0, PHP 5.1.1, windows XP installer.

I fired up the command prompt to run the command line code as outline in the CakePHP ACL instructions and came across some errors.

First Error:
Warning: require_once(CORE_PATHcake\libs\neat_array.php): failed to open stream: No such file or directory in C:\xampplite\htdocs\cake\cake\basics.php on line 392

I fixed this by added “define(‘CORE_PATH’, CAKE_CORE_INCLUDE_PATH.DS);” to line 44 of acl.php

Second Error:
Fatal error: Class ‘Inflector’ not found in C:\xampplite\htdocs\cake\cake\libs\model\connection_manager.php on line 111

I fixed this error and later errors by adding the below lines of code right after line that says “require ‘cake’.DS.’basics.php’);”,
define(‘LIBS’, CORE_PATH.’cake’ .DS. ‘libs’.DS);
require LIBS.’inflector.php’;

Then the acl.php script was able to be run as a php CLI command line script. Not sure if this is a common error with this script or if its just with my setup and php.exe configuration.