Mar
23
Cook up Web sites fast with CakePHP ACL Problem
March 23, 2008 |
In Cook up Web sites fast with CakePHP, Part 2: Bake bigger and better with CakePHP by IBM, you may have problems working with Access Control Lists (ACL).
In your app directory the tutorial states within the terminal define your groups with the following code.
php acl.php create aro 0 null Users
php acl.php create aro 0 null Dealers
When you do this you will get the following response:
Could not open input file: acl.php
Now instead of using
php acl.php create aro 0 null Users
php acl.php create aro 0 null Dealers
try the following code:
../cake/console/cake acl create aro root 'Users'
../cake/console/cake acl create aro root 'Dealers'
now you may get an error message similar to the one below:
Fatal error: Class 'String' not found in /mycakelocation/cake/libs/model/datasources/dbo_source.php on line 1455
Now open the dbo_source.php, on line 29, replace
uses('set');
with
uses('set', 'string');
save the file and run the following lines of code again:
../cake/console/cake acl create aro root 'Users'
../cake/console/cake acl create aro root 'Dealers'
Now you are done!
Similar Posts
- CakePHP Solution for Could not open input file: acl.php
- Cook up Web sites fast with CakePHP MySQL Syntax Problem
- CakePHP acl delete aro Correct Systax
- CakePHP - the right syntax to use near ‘generateList’
- Cook up Web sites fast with CakePHP - Invalid Login
- CakePHP Solution for Warning: Cannot modify header information - headers already sent
- Cook up Web sites fast with CakePHP knownusers.thtml
Comments
7 Comments so far



































the first problem was made by the author of the IBM tutorial, the second problem is from CakePHP, but I thought a nightly build version of CakePHP fixed the bug already?
Thanks so much for organizing this info and publishing in one place. :) It’s handy for those of us who don’t want to upgrade to the nightly but still need to work with ACL.
You are welcome! I am glad it helps!
Hello i’m from Brazil, sorry my inghish
follow their guidelines, but the error persists.
I run code:
C:\www\cake\ibmblog\app>cake acl create aro root ‘Users’
Welcome to CakePHP v1.2.0.6311 beta Console
—————————————————————
Fatal error: Class ‘String’ not found in C:\www\cake\cake12\cake\libs\model\datasources\dbo_source.php on line 1455
Can you help me?
Hi, Cássio
Just find the file cake/libs/model/datasources/dbo_source.php, open it, find the code uses(’set’); and change it to uses(’set’, ’string’);
It should work. :)
Thx for this post.
And i think the command should be
../cake/console/cake acl create aro root Users
otherwise the response message is
New Aro ”Users” created.
Not 100% sure thou, I’m new to cake, but sounds resonable
Thanks for the help! Worked like a charm!