Re: CakePHP 1.3 and AMFPHP

2011-04-09 Thread R0ckET
I found only one plugin that list was last updated in 2008

On 10 abr, 02:53, Ryan Schmidt  wrote:
> On Apr 10, 2011, at 00:45, R0ckET wrote:
>
> > hello, someone has used AMFPHP with cakephp 1.3?
>
> Did you try Google? There appear to be several results.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP 1.3 and AMFPHP

2011-04-09 Thread Ryan Schmidt

On Apr 10, 2011, at 00:45, R0ckET wrote:

> hello, someone has used AMFPHP with cakephp 1.3?

Did you try Google? There appear to be several results.



-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


CakePHP 1.3 and AMFPHP

2011-04-09 Thread R0ckET
hello, someone has used AMFPHP with cakephp 1.3?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: New to Cake DB Help

2011-04-09 Thread cricket
On Fri, Apr 8, 2011 at 9:23 PM, Logan Best  wrote:
> Hi,
>
> I am new to CakePHP and wasn't really understanding the database
> structure naming conventions entirely, or maybe I am, I don't know.
> I was mainly wondering if someone could rewrite this DB Structure to
> the appropriate naming convention:

Here you go:

CREATE TABLE `ambiances` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(64) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

INSERT INTO ambiances (name) VALUES
('Casual Fine Dining'),
('Waterfront'),
('Rooftop'),
('Patio'),
('Beach'),
('Romantic'),
('Casual'),
('Eclectic'),
('By Boat'),
('For Kids'),
('Dog Friendly'),
('Fine Dining'),
('Outdoor Dining'),
('Water Front Dining');

CREATE TABLE `cuisines` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(64) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

INSERT INTO cuisines (name) VALUES
('American'),
('Bakeries'),
('Banquet'),
('Bar Tavern'),
('Barbecue'),
('Breakfast'),
('Brunch'),
('Buffet'),
('Cajun'),
('Caribbean'),
('Catering'),
('Chinese'),
('Coffeeshops'),
('Deli'),
('Delivery'),
('Dessert'),
('English'),
('Fondue'),
('French'),
('Greek'),
('Hawaiian'),
('Indian'),
('Italian'),
('Japanese'),
('Live Entertainment'),
('Mediterranean'),
('Mexican'),
('Nightlife'),
('Organic'),
('Pizzeria'),
('Seafood'),
('Southern'),
('Southwest'),
('Sushi'),
('Tapas'),
('Thai'),
('Vegetarian'),
('Vietnamese');

CREATE TABLE `locations` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(64) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

INSERT INTO locations (`name`) VALUES
('Bluffton'),
('Broughton'),
('Brunswick'),
('City Market'),
('Claxton'),
('Downtown'),
('Garden City'),
('Gateway'),
('Hilton Head'),
('Historic District'),
('Midtown'),
('Oglethorpe Mall'),
('Pooler'),
('Richmond Hill'),
('River Street'),
('Sandfly'),
('Savannah Airport'),
('Savannah Mall'),
('Southside'),
('Statesboro'),
('Sylvania'),
('Thunderbolt'),
('Tybee Island'),
('Victorian District'),
('Whitemarsh Island'),
('Wilmington Island');

CREATE TABLE `restaurants` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `location_id` INT(11) NOT NULL,
  `name` VARCHAR(150) NOT NULL,
  `phone` VARCHAR(20) NOT NULL,
  `address` VARCHAR(150) NOT NULL,
  `city` VARCHAR(25) NOT NULL,
  `state` VARCHAR(10) NOT NULL,
  `zip` INT(10) NOT NULL,
  `vip_special` VARCHAR(250) NOT NULL,
  `url` VARCHAR(50) NOT NULL,
  `preferred` INT(20) DEFAULT '0',
  `image` VARCHAR(255),
  `couples_special` VARCHAR(255),
  `group_special` VARCHAR(255),
  `girlscout_special` VARCHAR(255),
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=198;


Cake doesn't use ENUMs. Lucky for you, the columns can all be changed
to boolean (or Cake's version--booleans are handled differently
between RDBMs).

Wait--scratch that. Every one of these should be a row in its table,
not a column. Even a non-Cake DB should be normalised that way.

The table names must be all lowercase and plural. I think the columns
need to be lowercase, also. If not, you'd at least have to put public
$primaryKey = 'ID'; at the top of your models as Cake expects 'id'.
I'd recommend just making them lowercase.

For the associations, you're looking at hasAndBelongsToMany (HABTM)
ambience and cuisine, because several restaurants may share these.

CREATE TABLE ambiances_restaurants (
ambiance_id INT(11) NOT NULL,
restaurant_id INT(11) NOT NULL,
FOREIGN KEY (ambiance_id) REFERENCES ambiances (id) ON DELETE CASCADE,
FOREIGN KEY (restaurant_id) REFERENCES restaurants (id) ON DELETE 
CASCADE
) ENGINE=MyISAM;

CREATE TABLE cuisines_restaurants (
cuisine_id INT(11) NOT NULL,
restaurant_id INT(11) NOT NULL,
FOREIGN KEY (cuisine_id) REFERENCES cuisines (id) ON DELETE CASCADE,
FOREIGN KEY (restaurant_id) REFERENCES restaurants (id) ON DELETE 
CASCADE
) ENGINE=MyISAM;

You won't get real FKs with a MyISAM engine, but that'll at least
create an index on them for you.

Location should be hasOne because you've got the address info right
there in the table. So each record can only have one location. So I've
included a location_id column.

I'm not sure if I want the couples, group, or girl scout special.
Decisions, decisions ...

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread cricket
On Sun, Apr 10, 2011 at 12:08 AM, Ryan Schmidt
 wrote:
