cakephp-bake

permissions error running Console/cake

天大地大妈咪最大 提交于 2020-01-05 11:47:51
问题 I'm trying to run the cake console application for the first time. From the cake app folder I am running Console/cake then I get the following output PHP Warning: SplFileInfo::openFile(/var/www/virtual_host.com/public_html/app/tmp/cache/persistent/myapp_cake_core_file_map): failed to open stream: Permission denied in /var/www/virtual_host.com/public_html/lib/Cake/Cache/Engine/FileEngine.php on line 314 Warning: SplFileInfo::openFile(/var/www/virtual_host.com/public_html/app/tmp/cache

cake console 2.2.1: Bake errors

北城余情 提交于 2019-12-23 21:54:36
问题 OSX machine running MAMP. CakePHP 2.2.1 installed and configured properly (meaning that I have all green bars when I browse to the Index.php file, I have completed the Blogs tutorial and am working on my second app with which scaffolding is up and running). Now I am trying to Bake for the first time. Per the cookbook (and others), I installed a fresh copy of cake into a directory (my users directory) and then put the path variable in my .bash_profile file export PATH="$PATH:/Users/p_scott

Bake tool cannot see tables in SQLite3 database

随声附和 提交于 2019-12-21 16:59:44
问题 I am trying to build a simple app with CakePHP 2.1.1 using SQLite3 as the database. To save time I tried to use the bake tool to create a model for the following table: CREATE TABLE animals ( id integer primary key autoincrement, name text ); but the bake tool returns the following error: Your database does not have any tables. I figured Cake had a problem connecting to the database, so I went ahead and created the appropriate model, controller, and views myself. I inserted a single record

CakePHP, Set “cake” Environment Variable?

偶尔善良 提交于 2019-12-11 11:47:30
问题 I'm using the "cake" console in cakephp on Mac OS X 10.6.2. How do I set up the environment variable (or PATH?) so that all I need to type in terminal is "cake"... as opposed to the full path to the console app? I'm unabashedly a newb when it comes to terminal commands and these UNIX things (but I'm learning!), so bear with me if my explanation/vocabulary is a bit off. 回答1: You should add alias cake=PATH_TO_CAKE To your .bashrc file (it's usually in your home directory). To expose all cake

right way to install cakephp-scripts for v2.2.1?

梦想的初衷 提交于 2019-12-10 06:30:00
问题 I am using ubuntu and as per instruction I use 'apt-get isntall cakephp-scripts' I am using latest stable release of cake v 2.2.1, but when I run cake bake -app , I always get console for v1.3.2 Why do I get CakePHP v1.3.2 Console on cakephp v 2.2.1 回答1: As the others already pointed out, CakePHP from the repositories is v1.3.2 which doesn't work with your 2.1. After uninstalling ( sudo apt-get remove cakephp-scripts ) it, do the following: Download CakePHP 2.1 and extract it somewhere

CakePHP Bake Shell Error: Database connection “Mysql” is missing, or could not be created

徘徊边缘 提交于 2019-12-10 03:54:23
问题 I have an issue here with baking. I've read the previous answers to similar questions, but the solutions seem to not apply here. I can't bake because the error I receive is: Database connection “Mysql” is missing, or could not be created If I run which php the PHP it's reading is the correct path within MAMP. If I check the PDO modules: php -i | grep "PDO" PDO PDO support => enabled PDO drivers => sqlite, pgsql, mysql PDO Driver for MySQL => enabled PDO Driver for PostgreSQL => enabled PDO

Cake PHP Fatal Error (256)

浪尽此生 提交于 2019-12-09 01:38:21
问题 I have just created an application using cake bake and when I run it I get the screen that says 'Sweet, myApp got baked' but there are no styling on it and at the bottom I get the following error: Fatal Error (256): ConnectionManager::getDataSource - Non-existent data source default [CORE\cake\libs\model\connection_manager.php, line 102] I've configure my database and user etc. But I don't understood what's going on. Can anyone help please? 回答1: You likely entered a name for Cake's bake

right way to install cakephp-scripts for v2.2.1?

三世轮回 提交于 2019-12-05 13:33:09
I am using ubuntu and as per instruction I use 'apt-get isntall cakephp-scripts' I am using latest stable release of cake v 2.2.1, but when I run cake bake -app , I always get console for v1.3.2 Why do I get CakePHP v1.3.2 Console on cakephp v 2.2.1 As the others already pointed out, CakePHP from the repositories is v1.3.2 which doesn't work with your 2.1. After uninstalling ( sudo apt-get remove cakephp-scripts ) it, do the following: Download CakePHP 2.1 and extract it somewhere globally available (e.g. /usr/share/php/cakephp/ Check the permissions: /usr/share/cakephp/ and all subfolders

CakePHP Bake Shell Error: Database connection “Mysql” is missing, or could not be created

一世执手 提交于 2019-12-05 03:32:09
I have an issue here with baking. I've read the previous answers to similar questions, but the solutions seem to not apply here. I can't bake because the error I receive is: Database connection “Mysql” is missing, or could not be created If I run which php the PHP it's reading is the correct path within MAMP. If I check the PDO modules: php -i | grep "PDO" PDO PDO support => enabled PDO drivers => sqlite, pgsql, mysql PDO Driver for MySQL => enabled PDO Driver for PostgreSQL => enabled PDO Driver for SQLite 3.x => enabled My application (or what I've completed on it so far) has no trouble

Bake every table in CakePHP?

北慕城南 提交于 2019-12-05 01:47:44
问题 The database I'm working on has more than 100 tables, so I'm not going to sit here baking a model and controller for each one individually. I would like to bake all of the tables at the same time with something like the .xml files in Hibernate that tells it the limitations on fields so that I don't have to go through every column on every table, and automatically select the relationships. Is this possible? 回答1: To bake all of you models, use cake bake model all . Controllers would be cake