Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to use the console command DbAcl in CakePHP 2.0
    text
    copied!<p>I'm trying to do my first steps with <code>CakePHP 2</code> <code>console</code> with <code>Leopard</code> and <code>XAMPP</code> but I get many problems which are not clear to me.</p> <p>In the <a href="http://book.cakephp.org/2.0/en/core-libraries/components/access-control-lists.html?highlight=acl#AclComponent" rel="nofollow">CakePHP 2.0 guide</a> is written i need to setup correctly <code>/app/Config/database.php to</code> be sure it works, then I've tested it with an user registration and everything works.</p> <p>Then I've read I can call the command via shell:</p> <pre><code>$ cake schema create DbAcl </code></pre> <p>This doesn't work because I must write the <code>right path</code> to the console app, then:</p> <pre><code>$ /Users/username/.../site.com/lib/Cake/Console/cake schema create DbAcl </code></pre> <p>After did that I get this error:</p> <pre><code>Welcome to CakePHP v2.0.4 Console --------------------------------------------------------------- App : username Path: /Users/username/ --------------------------------------------------------------- Cake Schema Shell --------------------------------------------------------------- /Users/username/Config/Schema/db_acl.php could not be loaded iMac-Name:~ username$ </code></pre> <p>My CakePHP installation is located in the folder <code>site.com</code>:</p> <pre><code>site.com/app site.com/lib site.com/plugins site.com/vendors site.com/etc. </code></pre> <p>So I did this to change the CakePHP folder to the installation folder named <code>site.com</code></p> <pre><code>$ /Users/username/.../site.com/lib/Cake/Console/cake -app /Users/.../site.com </code></pre> <p>Now I get this message:</p> <pre><code>Welcome to CakePHP v2.0.4 Console --------------------------------------------------------------- App : site.com Path: /Users/.../public_html/site.com/ --------------------------------------------------------------- Current Paths: -app: site.com -working: /Users/.../site.com -root: /Users/.../public_html -core: /Users/.../site.com/lib </code></pre> <p>Now if I write </p> <pre><code>$ /Users/username/.../site.com/lib/Cake/Console/cake schema create DbAcl </code></pre> <p>I get the wrong original path again with a different error:</p> <pre><code>Welcome to CakePHP v2.0.4 Console --------------------------------------------------------------- App : username Path: /Users/username/ --------------------------------------------------------------- Cake Schema Shell --------------------------------------------------------------- /Users/username/Config/Schema/db_acl.php could not be loaded </code></pre> <p>How can I fix the path correctly?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload