Re: @Miles J - Uploader

2012-03-09 Thread Miles J
Does the debug() statement appear when doing a model delete?

On Friday, March 9, 2012 9:25:09 PM UTC-8, CrotchFrog wrote:
>
> It's correctly generating the path and works fine when manually deleting 
> with Uploader. 
>
> On Friday, March 9, 2012 1:30:31 PM UTC-5, Miles J wrote:
>>
>> Can you throw some debug($path)'s in Uploader.delete() to see if its 
>> generating the correct absolute path.
>>
>> On Thursday, March 8, 2012 9:38:05 PM UTC-8, CrotchFrog wrote:
>>>
>>> Using Cake 2.1 & Uploader 3.3
>>>
>>> 'Uploader.Attachment' => array(
>>> 'fileName' => array(
>>> 'name' => 'generateFilename', 
>>> 'baseDir' => '', 
>>> 'uploadDir' => 'img/artist', 
>>> 'dbColumn' => 'path',
>>> 'importFrom' => '', 
>>> 'defaultPath' => '', 
>>> 'maxNameLength' => 30, 
>>> 'overwrite' => true, 
>>> 'stopSave' => true, 
>>> 'allowEmpty' => false, 
>>> 'transforms' => array(), 
>>> 's3' => array(), 
>>> 'metaColumns' => array( 
>>> 'ext' => 'ext',
>>> 'type' => 'type',
>>> 'size' => 'size',
>>> 'group' => 'group',
>>> 'width' => '',
>>> 'height' => '',
>>> 'filesize' => 'filesize',
>>> 'name' => 'name'
>>> )
>>> )
>>> )
>>>
>>> public $belongsTo = array(
>>> 
>>> 'Artist' => array(
>>> 'className' => 'Artist',
>>> 'foreignKey' => 'artist_id',
>>> 'conditions' => '',
>>> 'fields' => '',
>>> 'order' => ''
>>> )
>>> );
>>>
>>> - ED 
>>>
>>> On Thursday, March 8, 2012 3:56:50 AM UTC-5, CrotchFrog wrote:

 @Miles, 

 With the newest version of your uploader, when deleting a row from the 
 db the corresponding file should be deleted locally. 

 I have everything else working great except for file deletion. 

 What am I overlooking? 

 Regards, 
 ED 

>>>

-- 
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: @Miles J - Uploader

2012-03-09 Thread CrotchFrog
It's correctly generating the path and works fine when manually deleting 
with Uploader. 

On Friday, March 9, 2012 1:30:31 PM UTC-5, Miles J wrote:
>
> Can you throw some debug($path)'s in Uploader.delete() to see if its 
> generating the correct absolute path.
>
> On Thursday, March 8, 2012 9:38:05 PM UTC-8, CrotchFrog wrote:
>>
>> Using Cake 2.1 & Uploader 3.3
>>
>> 'Uploader.Attachment' => array(
>> 'fileName' => array(
>> 'name' => 'generateFilename', 
>> 'baseDir' => '', 
>> 'uploadDir' => 'img/artist', 
>> 'dbColumn' => 'path',
>> 'importFrom' => '', 
>> 'defaultPath' => '', 
>> 'maxNameLength' => 30, 
>> 'overwrite' => true, 
>> 'stopSave' => true, 
>> 'allowEmpty' => false, 
>> 'transforms' => array(), 
>> 's3' => array(), 
>> 'metaColumns' => array( 
>> 'ext' => 'ext',
>> 'type' => 'type',
>> 'size' => 'size',
>> 'group' => 'group',
>> 'width' => '',
>> 'height' => '',
>> 'filesize' => 'filesize',
>> 'name' => 'name'
>> )
>> )
>> )
>>
>> public $belongsTo = array(
>> 
>> 'Artist' => array(
>> 'className' => 'Artist',
>> 'foreignKey' => 'artist_id',
>> 'conditions' => '',
>> 'fields' => '',
>> 'order' => ''
>> )
>> );
>>
>> - ED 
>>
>> On Thursday, March 8, 2012 3:56:50 AM UTC-5, CrotchFrog wrote:
>>>
>>> @Miles, 
>>>
>>> With the newest version of your uploader, when deleting a row from the 
>>> db the corresponding file should be deleted locally. 
>>>
>>> I have everything else working great except for file deletion. 
>>>
>>> What am I overlooking? 
>>>
>>> Regards, 
>>> ED 
>>>
>>

-- 
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 is NOT able to connect to the database. on FEDORA 16

2012-03-09 Thread andrewperk
Also, by any chance maybe you didn't start xamp?

>From the command line:

sudo /opt/lampp/lampp start

To stop it:

sudo /opt/lampp/lampp stop

Of course if you installed xamp somewhere else you'll need to navigate to 
the appropriate location before starting it. Mine is under /opt/lampp 

Andrew

On Tuesday, March 6, 2012 12:28:26 PM UTC-8, Daniel Carrillo Broeder wrote:
>
> Hi, i'm having lots of problems, i don't know what to do
>
> This is what i did : 
>
> 1.- Installed XAMP 
> 2.- Made a new database (called cake) with phpMyAdmin.
> 2.- Downloaded cakePHP 2.0
> 3.- Bake !
> 4.- Set permissions to tmp directory 
>
> When I requested "localhost" on chrome everything went ok but "Cake is NOT 
> able to connect to the database."
>
> This is my database.php :
>
> public $coffeecake = array(
> 'datasource' => 'Database/Mysql',
> 'persistent' => false,
> 'host' => '127.0.0.1',
> 'login' => 'root',
> 'password' => '',
> 'database' => 'cake',
>);
>
> (localhost does not work)
> I can successfully access my DB with (shell) :"mysql -h 127.0.0.0.1 -u 
> root" and then " USE cake;"
>
> I also tried to modify "php.ini" to add extension=/path/pdo_mysql.so and 
> it showed this "Warning: PHP Startup: Unable to load dynamic library 
> './usr/lib64/php/modules/pdo_mysql.so' - 
> ./usr/lib64/php/modules/pdo_mysql.so: wrong ELF class: ELFCLASS64"
>
> Please I really need help 
>

-- 
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 is NOT able to connect to the database. on FEDORA 16

2012-03-09 Thread andrewperk
I run Linux Mint and I also have xamp installed and to get things
working properly with cake I've had to install a couple of other
packages.

sudo apt-get install php5-cli
sudo apt-get install php5-mysql



On Mar 6, 12:28 pm, Daniel Carrillo Broeder 
wrote:
> Hi, i'm having lots of problems, i don't know what to do
>
> This is what i did :
>
> 1.- Installed XAMP
> 2.- Made a new database (called cake) with phpMyAdmin.
> 2.- Downloaded cakePHP 2.0
> 3.- Bake !
> 4.- Set permissions to tmp directory
>
> When I requested "localhost" on chrome everything went ok but "Cake is NOT
> able to connect to the database."
>
> This is my database.php :
>
>     public $coffeecake = array(
>     'datasource' => 'Database/Mysql',
>     'persistent' => false,
>     'host' => '127.0.0.1',
>     'login' => 'root',
>     'password' => '',
>     'database' => 'cake',
>    );
>
> (localhost does not work)
> I can successfully access my DB with (shell) :"mysql -h 127.0.0.0.1 -u
> root" and then " USE cake;"
>
> I also tried to modify "php.ini" to add extension=/path/pdo_mysql.so and it
> showed this "Warning: PHP Startup: Unable to load dynamic library
> './usr/lib64/php/modules/pdo_mysql.so' -
> ./usr/lib64/php/modules/pdo_mysql.so: wrong ELF class: ELFCLASS64"
>
> Please I really need help 

-- 
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 is NOT able to connect to the database. on FEDORA 16

2012-03-09 Thread Bruno Oliveira
do you tried?

  public $coffeecake = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'cake',
   );

change ip 127.0.0.1 for localhost? can be dns in the pc!

On Fri, Mar 9, 2012 at 4:37 PM, Daniel Carrillo Broeder  wrote:

> It works correctly
>
> Don't know what could cause this problem ...
>
> El martes 6 de marzo de 2012 20:48:18 UTC, cricket escribió:
>
>> Create a simple PHP (not Cake) script to connect to your DB and see if
>> that works.
>>
>> On Tue, Mar 6, 2012 at 3:28 PM, Daniel Carrillo Broeder
>>  wrote:
>> > Hi, i'm having lots of problems, i don't know what to do
>> >
>> > This is what i did :
>> >
>> > 1.- Installed XAMP
>> > 2.- Made a new database (called cake) with phpMyAdmin.
>> > 2.- Downloaded cakePHP 2.0
>> > 3.- Bake !
>> > 4.- Set permissions to tmp directory
>> >
>> > When I requested "localhost" on chrome everything went ok but "Cake is
>> NOT
>> > able to connect to the database."
>> >
>> > This is my database.php :
>> >
>> > public $coffeecake = array(
>> > 'datasource' => 'Database/Mysql',
>> > 'persistent' => false,
>> > 'host' => '127.0.0.1',
>> > 'login' => 'root',
>> > 'password' => '',
>> > 'database' => 'cake',
>> >);
>> >
>> > (localhost does not work)
>> > I can successfully access my DB with (shell) :"mysql -h 127.0.0.0.1 -u
>> root"
>> > and then " USE cake;"
>> >
>> > I also tried to modify "php.ini" to add extension=/path/pdo_mysql.so
>> and it
>> > showed this "Warning: PHP Startup: Unable to load dynamic library
>> > './usr/lib64/php/modules/pdo_**mysql.so' -
>> > ./usr/lib64/php/modules/pdo_**mysql.so: wrong ELF class: ELFCLASS64"
>> >
>> > Please I really need help 
>> >
>> > --
>> > 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+unsubscribe@**googlegroups.comFor
>> >  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
>



-- 
Bruno Oliveira

-- 
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: Undefined controller: Controller!

2012-03-09 Thread luca capra

Is the current loaded page from which the form is loaded and then sent, like
http://domain.net/apples



Il 09/03/2012 16:25, Rodrigo Rodrigues Moyle ha scritto:
When calling with $this->redirect( $this->referer() ), what is the 
result of $this->referer()? --
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: Not Able to ADD or Edit

2012-03-09 Thread jeremyharris
Here are some basic debugging steps but we won't be able to help you until 
you narrow it down a little (is it a PHP error, a problem with your CakePHP 
code, a problem with your database connection?).

Turn on debugging if it is not already: /config/core.php, 
Configure::write('debug', 2)

Make sure all tables are created and your models connect to them.

Check your SQL logs to see if your queries are running. 

Check your /tmp/logs/error.log for PHP errors

On Friday, March 9, 2012 1:16:08 PM UTC-8, kalai wrote:
>
> Hi , 
> I am Using CakePHP 1.3 to develop a directory which contains 5 tables 
> Relational connected. 
>
> i created Edit, Delete, Add functions to each of this Table. 
>
> only one table called "User" do all the functions above. 
>
> in rest of the tables i can't perform add or edit functions. 
>
> so please help me where i have to look to debug.. 
>
> i am struggling with this for a month please help me 
>
> Thanks 
>  Kalai

-- 
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


Not Able to ADD or Edit

2012-03-09 Thread kalai
Hi ,
I am Using CakePHP 1.3 to develop a directory which contains 5 tables
Relational connected.

i created Edit, Delete, Add functions to each of this Table.

only one table called "User" do all the functions above.

in rest of the tables i can't perform add or edit functions.

so please help me where i have to look to debug..

i am struggling with this for a month please help me

Thanks
 Kalai

-- 
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: How to use a session var inside $hasMany condition ?

2012-03-09 Thread heohni
Hi!, did you just read what my answer was?
I tried, but the find statement simply ignores my condition with the 
contain.
Do you know why or what I am doing wrong?


Am Freitag, 9. März 2012 14:30:49 UTC+1 schrieb heohni:
>
> Hi,
>
> I want to use such a association:
>
> var $hasMany = array(
> 'Comment' => array(
> 'className' => 'Comment',
> 'foreignKey' => 'user_id',
> 'conditions' => array('Comment.status' => '1'),
> )
> ); 
>
> can I somehow use my current session value for the condition?
>
> Like
> 'conditions' => array('UEB_FKID_SPR_ID' => 
> CakeSession::read('Config.languageID')) ?
>
> The way I tried I get an error:  *Parse error*: syntax error, unexpected 
> '(', expecting ')'  
>
> Is there somehow another way?
>

-- 
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: How to use a session var inside $hasMany condition ?

2012-03-09 Thread lowpass
On Fri, Mar 9, 2012 at 10:38 AM, heohni
 wrote:
>
> var $hasMany = array(
> 'Uebersetzungen' => array(
> 'className' => 'Uebersetzungen',
> 'foreignKey' => 'UEB_NUMMER',
>      'conditions' => array('UEB_FKID_SPR_ID' => 1) <= this is the place I
> wanted to use my session language ID, which I deleted now for testing of the
> contain stuff
> )
> );
> }

The session key doesn't define the association between the models, it
filters results. Don't put 'conditions' in the $hasMany array. Include
it only at runtime, within the 'contain' array as suggested by
Rodrigo.

-- 
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 is NOT able to connect to the database. on FEDORA 16

2012-03-09 Thread Daniel Carrillo Broeder
It works correctly

Don't know what could cause this problem ...

El martes 6 de marzo de 2012 20:48:18 UTC, cricket escribió:
>
> Create a simple PHP (not Cake) script to connect to your DB and see if
> that works.
>
> On Tue, Mar 6, 2012 at 3:28 PM, Daniel Carrillo Broeder
>  wrote:
> > Hi, i'm having lots of problems, i don't know what to do
> >
> > This is what i did :
> >
> > 1.- Installed XAMP
> > 2.- Made a new database (called cake) with phpMyAdmin.
> > 2.- Downloaded cakePHP 2.0
> > 3.- Bake !
> > 4.- Set permissions to tmp directory
> >
> > When I requested "localhost" on chrome everything went ok but "Cake is 
> NOT
> > able to connect to the database."
> >
> > This is my database.php :
> >
> > public $coffeecake = array(
> > 'datasource' => 'Database/Mysql',
> > 'persistent' => false,
> > 'host' => '127.0.0.1',
> > 'login' => 'root',
> > 'password' => '',
> > 'database' => 'cake',
> >);
> >
> > (localhost does not work)
> > I can successfully access my DB with (shell) :"mysql -h 127.0.0.0.1 -u 
> root"
> > and then " USE cake;"
> >
> > I also tried to modify "php.ini" to add extension=/path/pdo_mysql.so and 
> it
> > showed this "Warning: PHP Startup: Unable to load dynamic library
> > './usr/lib64/php/modules/pdo_mysql.so' -
> > ./usr/lib64/php/modules/pdo_mysql.so: wrong ELF class: ELFCLASS64"
> >
> > Please I really need help 
> >
> > --
> > 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: Failed Deployment

2012-03-09 Thread lowpass
On Fri, Mar 9, 2012 at 2:00 AM, luca capra  wrote:
> I'd look at tmp/logs/error.log, many hosting provider doesn't report errors
> on screen.

Also the webserver's logs, if you have access.

-- 
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 PHP (Bug even still exists in cake php2)

2012-03-09 Thread lowpass
On Thu, Mar 8, 2012 at 4:14 PM, Miles J  wrote:
> I don't quite understand OP.

I don't think OP quite understands.

Tip of the hat to Dave D for parsing that, btw. I think this would
have bothered me for days.

-- 
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: Conection Time Out with CakeEmail()

2012-03-09 Thread murciano
I was looking for something else when I came to this post but I think I 
have an idea. for the \\app\Config\email.php  the code should be :

class EmailConfig 
{

public $smtp = array( 

'transport' => 'Smtp', 
'from' => array('my...@mydomain.com' => 'My Name), 
'host' => 'mail.mydomain.com', 
'port' => 26, 
'timeout' => 30, 
'username' => 'my_username', 
'password' => 'my_password', 
'client' => null, 
'log' => false 
//'charset' => 'utf-8', 
//'headerCharset' => 'utf-8', 
);
} 


Also from is mandatory and I do not know if we can put it directly into 
smtp config??? test to put it into your controller.

-- 
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 2.1 pagination routing (Help)

2012-03-09 Thread lowpass
On Thu, Mar 8, 2012 at 2:00 AM, mikeottinger  wrote:
> Just came across this issue myself. Is this a bug? Without the beforeFilter
> change, my pagination links would never change, they'd always stay at 1.

It's just a reflection of some changes that were made in 2.x. I
wouldn't say it's a bug. Maybe an oversight.

-- 
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: @Miles J - Uploader

2012-03-09 Thread Miles J
Can you throw some debug($path)'s in Uploader.delete() to see if its 
generating the correct absolute path.

On Thursday, March 8, 2012 9:38:05 PM UTC-8, CrotchFrog wrote:
>
> Using Cake 2.1 & Uploader 3.3
>
> 'Uploader.Attachment' => array(
> 'fileName' => array(
> 'name' => 'generateFilename', 
> 'baseDir' => '', 
> 'uploadDir' => 'img/artist', 
> 'dbColumn' => 'path',
> 'importFrom' => '', 
> 'defaultPath' => '', 
> 'maxNameLength' => 30, 
> 'overwrite' => true, 
> 'stopSave' => true, 
> 'allowEmpty' => false, 
> 'transforms' => array(), 
> 's3' => array(), 
> 'metaColumns' => array( 
> 'ext' => 'ext',
> 'type' => 'type',
> 'size' => 'size',
> 'group' => 'group',
> 'width' => '',
> 'height' => '',
> 'filesize' => 'filesize',
> 'name' => 'name'
> )
> )
> )
>
> public $belongsTo = array(
> 
> 'Artist' => array(
> 'className' => 'Artist',
> 'foreignKey' => 'artist_id',
> 'conditions' => '',
> 'fields' => '',
> 'order' => ''
> )
> );
>
> - ED 
>
> On Thursday, March 8, 2012 3:56:50 AM UTC-5, CrotchFrog wrote:
>>
>> @Miles, 
>>
>> With the newest version of your uploader, when deleting a row from the db 
>> the corresponding file should be deleted locally. 
>>
>> I have everything else working great except for file deletion. 
>>
>> What am I overlooking? 
>>
>> Regards, 
>> ED 
>>
>

-- 
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: unlink error from FileEngine.php

2012-03-09 Thread heohni
I will try, thanks again!

Am Freitag, 9. März 2012 16:21:16 UTC+1 schrieb heohni:
>
> Hi,
>
> from time to time I get this error message:
>
> *Warning*: 
> unlink(D:\SVN-Homes\...\cache_sql_properties_of_the_week_premium_5) [
> function.unlink ]: 
> Permission denied in *
> D:\SVN-Homes\PHP\trunk\cake2.1\lib\Cake\Cache\Engine\FileEngine.php* on 
> line *247* 
> *
> *
> Cache::config('sql', array(
> 'engine' => 'File',
> 'duration' => '+3 day',
> 'path' => CACHE,
> 'prefix' => 'cache_sql_'
> )); *
> *
>
> What can I do to avoid this Warning message?
> As it seems that is nothing I made a mistake of? This comes from the core 
> files?
> What should I do?
>

-- 
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: How to use a session var inside $hasMany condition ?

2012-03-09 Thread heohni
Hi,

I tried this, but with no effect, no error messae, but the select returns 
all found data without the contain conditions.
Please help me

$results = ClassRegistry::init('Eigenschaftsarten')->find('all', array(
'contain' => array(
'Uebersetzungen' => array(
'fields' => 'UEB_TEXT, UEB_FKID_SPR_ID',
'conditions' => array('UEB_FKID_SPR_ID' => 
CakeSession::read('Config.languageID'))
)
),
'fields' => 'EIA_ID, EIA_UEN_BESCHREIBUNG',
'conditions' => array(
'EIA_ID IN ('.implode(',', $array).')'
)
));

Model  'Eigenschaftsarten' 
class Eigenschaftsarten extends AppModel {
var $name = 'Eigenschaftsarten';
var $useTable = 'Eigenschaftsarten';
var $primaryKey = 'EIA_UEN_BESCHREIBUNG';

var $hasMany = array(
'Uebersetzungen' => array(
'className' => 'Uebersetzungen',
'foreignKey' => 'UEB_NUMMER',
 'conditions' => array('UEB_FKID_SPR_ID' => 1) <= this is the place I 
wanted to use my session language ID, which I deleted now for testing of 
the contain stuff
)
);
}

-- 
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: unlink error from FileEngine.php

2012-03-09 Thread Rodrigo Rodrigues Moyle
Try adding a mask with correct permission to you cache config:

'mask' => 0664

Em sexta-feira, 9 de março de 2012 12h21min16s UTC-3, heohni escreveu:
>
> Hi,
>
> from time to time I get this error message:
>
> *Warning*: 
> unlink(D:\SVN-Homes\...\cache_sql_properties_of_the_week_premium_5) [
> function.unlink ]: 
> Permission denied in *
> D:\SVN-Homes\PHP\trunk\cake2.1\lib\Cake\Cache\Engine\FileEngine.php* on 
> line *247* 
> *
> *
> Cache::config('sql', array(
> 'engine' => 'File',
> 'duration' => '+3 day',
> 'path' => CACHE,
> 'prefix' => 'cache_sql_'
> )); *
> *
>
> What can I do to avoid this Warning message?
> As it seems that is nothing I made a mistake of? This comes from the core 
> files?
> What should I do?
>

-- 
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: How to link to a non cake php page, and where to put it?

2012-03-09 Thread Rodrigo Rodrigues Moyle
If you just need to put a PHP file on your projeto, just put the file on 
webroot folder at app/webroot/pages/SkillsMat/edit_scores.php and your link 
will work correctly.

-- 
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: Model::updateCounterCache() bug?

2012-03-09 Thread Rodrigo Rodrigues Moyle
Please, show you table schema and model association setup.

-- 
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: Undefined controller: Controller!

2012-03-09 Thread Rodrigo Rodrigues Moyle
When calling with $this->redirect( $this->referer() ), what is the result 
of $this->referer()?

-- 
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 2.x] Session.cookieTimeout won't be Session.timeout by default

2012-03-09 Thread Rodrigo Rodrigues Moyle
Yes, its a bug, report this on lighthouse:

http://cakephp.lighthouseapp.com/

-- 
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


unlink error from FileEngine.php

2012-03-09 Thread heohni
Hi,

from time to time I get this error message:

*Warning*: 
unlink(D:\SVN-Homes\...\cache_sql_properties_of_the_week_premium_5) [
function.unlink ]: 
Permission denied in *
D:\SVN-Homes\PHP\trunk\cake2.1\lib\Cake\Cache\Engine\FileEngine.php* on line
 *247* 
*
*
Cache::config('sql', array(
'engine' => 'File',
'duration' => '+3 day',
'path' => CACHE,
'prefix' => 'cache_sql_'
)); *
*

What can I do to avoid this Warning message?
As it seems that is nothing I made a mistake of? This comes from the core 
files?
What should I do?

-- 
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: How to use a session var inside $hasMany condition ?

2012-03-09 Thread Rodrigo Rodrigues Moyle
Add the ContainableBehavior to your AppModel class, and when using find:

$model->find('all', array(
'contain' => array(
'Comment' => array(
'conditions' => array(
'Comment.UEB_FKID_SPR_ID' => CakeSession::read('Config.languageID'
)
)
)
)))

-- 
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


How to use a session var inside $hasMany condition ?

2012-03-09 Thread heohni
Hi,

I want to use such a association:

var $hasMany = array(
'Comment' => array(
'className' => 'Comment',
'foreignKey' => 'user_id',
'conditions' => array('Comment.status' => '1'),
)
); 

can I somehow use my current session value for the condition?

Like
'conditions' => array('UEB_FKID_SPR_ID' => 
CakeSession::read('Config.languageID')) ?

The way I tried I get an error:  *Parse error*: syntax error, unexpected 
'(', expecting ')'  

Is there somehow another way?

-- 
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


Ampersands in URLs with CakePHP and Apache mod_rewrite

2012-03-09 Thread Alex Bovey
Hi all,

I'm experiencing problems when using ampersands in named parameters (Cake
1.3) which is a well known mod_rewrite problem.

e.g. if I request www.mysite.com/test/search:this%26that

Apache rewrites it to:

webroot/index.php?search:this&that

That means it's not parsed correctly by CakePHP, as the ampersand in the
URL treats the query string as separate name / value pairs.

I don't want to double escape the ampersand as this results in ugly URLs.

Apache introduced a B flag to rewrite rules in version 2.2.7 which solves
the problem but it's shared hosting and they won't upgrade to that.  I also
tried the NE (no escape) rule but that didn't seem to make any difference.

Anyone experienced the same problem and found a good solution?

Thanks,

Alex

-- 
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: Saving without validation

2012-03-09 Thread euromark
the fields to be validated must be present in the data that is passed on to 
the model
otherwise you would need `require=>true` for those rules that should 
trigger even if their fields are not present

I prefer the whitelisting (first approach). but both works.


Am Freitag, 9. März 2012 07:27:30 UTC+1 schrieb alexkd:
>
> Hello all 
> I am using CakePHP 1.3. 
> In my model validation I added wrong field which is not included in my 
> table. Yet the data is saved 
> without showing any error. 
> Here's my model 
> class patient extends AppModel 
> { 
> var $name = 'patients'; 
> var $hasOne = 'Doctors'; 
> var $validate = array( 
> 'login' => array( // The login is not a field in my table 
> 'patients' 
> 'rule' => array('between', 5, 15), 
> 'message' => 'Between 5 to 15 characters' 
> ) 
> ); 
> } 
> Here's my controller 
>  class PatientsController extends AppController { 
> var $helpers = array('Html', 'Form'); 
> var $name = 'patients'; 
> var $components = array('Session'); 
> function index() { 
> $this->set('patients', $this->Patient->find('all')); 
> } 
> function add() { 
> if (!empty($this->data)) { 
> pr($this->data); 
> if ($this->Patient->saveAll($this->data)) { 
> $this->Session->setFlash('Your patient has been 
> saved.'); 
> $this->redirect(array('action' => 'index')); 
> } 
> } 
> } 
> } 
>
> ?> 
>
> The problem is the validates function always return true (although it 
> contains invalid field) 
> What I want is, get an error message when wrong validation is added. 
>
> Thanks and Regards 
>

-- 
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: Override hashing passwords method when loggin in Cake 2.1

2012-03-09 Thread Sergei
Thanks,

but I've created a simple workaround (if you dont want to create a class 
just for this) which looks like this:


public function login() {
  Security::setHash(...method...);
  // disable salt
  
$salt=Configure::read('Security.salt');Configure::write('Security.salt','');
  ...$this->Auth->login()...
  // restore salt
  Configure::write('Security.salt',$salt);
}

-- 
Sergei


On Friday, March 9, 2012 4:30:16 PM UTC+9, majna wrote:
>
> see http://mark-story.com/posts/view/using-bcrypt-for-passwords-in-cakephp
>
> On Friday, March 9, 2012 3:29:23 AM UTC+1, Sergei wrote:
>>
>> Hello,
>>
>> just started to upgrade my app to Cake 2.1 and noticed that my 
>> hashPasswords() method from User model no longer overrides hashing 
>> during login process.
>>
>> Is there other way to override hashing method?
>>
>> Thank you.
>>
>

-- 
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


Saving without validation

2012-03-09 Thread alexkd
Hello all
I am using CakePHP 1.3.
In my model validation I added wrong field which is not included in my
table. Yet the data is saved
without showing any error.
Here's my model
class patient extends AppModel
{
var $name = 'patients';
var $hasOne = 'Doctors';
var $validate = array(
'login' => array( // The login is not a field in my table
'patients'
'rule' => array('between', 5, 15),
'message' => 'Between 5 to 15 characters'
)
);
}
Here's my controller
set('patients', $this->Patient->find('all'));
}
function add() {
if (!empty($this->data)) {
pr($this->data);
if ($this->Patient->saveAll($this->data)) {
$this->Session->setFlash('Your patient has been
saved.');
$this->redirect(array('action' => 'index'));
}
}
}
}

?>

The problem is the validates function always return true (although it
contains invalid field)
What I want is, get an error message when wrong validation is added.

Thanks and Regards

-- 
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: Links in the setFlash

2012-03-09 Thread majna
You can use Router like:
$url = Router::url(array('controller'=>'users', 'action'=>'login'));
$this-Session->setFlash(sprintf('Please login', $url));


On Friday, March 9, 2012 3:47:17 AM UTC+1, Thiago Silva wrote:
>
> Hello, 
>
> I'm trying to insert links in the Session->setFlash method, but it's 
> not working. 
> I've tried to use Html helper in the controller but it crashed. 
> I'm using version 2.1. 
>
> Thanks, 
> Thiago

-- 
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