> On Apr 9, 2011, at 22:20, cricket wrote:
>> On Sat, Apr 9, 2011 at 10:43 PM, peterhf wrote:
>>> As to the last two suggestions, this has been the result. First, My
>>> computer is running 10.6.7, the Drupal article pertained to 10.4.
>>> I have developed twoapplications in CakePHP on my iMac running
>>> 10.4 without problems. Also there are only two httpd.conf files on
>>> my computer, one in /private/etc/apache2/ and on in
>>> /private/etc/apache2/original/. I did an sudo find and found only
>>> those two files.
>>
>> httpd.conf is the main configuration file. Per the Drupal article,
>> there may be others. Is there a sites directory?
>
> That part of the article is referring to the directory structure found on Mac 
> OS X
> Server, not on Mac OS X client. httpd.conf is the file to edit on Mac OS X 
> client.

My bad. Peter, are you sure you're reloading apache? Or that you're
editing the correct  block?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread Ryan Schmidt
On Apr 9, 2011, at 22:20, cricket wrote:
> On Sat, Apr 9, 2011 at 10:43 PM, peterhf wrote:
>> As to the last two suggestions, this has been the result. First, My
>> computer is running 10.6.7, the Drupal article pertained to 10.4.
>> I have developed twoapplications in CakePHP on my iMac running
>> 10.4 without problems. Also there are only two httpd.conf files on
>> my computer, one in /private/etc/apache2/ and on in
>> /private/etc/apache2/original/. I did an sudo find and found only
>> those two files.
> 
> httpd.conf is the main configuration file. Per the Drupal article,
> there may be others. Is there a sites directory?

That part of the article is referring to the directory structure found on Mac 
OS X Server, not on Mac OS X client. httpd.conf is the file to edit on Mac OS X 
client.




-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


New to Cake DB Help

2011-04-09 Thread Logan Best
Hi,

I am new to CakePHP and wasn't really understanding the database
structure naming conventions entirely, or maybe I am, I don't know.
I was mainly wondering if someone could rewrite this DB Structure to
the appropriate naming convention:


CREATE TABLE `Ambiance` (
   `ID` int(11) not null,
   `RestName` varchar(150) not null,
   `Casual_Fine_Dining` enum('Yes','No') not null default 'No',
   `Waterfront` enum('Yes','No') not null default 'No',
   `Rooftop` enum('Yes','No') not null default 'No',
   `Patio` enum('Yes','No') not null default 'No',
   `Beach` enum('Yes','No') not null default 'No',
   `Romantic` enum('Yes','No') not null default 'No',
   `Casual` enum('Yes','No') not null default 'No',
   `Eclectic` enum('Yes','No') not null default 'No',
   `By_Boat` enum('Yes','No') not null default 'No',
   `For_Kids` enum('Yes','No') not null default 'No',
   `Dog_Friendly` enum('Yes','No') not null default 'No',
   `Fine_Dining` enum('Yes','No') not null default 'No',
   `Outdoor_Dining` enum('Yes','No') not null default 'No',
   `Water_Front_Dining` enum('Yes','No') not null default 'No',
   PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


CREATE TABLE `Cuisine` (
   `ID` int(11) not null,
   `RestName` varchar(150) not null,
   `American` enum('Yes','No') not null default 'No',
   `Bakeries` enum('Yes','No') not null default 'No',
   `Banquet` enum('Yes','No') not null default 'No',
   `Bar_Tavern` enum('Yes','No') not null default 'No',
   `Barbecue` enum('Yes','No') not null default 'No',
   `Breakfast` enum('Yes','No') not null default 'No',
   `Brunch` enum('Yes','No') not null default 'No',
   `Buffet` enum('Yes','No') not null default 'No',
   `Cajun` enum('Yes','No') not null default 'No',
   `Caribbean` enum('Yes','No') not null default 'No',
   `Catering` enum('Yes','No') not null default 'No',
   `Chinese` enum('Yes','No') not null default 'No',
   `Coffeeshops` enum('Yes','No') not null default 'No',
   `Deli` enum('Yes','No') not null default 'No',
   `Delivery` enum('Yes','No') not null default 'No',
   `Dessert` enum('Yes','No') not null default 'No',
   `English` enum('Yes','No') not null default 'No',
   `Fondue` enum('Yes','No') not null default 'No',
   `French` enum('Yes','No') not null default 'No',
   `Greek` enum('Yes','No') not null default 'No',
   `Hawaiian` enum('Yes','No') not null default 'No',
   `Indian` enum('Yes','No') not null default 'No',
   `Italian` enum('Yes','No') not null default 'No',
   `Japanese` enum('Yes','No') not null default 'No',
   `Live_Entertainment` enum('Yes','No') not null default 'No',
   `Mediterranean` enum('Yes','No') not null default 'No',
   `Mexican` enum('Yes','No') not null default 'No',
   `Nightlife` enum('Yes','No') not null default 'No',
   `Organic` enum('Yes','No') not null default 'No',
   `Pizzeria` enum('Yes','No') not null default 'No',
   `Seafood` enum('Yes','No') not null default 'No',
   `Southern` enum('Yes','No') not null default 'No',
   `Southwest` enum('Yes','No') not null default 'No',
   `Sushi` enum('Yes','No') not null default 'No',
   `Tapas` enum('Yes','No') not null default 'No',
   `Thai` enum('Yes','No') not null default 'No',
   `Vegetarian` enum('Yes','No') not null default 'No',
   `Vietnamese` enum('Yes','No') not null default 'No',
   PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


CREATE TABLE `Location` (
   `ID` int(11) not null,
   `RestName` varchar(150) not null,
   `Bluffton` enum('Yes','No') not null default 'No',
   `Broughton` enum('Yes','No') not null default 'No',
   `Brunswick` enum('Yes','No') not null default 'No',
   `City_Market` enum('Yes','No') not null default 'No',
   `Claxton` enum('Yes','No') not null default 'No',
   `Downtown` enum('Yes','No') not null default 'No',
   `Garden_City` enum('Yes','No') not null default 'No',
   `Gateway` enum('Yes','No') not null default 'No',
   `Hilton_Head` enum('Yes','No') not null default 'No',
   `Historic_District` enum('Yes','No') not null default 'No',
   `Midtown` enum('Yes','No') not null default 'No',
   `Oglethorpe_Mall` enum('Yes','No') not null default 'No',
   `Pooler` enum('Yes','No') not null default 'No',
   `Richmond_Hill` enum('Yes','No') not null default 'No',
   `River_Street` enum('Yes','No') not null default 'No',
   `Sandfly` enum('Yes','No') not null default 'No',
   `Savannah_Airport` enum('Yes','No') not null default 'No',
   `Savannah_Mall` enum('Yes','No') not null default 'No',
   `Southside` enum('Yes','No') not null default 'No',
   `Statesboro` enum('Yes','No') not null default 'No',
   `Sylvania` enum('Yes','No') not null default 'No',
   `Thunderbolt` enum('Yes','No') not null default 'No',
   `Tybee_Island` enum('Yes','No') not null default 'No',
   `Victorian_District` enum('Yes','No') not null default 'No',
   `Whitemarsh_Island` enum('Yes','No') not null default 'No',
   `Wilmington_Island` enum('Yes','No') not null default 'No',
   PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET

Re: URL problem

2011-04-09 Thread peterhf
In /private/etc/apache2/ there is a directory "users" which contains
a file "my_name.conf. This file contains:


Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all


On Apr 9, 8:20 pm, cricket  wrote:
> On Sat, Apr 9, 2011 at 10:43 PM, peterhf  wrote:
> > My deepest thanks to all of you for your consideration. This process
> > has been most exasperating and disappointing and you suggestions
> > have been a great help.
>
> > As to the last two suggestions, this has been the result. First, My
> > computer is running 10.6.7, the Drupal article pertained to 10.4.
> > I have developed twoapplications in CakePHP on my iMac running
> > 10.4 without problems. Also there are only two httpd.conf files on
> > my computer, one in /private/etc/apache2/ and on in
> > /private/etc/apache2/original/. I did an sudo find and found only
> > those two files.
>
> httpd.conf is the main configuration file. Per the Drupal article,
> there may be others. Is there a sites directory?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread cricket
On Sat, Apr 9, 2011 at 10:43 PM, peterhf  wrote:
> My deepest thanks to all of you for your consideration. This process
> has been most exasperating and disappointing and you suggestions
> have been a great help.
>
> As to the last two suggestions, this has been the result. First, My
> computer is running 10.6.7, the Drupal article pertained to 10.4.
> I have developed twoapplications in CakePHP on my iMac running
> 10.4 without problems. Also there are only two httpd.conf files on
> my computer, one in /private/etc/apache2/ and on in
> /private/etc/apache2/original/. I did an sudo find and found only
> those two files.

httpd.conf is the main configuration file. Per the Drupal article,
there may be others. Is there a sites directory?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread peterhf
My deepest thanks to all of you for your consideration. This process
has been most exasperating and disappointing and you suggestions
have been a great help.

As to the last two suggestions, this has been the result. First, My
computer is running 10.6.7, the Drupal article pertained to 10.4.
I have developed twoapplications in CakePHP on my iMac running
10.4 without problems. Also there are only two httpd.conf files on
my computer, one in /private/etc/apache2/ and on in
/private/etc/apache2/original/. I did an sudo find and found only
those two files.

Second, I changed the httpd.conf file in /private/etc/apache2/
original/
only out of desparation. I have removed the modification that I
had made -> problem persists.

On Apr 9, 6:29 pm, Ryan Schmidt  wrote:
> On Apr 9, 2011, at 19:02, peterhf wrote:
>
> > On my OS 10.6.7, there are two httpd.conf files. One in /private/etc/
> > apache2/
> > and /private/etc/apache2/original/. I have set AllowOverride to All in
> > both.
>
> Understand that the files in /etc/apache2/original are meant to be the 
> original files, as provided by Apple, and are not meant to ever be edited by 
> you. You should undo any changes you made to the files in the "original" 
> directory.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread Ryan Schmidt

On Apr 9, 2011, at 19:02, peterhf wrote:

> On my OS 10.6.7, there are two httpd.conf files. One in /private/etc/
> apache2/
> and /private/etc/apache2/original/. I have set AllowOverride to All in
> both.

Understand that the files in /etc/apache2/original are meant to be the original 
files, as provided by Apple, and are not meant to ever be edited by you. You 
should undo any changes you made to the files in the "original" directory.


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread cricket
On Sat, Apr 9, 2011 at 8:02 PM, peterhf  wrote:
> On my OS 10.6.7, there are two httpd.conf files. One in /private/etc/
> apache2/
> and /private/etc/apache2/original/. I have set AllowOverride to All in
> both.
> Yesterday, I posted a bug ticket which included details of everything
> that
> I have tried. I received an email and post in the bug system stating
> that
> there is nothing wrong with the code and that the problem is a
> mod_rewrite
> error on my part. I went to the book for 1.3, section 3.3.4 and
> reviewed
> the two pages of mod_rewrite configuration detailed there. I could
> find
> no differences there from what I had already implemented.

It is a mod_rewrite issue in that the rewrite rules are not being
seen. The root of the problem, though, is that the htaccess files are
not being read. I just found this article which explains which file to
edit.
http://drupal.org/node/134814

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread peterhf
On my OS 10.6.7, there are two httpd.conf files. One in /private/etc/
apache2/
and /private/etc/apache2/original/. I have set AllowOverride to All in
both.
Yesterday, I posted a bug ticket which included details of everything
that
I have tried. I received an email and post in the bug system stating
that
there is nothing wrong with the code and that the problem is a
mod_rewrite
error on my part. I went to the book for 1.3, section 3.3.4 and
reviewed
the two pages of mod_rewrite configuration detailed there. I could
find
no differences there from what I had already implemented.

Today I downloaded CakePHP 1.3.7, installed it -> same problem.

I have installed and used previous versions of CakePHP without this
problem. In fact they worked pretty much right out-of-the-box. I am
now
looking at Yii or developing this application in PHP "longhand".

On Apr 9, 11:09 am, Ryan Schmidt  wrote:
> On Apr 9, 2011, at 12:46, cricket wrote:
>
> >> Where else could  AllowOverride be set to None?
>
> > The only time I've installed Apache on a mac was in a system with X
> > installed, so it was pretty non-standard. But have a look at this
> > page:
> >http://foundationphp.com/tutorials/php_leopard.php
>
> > It seems to be either:
> > /private/etc/httpd/users
> > /private/etc/Apache2/users
>
> Mac OS X 10.6 Snow Leopard's httpd.conf file is in /etc/apache2. I believe 
> it's the same for Mac OS X 10.5 Leopard. On Mac OS X 10.4 and earlier, it 
> should be in /etc/httpd.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: minimum memory for cake 1.3

2011-04-09 Thread Miloš Vučinić
Thanks a lot, I really apreciate your responce .

Kind regards,
Milos Vucinic

On Apr 9, 1:22 pm, Andras Kende  wrote:
> Hello,
>
> 8MB is not much nowadays, php 5.3 is default setting is 128MB..
> Probably 32-64 should be fine for a simpler app...
>
> You could Install debug_kit to see memory 
> usage:https://github.com/cakephp/debug_kit#readme
>
> also in queries make sure to use fields and correct associations to only pull
> data out from database which is needed...
>
> Andras Kendehttp://www.kende.com
>
> On Apr 9, 2011, at 10:24 AM, Miloš Vučinić wrote:
>
> > Hi guys,
>
> > I made a project for my faculty , a temporary web site which collects
> > answers to one poll in cake php 1.3. It runs ok, but when I log into
> > cake admin, I get error that I have reached my 8mb memory limit.
>
> > having in mind that I did not use much resources , and that in total
> > with auth component I have 10 tables I guess i couldn't made much
> > mess. Everything was baked, and just a few things I added nothing
> > special..
>
> > So , I read that 8 mb for cake is not so much. What is some regular
> > sized minimum to run app with cake, and how can I measure project
> > memory usage in apache in my local machine ?
>
> > Thanks, all the best !
> > Milos
>
> > --
> > Our newest site for the community: CakePHP Video 
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread Ryan Schmidt
On Apr 9, 2011, at 12:46, cricket wrote:
>> Where else could  AllowOverride be set to None?
> 
> The only time I've installed Apache on a mac was in a system with X
> installed, so it was pretty non-standard. But have a look at this
> page:
> http://foundationphp.com/tutorials/php_leopard.php
> 
> It seems to be either:
> /private/etc/httpd/users
> /private/etc/Apache2/users

Mac OS X 10.6 Snow Leopard's httpd.conf file is in /etc/apache2. I believe it's 
the same for Mac OS X 10.5 Leopard. On Mac OS X 10.4 and earlier, it should be 
in /etc/httpd.



-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Reverse lookup of routes

2011-04-09 Thread cricket
On Sat, Apr 9, 2011 at 3:27 AM, ThunderTD  wrote:
> The custom route detailed in the CakePHP CookBook is working fine as
> long as it's used in one direction. Inside the routes.php file I'm
> using the following route:
>
> Router::connect('/:language/artists/:id',
> array('controller'=>'artists','action'=>'view'), array('pass' =>
> array('id'), 'language' => '[a-z]{3}','id' => '[0-9]{1}')); ,
>
> So I can accesss the View Action of the ArtistsController via
> http://xxx/artists/:id .
>
> But what about the reverse lookup. Shouldn't a call to $html-
>>link('Artist 2', array( 'controller' => 'artists', 'action' =>
> 'view', 2)) print out a link to http://xxx/artists/2 ? Instead it
> gives a link to http://xxx/artists/view/2.
>
> Is this expected behavior?

Yes. You need to pass your params like this:

$this->Html->link(
'Artist 2',
array(
'controller' => 'artists',
'action' => 'view',
'language' => 'fre',
'id' => 2
)
);

Notice that you'd forgotten language. Also, your route doesn't pass language.

Router::connect(
'/:language/artists/:id',
array(
'controller'=>'artists',
'action'=>'view'),
array(
'pass' => array(
'language',
'id'
),
'language' => '[a-z]{3}',
'id' => '[0-9]+'
)
);

I've also changed your regexp here for id. The way you had it, only
ids between 0 & 9 would match.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread cricket
On Sat, Apr 9, 2011 at 6:17 AM, peterhf  wrote:
> My mistake. TEST-dev is the name of the database used with this app.
> http://localhost/TEST-admin/ returns the app.
>
> I put this in the ...app/webroot/.htaccess,restarted -> same problem.
> 
>    RewriteEngine On
>    RewriteCond %{REQUEST_FILENAME} !-d
> dfskjsdsadjfsddfl
>    RewriteCond %{REQUEST_FILENAME} !-f
>    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
> 
>
> Does this mean that this file is not being read by apache?

Yes, it's being ignored. You'd cause a fatal error otherwise.

> Where else could  AllowOverride be set to None?

 The only time I've installed Apache on a mac was in a system with X
installed, so it was pretty non-standard. But have a look at this
page:
http://foundationphp.com/tutorials/php_leopard.php

It seems to be either:
/private/etc/httpd/users
/private/etc/Apache2/users

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Strange error passing from windows to linux

2011-04-09 Thread cricket
On Sat, Apr 9, 2011 at 5:40 AM, Mariano C.  wrote:
> Wherever I put this debug($this->MyModel::schema()) i get:
> T_PAAMAYIM_NEKUDOTAYIM php error :(

You shouldn't use the double colon syntax like that.

debug($this->MyModel->schema());

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Whats happening in Cake 2.0?

2011-04-09 Thread mark_story
You might also want to checkout the various wiki pages on lighthouse
(they are on the lower right side) 
http://cakephp.lighthouseapp.com/projects/42648-cakephp/overview.
These are currently undergoing a transfer into the sphinx
documentation available at http://github.com/cakephp/docs

-Mark

On Apr 7, 5:13 pm, Chris  wrote:
> I hear about how CakePHP 2.0 is having a lot of work poured in to it.
> I'm stuck here wondering what the differences (generally, I'm not
> seriously asking for a whole wiki worth of  an answer on google
> groups :P ) between 2.0 and say 1.3(which is what I use). Will there
> be any major syntax changes or major new features in 2.0 that I should
> eagerly await (or beta test / try to fix on github)?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Relaunched CakePHP Live Site

2011-04-09 Thread mark_story
The sphinx experiments are actually on github now, and are planned to
replace the cookbook for the 2.0 documentation.  There is obviously
still a ton of work to be done on them.  The documentation is still
not complete, and there are no translations at this time.  You can see
the repo at https://github.com/cakephp/docs

-Mark

On Apr 7, 11:20 pm, Vitor Pacheco  wrote:
> I think the best subject that could be approached is the current state
> of development
> of version 2.0 of cakephp... what can we expect?
> experiments that mark the story is making using Sphinx to generate
> documentation in various formats, what is your intention
>
> 2011/4/8 Larry E. Masters 
>
>
>
>
>
> > All the people on this list and not one person has suggestions what they
> > would like to see the core development discuss live?
>
> > --
> > Larry E. Masters
>
> > On Thu, Apr 7, 2011 at 1:35 AM, Larry E. Masters  wrote:
>
> >> Some of you may not be aware that we relaunched the CakePHP Live site
> >> recently. We had 1 live broadcast just before leaving on our tour and plan
> >> to do these more often. There will be a list 
> >> onhttp://live.cakephp.orgsoonwith upcoming dates and topics. I would also 
> >> like everyone to respond
> >> to this thread with topics they would like to see us discuss on these live
> >> video streams.
>
> >> --
> >> Larry E. Masters
>
> >  --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php
>
> --
> *Vitor Pacheco*
> *71 8626-7909
> 71 3378-5778
> **71 3287-3475***

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cake core might benefit from some more developers helping out

2011-04-09 Thread mark_story
Thanks for coming up with some good ideas on how things could be
improved. The biggest obstacle to all of the improvements that I can
see is time.  I feel that time is one of the factors preventing people
from contributing now as well, or at least I hope it is.  Creating
additional organization, and soliciting people to contribute all
requires time.  For me time has been in short supply.  I'm guessing
the other core members have also been tight on time as well.

I always felt that if people were interested in contributing, and had
a real interest in it, they would.  You can't really force people to
work for free, and to be honest working on open source requires
willpower and determination.  If people don't feel ready or don't feel
that they can help I don't really know what can be done to remedy
that.

I know in the past, and the present, the plans for CakePHP haven't
always been crystal clear and transparent.  We've been trying to
improve that situation, by putting up wiki pages with ways to
contribute, and what the current planned out changes are.  All this
has been put in lighthouse wiki pages, which may or may not be the
best place for it.  But its a place.  As for outstanding issues,
lighthouse is a great place to find all the known outstanding issues
in CakePHP, and I recommend that as a starting place for anyone
interested in helping out.

As for plans that extend beyond the current plans for 2.0, the only
thing that the current team has really discussed is a move to php5.3,
and the long overdue refactoring/rebuild of the model layer.  But not
much has been discussed in detail for either of those topics.  There
has also been a good start on re-writing/updating the documentation
for 2.0. We're hoping to solve a few problems that exist with the
current book, in addition to content updates.  Providing offline
documentation in multiple formats, and moving the version control into
git are the two main problems being solved.  This documentation update
still needs a ton of work, and is another good place for people to get
involved if they want.

There actually is a plugins site, it doesn't have an installer, but it
does maintain an index, and provides the ability to search through
plugins and available code.  http://cakepackages.com.

-Mark

On Apr 7, 1:29 am, keymaster  wrote:
> > What do you have in mind to solve this?
>
> Well, what I had in mind, actually, was precisely not a passive "people are
> welcome to fork the repo and patch bugs themselves and submit them for
> approval". That might bring us a few isolated contributions here and there,
> but that's not really what the framework needs at this point, in my opinion.
>
> The framework seems to becoming a framework supported by one person, Mark
> Story, and I don't believe it is healthy for any framework to be on the
> shoulders of only one person, no matter how great a developer he is.
>
> I was hoping that whoever is "in charge" of cakephp these days might
> consider doing all or some of the following:
>
> 1. Identify within the cake core 10 or more reasonably defined areas.
>
> 2. Put up a wiki with a section for each one of these areas. Describe in
> general what the area does, how it currently works, what deficiencies there
> are, what things need to be done to get to the next level.
>
> 3. Actively solicit a team leader for each area, as well as additional
> developers who want to assist that team leader in building the area up,
> implementing some of the proposed ideas, and proposing additional ideas.
>
> 3. Set up a developer forum, where each area can be discussed for ideas for
> improvement. Make the forum visible to the community, so others, can view
> and feel part of the ongoing development thought. If they have development
> related ideas for the core, or the issues being discussed, they have a place
> to add them.
>
> 4. Add a blog to cakephp.org with a "weekly news on cakephp development".
> There you would describe the updates made this week, summarize some of the
> issues being discussed, mention new sites recently built with cake, mention
> other blogs or sources which are discussing cake (see the Symfony2 blog
> "week of symfony - great idea).
>
> 5. Make a list of side projects which need to be developed for the cake
> community, separate from the core, and actively solicit developers to make
> it happen.
>
> eg.
>      A) a cake plugins site, modelled after Joomla extensions, for all
> plugins, descriptions, votes, community reviews, links to github or wherever
> they are stored, editor's picks, etc.
>      B) the cake documentation project would have been a great thing to
> outsource to someone this way.
>
> 6. Have a "Cake bug fix blitz-day" once a month, where all developers are
> encouraged to take one bug and fix it.
>
> The above are only a small sample of things one can (should) do. I'm sure
> people can come up with many more ideas to help.
>
> Please don't attack me for saying this stuff. I am on your side. I want to
>

Re: thumbnail generator

2011-04-09 Thread Chris
This video on cake TV worked for me fyi. I tried just about every
single image upload I could find. This tutorial is the only one I
found that worked perfectly for me without too much effort
(disclaimer: I'm am still very much a beginner so that is probably why
those other's never worked for me)

http://tv.cakephp.org/video/jasonwydro/2011/01/29/cakephp_1_3_-_meio_image_upload_resize_gallery_tutorial

On Apr 8, 10:51 pm, "Krissy Masters" 
wrote:
> I usually resize the uploaded file to a manageable size but no crop, full
> image so the user never loses anything, Then allow them to crop the part
> they want which crates 2 images used in the site, the thumb and the large
> size image. In total upload 1 but end up with 3 (original version of
> uploaded file, 1 thumb and 1 "large" for use on the site)
>
> Also as cricket mentions all data is saved to the db, (name x,y,w,h)
>
> Just to give you an idea but every case is different and may require
> different sizes, number of version, and there are plenty of options on
> things you can do with images dynamically thru functions.
>
> K
>
>
>
>
>
>
>
> -Original Message-
> From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
>
> Of cricket
> Sent: Friday, April 08, 2011 11:38 PM
> To: cake-php@googlegroups.com
> Subject: Re: thumbnail generator
>
> On Fri, Apr 8, 2011 at 9:47 PM, Krissy Masters
>  wrote:
> > I would say on upload you make the sizes needed once. Why constantly
> resize
> > for each page load or on initial view / load check to see if its been
> > created if not create it. But as for performance I have no proof to say
> > which is better.
>
> I agree with you both. Libs like phpThumb do offer caching but I I
> usually offer to let the user crop the thumb themselves, so it may not
> be a reduced version of the image but offset, as well. Also, I
> normally save the thumbnail info in the DB anyway.
>
> --
> Our newest site for the community: CakePHP Video 
> Tutorialshttp://tv.cakephp.org
> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> others with their CakePHP related questions.
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: minimum memory for cake 1.3

2011-04-09 Thread Andras Kende
Hello,

8MB is not much nowadays, php 5.3 is default setting is 128MB..
Probably 32-64 should be fine for a simpler app...

You could Install debug_kit to see memory usage:
https://github.com/cakephp/debug_kit#readme

also in queries make sure to use fields and correct associations to only pull
data out from database which is needed...

Andras Kende
http://www.kende.com


On Apr 9, 2011, at 10:24 AM, Miloš Vučinić wrote:

> Hi guys,
> 
> I made a project for my faculty , a temporary web site which collects
> answers to one poll in cake php 1.3. It runs ok, but when I log into
> cake admin, I get error that I have reached my 8mb memory limit.
> 
> having in mind that I did not use much resources , and that in total
> with auth component I have 10 tables I guess i couldn't made much
> mess. Everything was baked, and just a few things I added nothing
> special..
> 
> So , I read that 8 mb for cake is not so much. What is some regular
> sized minimum to run app with cake, and how can I measure project
> memory usage in apache in my local machine ?
> 
> Thanks, all the best !
> Milos
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: naming Model

2011-04-09 Thread Miloš Vučinić
Just a quick question. Why did you have problems with bake ?

I used to have one odd problem , so I'll just say it in case it is. I
used cake bake all but it never worked (I am curently using windows).
No matter how I set databasem it failed all the time.. So once I saw
this post and said that in windows you need to give the -app and in "
path to the app folder"

example : cake bake all -app "c:\xampp\htdocs\project1\app"

Try this in any case. Trust me, when you are a beginer, this will save
your life :)

All the best,
Milos Vucinic

On Apr 9, 9:44 am, euromark  wrote:
> well, you can always override the default behavior
> I - for example - have a contact model as well as a contact controller
> because it would make no sense to call it "contacts" :)
>
> the conventions are useful for most cases, in same you can easily
> adjust the classes manually
> to get the desired result (even with some pluralization problems -
> this can even happen in English itself).
>
> On 9 Apr., 02:46, Benno  wrote:
>
> > Imagine your native language, say, Japanese, doesn't inflect for
> > pluralization. Now imagine you're using a framework that does. While
> > I'm not going to suggest that 5 months is now reasonable for getting
> > some basic functionality going, it seems totally reasonable to me that
> > 5 months later you still don't understand intuitively why some things
> > are singular and some things are plural.
>
> > On Apr 9, 8:18 am, euromark  wrote:
>
> > > seriously? you have been using cake for 5 months now?
> > > you did not yet get the console working or understood the most basic
> > > principles as outlined in the cookbook?
> > > ähm.. i am speechless
>
> > > On 9 Apr., 02:08, cricket  wrote:
>
> > > > On Fri, Apr 8, 2011 at 7:55 PM, cake-learner  
> > > > wrote:
> > > > > I have following Controller and Model set up manually since the baker
> > > > > is not so easy to use.
> > > > > But somehow I can't get to work. First of all, about the class name, I
> > > > > am not sure why they want to use singular for model and plural for
> > > > > controller
>
> > > > A model represents a single entity. So, singular. A controller handles
> > > > collections of entities (in a sense). So, plural.
>
> > > > > and small letters for routes.php. It's been nightmare with cakephp
> > > > > project for last 5 months.
>
> > > > > class TemplatesController extends AppController {
> > > > >  $name = "Templates";
> > > > >  function index(){
> > > > >  }
> > > > > }
>
> > > > If you're using PHP 5.x you can leave out $name here.
>
> > > > > class Template extends exends Model{
> > > > >  $name = "Template";
> > > > > }
>
> > > > Typo? And it's AppModel.
>
> > > > class Template extends AppModel
>
> > > > Ditto about $name here.
>
> > > > > Router::connect('/template_page/:id',array('controller'=>templates',
> > > > > 'action' => 'index',  'client'=>$domains[0]) );
>
> > > > I don't understand what $domains is so no comment.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread Miloš Vučinić
check your .htaccess file. I had an issue where nothing worked,
because cake couldn't find css. In this file you specify the path to
webroot and app dir amoung other thigs yo ucan do there.

For exaple mine is :

   RewriteEngine on
   RewriteRule^$ app/webroot/[L]
   RewriteRule(.*) app/webroot/$1 [L]


but this is in windows, so you'll probably need to change it..


On Apr 9, 12:17 pm, peterhf  wrote:
> My mistake. TEST-dev is the name of the database used with this 
> app.http://localhost/TEST-admin/returns the app.
>
> I put this in the ...app/webroot/.htaccess,restarted -> same problem.
> 
>     RewriteEngine On
>     RewriteCond %{REQUEST_FILENAME} !-d
> dfskjsdsadjfsddfl
>     RewriteCond %{REQUEST_FILENAME} !-f
>     RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
> 
>
> Does this mean that this file is not being read by apache?
>
> Where else could  AllowOverride be set to None?
>
> On Apr 8, 9:31 pm, cricket  wrote:
>
> > On Fri, Apr 8, 2011 at 11:35 PM, peterhf  wrote:
> > >http://localhost/TEST-admin/producesthe first page on the
> > > application, a login page.
>
> > I just noticed that you used TEST-admin but also mentioned a TEST-dev.
> > Could this be it?
>
> > In any case, I posted a reply to someone else this evening about
> > setting up virtual hosts and local subdomains. If you're interested
> > and want more info let me know.
>
> > > debug is set to 2.
>
> > What about this in your layout?
>
> > debug(CSS_URL); debug(JS_URL);
>
> > > AllowOverride was set to 'none', I set it to "All" and restarted the
> > > computer -> problem persists.
>
> > That would have done it. Just to be sure they're being read, type some
> > garbage text on a new line in one of them and refresh. If your server
> > doesn't keel over then AllowOverride is still set to None somewhere.
>
> > Actually, to be really sure, type it in the one inside the webroot
> > dir. Whether your DocumentRoot is TEST-dev, TEST-dev/app, or
> > TEST-dev/app/webroot, the last one should be read (if they're being
> > read at all).

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Strange error passing from windows to linux

2011-04-09 Thread Miloš Vučinić
I just read this so I might say something that has already been said..
The key difference in web programing between windows and linux is that
linux is case sensetive and windows is not. Especialy when it comes to
database. I know that because I had some java project in windows and
lost a whole day to figure out why it doesn't work in Linux.

So you need to check the way you reference to your key in database. If
you use a field with wrong case in Linux such as User.UserFirstName
instead of User.user.firstname you will have a problem.

I would look for that, because you error indicates that you tried to
access field that you do not have, and since your app works in
windows, I gues that most probably your problem is in case sensitivity
in linux.. And I think you can't turn it off, so youll need to check
for every usage of indexes in model..
All the best
Milos

On Apr 9, 11:40 am, "Mariano C."  wrote:
> Wherever I put this debug($this->MyModel::schema()) i get:
> T_PAAMAYIM_NEKUDOTAYIM php error :(
>
> On 8 Apr, 21:23, cricket  wrote:
>
> > On Fri, Apr 8, 2011 at 2:28 PM, Mariano C.  
> > wrote:
> > > I suppose, I've just made a dump
>
> > What is the primary key for the model? Is it id? The error is telling
> > you that the model thinks the PK is id but that the database is saying
> > something else. Put debug($this->YourModel::schema()) somewhere so you
> > can see what the DB source is returning.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread peterhf
My mistake. TEST-dev is the name of the database used with this app.
http://localhost/TEST-admin/ returns the app.

I put this in the ...app/webroot/.htaccess,restarted -> same problem.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
dfskjsdsadjfsddfl
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]


Does this mean that this file is not being read by apache?

Where else could  AllowOverride be set to None?

On Apr 8, 9:31 pm, cricket  wrote:
> On Fri, Apr 8, 2011 at 11:35 PM, peterhf  wrote:
> >http://localhost/TEST-admin/produces the first page on the
> > application, a login page.
>
> I just noticed that you used TEST-admin but also mentioned a TEST-dev.
> Could this be it?
>
> In any case, I posted a reply to someone else this evening about
> setting up virtual hosts and local subdomains. If you're interested
> and want more info let me know.
>
> > debug is set to 2.
>
> What about this in your layout?
>
> debug(CSS_URL); debug(JS_URL);
>
> > AllowOverride was set to 'none', I set it to "All" and restarted the
> > computer -> problem persists.
>
> That would have done it. Just to be sure they're being read, type some
> garbage text on a new line in one of them and refresh. If your server
> doesn't keel over then AllowOverride is still set to None somewhere.
>
> Actually, to be really sure, type it in the one inside the webroot
> dir. Whether your DocumentRoot is TEST-dev, TEST-dev/app, or
> TEST-dev/app/webroot, the last one should be read (if they're being
> read at all).

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Strange error passing from windows to linux

2011-04-09 Thread Mariano C.
Wherever I put this debug($this->MyModel::schema()) i get:
T_PAAMAYIM_NEKUDOTAYIM php error :(

On 8 Apr, 21:23, cricket  wrote:
> On Fri, Apr 8, 2011 at 2:28 PM, Mariano C.  wrote:
> > I suppose, I've just made a dump
>
> What is the primary key for the model? Is it id? The error is telling
> you that the model thinks the PK is id but that the database is saying
> something else. Put debug($this->YourModel::schema()) somewhere so you
> can see what the DB source is returning.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


minimum memory for cake 1.3

2011-04-09 Thread Miloš Vučinić
Hi guys,

I made a project for my faculty , a temporary web site which collects
answers to one poll in cake php 1.3. It runs ok, but when I log into
cake admin, I get error that I have reached my 8mb memory limit.

having in mind that I did not use much resources , and that in total
with auth component I have 10 tables I guess i couldn't made much
mess. Everything was baked, and just a few things I added nothing
special..

So , I read that 8 mb for cake is not so much. What is some regular
sized minimum to run app with cake, and how can I measure project
memory usage in apache in my local machine ?

Thanks, all the best !
Milos

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Reverse lookup of routes

2011-04-09 Thread ThunderTD
Ok. Solved the problem! I had to explicitly name the id-element! Using
the following code to create the link solved the problem:

$html->link(
  'Artist 2',
  array(
'controller' => 'artists',
'action' => 'view',
'id' => 2
  )
)

On Apr 9, 9:31 am, ThunderTD  wrote:
> The language ($this->param['langauge']) ]is already set and I didn't
> explicitly specify it because I don't want it to change will going
> through the page.
>
> On Apr 8, 5:50 am, Ryan Schmidt  wrote:
>
>
>
>
>
>
>
> > On Apr 7, 2011, at 12:42, ThunderTD wrote:
>
> > > I configured my route similar to one example in the CakePHP Book. I
> > > want to reach the ArtistsController's view action via the URL
> > >http://xxx/artists/id. Everything is working fine with the following
> > > Routes entry and this direction:
>
> > > Router::connect('/:language/artists/:id',
> > > array('controller'=>'artists','action'=>'view'), array('pass' =>
> > > array('id'), 'language' => '[a-z]{3}','id' => '[0-9]{1}'));
>
> > > But what about the proper reverse lookup? If I use the HtmlHelper
> > > Function Link in the following way:
>
> > > $html->link('Artist 2', array( 'controller' => 'artists', 'action' =>
> > > 'view', 2 )) ,
>
> > > the link is resolved tohttp://xxx/artists/view/2insteadof the
> > > desiredhttp://xxx/artists/2.
>
> > > Is this the desired behavior?
>
> > It doesn't look like you specified the language in the $html->link 
> > (properly: $this->Html->link) command, and your route does seem to rely on 
> > the language being set. Did you mean to specify it there, or is it being 
> > included by some other means that you didn't show?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: naming Model

2011-04-09 Thread euromark
well, you can always override the default behavior
I - for example - have a contact model as well as a contact controller
because it would make no sense to call it "contacts" :)

the conventions are useful for most cases, in same you can easily
adjust the classes manually
to get the desired result (even with some pluralization problems -
this can even happen in English itself).


On 9 Apr., 02:46, Benno  wrote:
> Imagine your native language, say, Japanese, doesn't inflect for
> pluralization. Now imagine you're using a framework that does. While
> I'm not going to suggest that 5 months is now reasonable for getting
> some basic functionality going, it seems totally reasonable to me that
> 5 months later you still don't understand intuitively why some things
> are singular and some things are plural.
>
> On Apr 9, 8:18 am, euromark  wrote:
>
>
>
>
>
>
>
> > seriously? you have been using cake for 5 months now?
> > you did not yet get the console working or understood the most basic
> > principles as outlined in the cookbook?
> > ähm.. i am speechless
>
> > On 9 Apr., 02:08, cricket  wrote:
>
> > > On Fri, Apr 8, 2011 at 7:55 PM, cake-learner  wrote:
> > > > I have following Controller and Model set up manually since the baker
> > > > is not so easy to use.
> > > > But somehow I can't get to work. First of all, about the class name, I
> > > > am not sure why they want to use singular for model and plural for
> > > > controller
>
> > > A model represents a single entity. So, singular. A controller handles
> > > collections of entities (in a sense). So, plural.
>
> > > > and small letters for routes.php. It's been nightmare with cakephp
> > > > project for last 5 months.
>
> > > > class TemplatesController extends AppController {
> > > >  $name = "Templates";
> > > >  function index(){
> > > >  }
> > > > }
>
> > > If you're using PHP 5.x you can leave out $name here.
>
> > > > class Template extends exends Model{
> > > >  $name = "Template";
> > > > }
>
> > > Typo? And it's AppModel.
>
> > > class Template extends AppModel
>
> > > Ditto about $name here.
>
> > > > Router::connect('/template_page/:id',array('controller'=>templates',
> > > > 'action' => 'index',  'client'=>$domains[0]) );
>
> > > I don't understand what $domains is so no comment.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Reverse lookup of routes

