Maybe Useful for you!

 

Today at 06:00 PM when i learning new version cakePHP framework, i want to implement ACL feature. After reading some tutorial, i start to doing each steps explained by the tutorial.

I run this command, in my dos console :
cake acl create aco / ROOT and got error messages like this :

Fatal error: Undefined class name ’string’ in D:\tohtdocs\MyBand\cake\libs\model
\datasources\dbo_source.php on line 1456

This error message annoying, after asking question everywhere, i’am still stuck! no solutions. After that, i decided to visiting all of my new friends in #cakephp at IRC. Hooorraayy i was very luck because i meet very great people AD7six . He ask me for checking cake trac and ask me browse the dbo_source.php in

THE BUG FIXES

The db0_source.php bug is not too serious.. just adding this line :

uses(’String’);

at the top of all classes from dbo_source.php

looks like this :

  1. <?php
  2. /* SVN FILE: $Id: dbo_source.php 6311 2008-01-02 06:33:52Z phpnut $ */
  3. /**
  4. * Short description for file.
  5. *
  6. * Long description for file
  7. *
  8. * PHP versions 4 and 5
  9. *
  10. * CakePHP(tm) :  Rapid Development Framework <http://www.cakephp.org/>
  11. * Copyright 2005-2008, Cake Software Foundation, Inc.
  12. *                1785 E. Sahara Avenue, Suite 490-204
  13. *                Las Vegas, Nevada 89104
  14. *
  15. * Licensed under The MIT License
  16. * Redistributions of files must retain the above copyright notice.
  17. *
  18. * @filesource
  19. * @copyright  Copyright 2005-2008, Cake Software Foundation, Inc.
  20. * @link        http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
  21. * @package   cake
  22. * @subpackage    cake.cake.libs.model.datasources
  23. * @since   CakePHP(tm) v 0.10.0.1076
  24. * @version   $Revision: 6311 $
  25. * @modifiedby    $LastChangedBy: phpnut $
  26. * @lastmodified  $Date: 2008-01-02 00:33:52 -0600 (Wed, 02 Jan 2008) $
  27. * @license   http://www.opensource.org/licenses/mit-license.php The MIT License
  28. */
  29. uses('set');
  30.  
  31. /**
  32. * DboSource
  33. *
  34. * Creates DBO-descendant objects from a given db connection configuration
  35. *
  36. * @package  cake
  37. * @subpackage  cake.cake.libs.model.datasources
  38. */
  39. class DboSource extends DataSource {

and the new with bug fixes look like this :

  1. <?php
  2. /* SVN FILE: $Id: dbo_source.php 6311 2008-01-02 06:33:52Z phpnut $ */
  3. /**
  4. * Short description for file.
  5. *
  6. * Long description for file
  7. *
  8. * PHP versions 4 and 5
  9. *
  10. * CakePHP(tm) :  Rapid Development Framework <http://www.cakephp.org/>
  11. * Copyright 2005-2008, Cake Software Foundation, Inc.
  12. *                1785 E. Sahara Avenue, Suite 490-204
  13. *                Las Vegas, Nevada 89104
  14. *
  15. * Licensed under The MIT License
  16. * Redistributions of files must retain the above copyright notice.
  17. *
  18. * @filesource
  19. * @copyright  Copyright 2005-2008, Cake Software Foundation, Inc.
  20. * @link        http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
  21. * @package   cake
  22. * @subpackage    cake.cake.libs.model.datasources
  23. * @since   CakePHP(tm) v 0.10.0.1076
  24. * @version   $Revision: 6311 $
  25. * @modifiedby    $LastChangedBy: phpnut $
  26. * @lastmodified  $Date: 2008-01-02 00:33:52 -0600 (Wed, 02 Jan 2008) $
  27. * @license   http://www.opensource.org/licenses/mit-license.php The MIT License
  28. */
  29. uses('set');
  30. uses('String'); // add this line
  31.  
  32. /**
  33. * DboSource
  34. *
  35. * Creates DBO-descendant objects from a given db connection configuration
  36. *
  37. * @package  cake
  38. * @subpackage  cake.cake.libs.model.datasources
  39. */
  40. class DboSource extends DataSource {

I hope this article help you.. :)

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Reply