2011-04-09 Thread ThunderTD
The language ($this->param['langauge']) ]is already set and I didn't
explicitly specify it because I don't want it to change will going
through the page.

On Apr 8, 5:50 am, Ryan Schmidt  wrote:
> On Apr 7, 2011, at 12:42, ThunderTD wrote:
>
>
>
>
>
>
>
>
>
> > I configured my route similar to one example in the CakePHP Book. I
> > want to reach the ArtistsController's view action via the URL
> >http://xxx/artists/id. Everything is working fine with the following
> > Routes entry and this direction:
>
> > Router::connect('/:language/artists/:id',
> > array('controller'=>'artists','action'=>'view'), array('pass' =>
> > array('id'), 'language' => '[a-z]{3}','id' => '[0-9]{1}'));
>
> > But what about the proper reverse lookup? If I use the HtmlHelper
> > Function Link in the following way:
>
> > $html->link('Artist 2', array( 'controller' => 'artists', 'action' =>
> > 'view', 2 )) ,
>
> > the link is resolved tohttp://xxx/artists/view/2instead of the
> > desiredhttp://xxx/artists/2.
>
> > Is this the desired behavior?
>
> It doesn't look like you specified the language in the $html->link (properly: 
> $this->Html->link) command, and your route does seem to rely on the language 
> being set. Did you mean to specify it there, or is it being included by some 
> other means that you didn't show?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Reverse lookup of routes

2011-04-09 Thread ThunderTD
The custom route detailed in the CakePHP CookBook is working fine as
long as it's used in one direction. Inside the routes.php file I'm
using the following route:

Router::connect('/:language/artists/:id',
array('controller'=>'artists','action'=>'view'), array('pass' =>
array('id'), 'language' => '[a-z]{3}','id' => '[0-9]{1}')); ,

So I can accesss the View Action of the ArtistsController via
http://xxx/artists/:id .

But what about the reverse lookup. Shouldn't a call to $html-
>link('Artist 2', array( 'controller' => 'artists', 'action' =>
'view', 2)) print out a link to http://xxx/artists/2 ? Instead it
gives a link to http://xxx/artists/view/2.

Is this expected behavior?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php