Re: Problem with linking a pdf at a outside webroot folder

2011-09-29 Thread Greg Skerman
as a hack, couldn't you just create a symlink in the webroot folder to the
pdf folder? :)
i use symlinks inside the folder structure all the time for my
**development** environment.. not sure if its a clever idea in production
though...


On Fri, Sep 30, 2011 at 11:29 AM, Ryan Schmidt
wrote:

> On Sep 28, 2011, at 04:15, heohni wrote:
>
> > I have this structure:
> > controller
> > model
> > pdf <
> > webroot
> >
> > In this pdf folder are my files and I am not able to change this
> > folder location as it gets filled by and external CMS Service.
> >
> > I need now to link to these pdfs and my link outputs me something like
> > that:
> > http://localhost/pdf/8104-3-de.pdf
> >
> > Is there a way through the routes.php or maybe htaccess to get the
> > files properly opened?
>
>
> http://groups.google.com/group/cake-php/browse_thread/thread/d9d85da93ae29088
>
>
>
> --
> 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: I can find() but can't save(), why?

2011-09-29 Thread reynie...@gmail.com
You mean this: http://pastebin.com/6UsGga4k, didn't work either but it die
"Entro" ,what I'm doing wrong? Need the SQLite3 DB specials permissions? I'm
in Win7 x64 with XAMPP.

Ing. Reynier Pérez Mira
Cel: +58 416.921.7406
Correo: reynie...@gmail.com / reynie...@hotmail.com



On Fri, Sep 30, 2011 at 12:06 AM, abhimanyu bv  wrote:

> add this line before save,  $this->Modalidad->create();
>
> Check whether its working or not?
>
> --
> 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: Can't locate the database?

2011-09-29 Thread Ryan Schmidt
I'm actually not sure offhand how to change the database config. Why do you 
want to? Why not just specify your database details in the $default config?

On Sep 29, 2011, at 21:29, Yves S. Garret wrote:

> The tutorial didn't really tell me how to do that.  Actually, I'm not telling 
> Cake anywhere what DB to use.  How and where can I set that?
> 
> On Thu, Sep 29, 2011 at 4:04 PM, Ryan Schmidt wrote:
>> ..so you have a *database* called cake_posts that contains a *table* 
>> called posts?
>> 
>> Also, in your config I see you have chosen not to set up the $default 
>> database config but instead to set up a new config called $cake_posts. Where 
>> are you telling CakePHP that you want it to use the new $cake_posts config 
>> instead of the $default config?

-- 
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: I can find() but can't save(), why?

2011-09-29 Thread abhimanyu bv
add this line before save,  $this->Modalidad->create();

Check whether its working or not?

-- 
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: Can't locate the database?

2011-09-29 Thread Larry E. Masters
Did you read the part about conventions? Where did you see name your table
cake_posts? Try following conventions first then look at moving onto more
advanced things.

-- 
Larry E. Masters


On Thu, Sep 29, 2011 at 9:29 PM, Yves S. Garret
wrote:

> The tutorial didn't really tell me how to do that.  Actually, I'm not
> telling Cake anywhere what DB to use.  How and where can I set that?
>
> On Thu, Sep 29, 2011 at 4:04 PM, Ryan Schmidt 
> wrote:
>
>> ..so you have a *database* called cake_posts that contains a *table*
>> called posts?
>>
>> Also, in your config I see you have chosen not to set up the $default
>> database config but instead to set up a new config called $cake_posts. Where
>> are you telling CakePHP that you want it to use the new $cake_posts config
>> instead of the $default config?
>>
>>
>>
>> On Sep 29, 2011, at 14:02, Yves S. Garret wrote:
>>
>> > Yes.  I called the database cake_posts.  Do I set something up so that
>> it points to that specific db?
>> >
>> > 2011/9/29 Vinícius Moraes de Araújo 
>> > You have the table posts created on your database ?
>> >
>> > Atenciosamente,
>> >
>> > Vinícius Moraes
>> >
>> >
>> > 2011/9/29 Yves S. Garret 
>> > By the way, this is my database.php file:
>> >
>> > > > /**
>> >  * This is core configuration file.
>> >  *
>> >  * Use it to configure core behaviour ofCake.
>> >  *
>> >  * PHP versions 4 and 5
>> >  *
>> >  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
>> >  * Copyright 2005-2011, Cake Software Foundation, Inc. (
>> http://cakefoundation.org)
>> >  *
>> >  * Licensed under The MIT License
>> >  * Redistributions of files must retain the above copyright notice.
>> >  *
>> >  * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (
>> http://cakefoundation.org)
>> >  * @link  http://cakephp.org CakePHP(tm) Project
>> >  * @package   cake
>> >  * @subpackagecake.app.config
>> >  * @since CakePHP(tm) v 0.2.9
>> >  * @license   MIT License (
>> http://www.opensource.org/licenses/mit-license.php)
>> >  */
>> > /**
>> >  * In this file you set up your database connection details.
>> >  *
>> >  * @package   cake
>> >  * @subpackagecake.config
>> >  */
>> > /**
>> >  * Database configuration class.
>> >  * You can specify multiple configurations for production, development
>> and testing.
>> >  *
>> >  * driver => The name of a supported driver; valid options are as
>> follows:
>> >  *mysql - MySQL 4 & 5,
>> >  *mysqli - MySQL 4 & 5 Improved Interface (PHP5 only),
>> >  *sqlite- SQLite (PHP5 only),
>> >  *postgres- PostgreSQL 7 and higher,
>> >  *mssql- Microsoft SQL Server 2000 and higher,
>> >  *db2- IBM DB2, Cloudscape, and Apache Derby (
>> http://php.net/ibm-db2)
>> >  *oracle- Oracle 8 and higher
>> >  *firebird- Firebird/Interbase
>> >  *sybase- Sybase ASE
>> >  *adodb-[drivername]- ADOdb interface wrapper (see below),
>> >  *odbc- ODBC DBO driver
>> >  *
>> >  * You can add custom database drivers (or override existing drivers) by
>> adding the
>> >  * appropriate file to app/models/datasources/dbo.  Drivers should be
>> named 'dbo_x.php',
>> >  * where 'x' is the name of the database.
>> >  *
>> >  * persistent => true / false
>> >  * Determines whether or not the database should use a persistent
>> connection
>> >  *
>> >  * connect =>
>> >  * ADOdb set the connect to one of these
>> >  *(http://phplens.com/adodb/supported.databases.html) and
>> >  *append it '|p' for persistent connection. (mssql|p for example, or
>> just mssql for not persistent)
>> >  * For all other databases, this setting is deprecated.
>> >  *
>> >  * host =>
>> >  * the host you connect to the database.  To add a socket or port
>> number, use 'port' => #
>> >  *
>> >  * prefix =>
>> >  * Uses the given prefix for all the tables in this database.  This
>> setting can be overridden
>> >  * on a per-table basis with the Model::$tablePrefix property.
>> >  *
>> >  * schema =>
>> >  * For Postgres and DB2, specifies which schema you would like to use
>> the tables in. Postgres defaults to
>> >  * 'public', DB2 defaults to empty.
>> >  *
>> >  * encoding =>
>> >  * For MySQL, MySQLi, Postgres and DB2, specifies the character encoding
>> to use when connecting to the
>> >  * database.  Uses database default.
>> >  *
>> >  */
>> > class DATABASE_CONFIG {
>> >
>> > var $default = array(
>> > 'driver' => 'mysqli',
>> > 'persistent' => false,
>> > 'host' => 'localhost',
>> > 'login' => 'root',
>> > 'password' => 'summer11',
>> > 'database' => 'mysql',
>> > 'prefix' => '',
>> > //'encoding' => 'utf8',
>> > );
>> >
>> > var $cake_posts = array(
>> > 'driver' => 'mysqli',
>> > 'persistent' => false,
>> > 'host' => 'localhost',
>> >  

Re: Can't locate the database?

2011-09-29 Thread Yves S. Garret
The tutorial didn't really tell me how to do that.  Actually, I'm not
telling Cake anywhere what DB to use.  How and where can I set that?

On Thu, Sep 29, 2011 at 4:04 PM, Ryan Schmidt wrote:

> ..so you have a *database* called cake_posts that contains a *table*
> called posts?
>
> Also, in your config I see you have chosen not to set up the $default
> database config but instead to set up a new config called $cake_posts. Where
> are you telling CakePHP that you want it to use the new $cake_posts config
> instead of the $default config?
>
>
>
> On Sep 29, 2011, at 14:02, Yves S. Garret wrote:
>
> > Yes.  I called the database cake_posts.  Do I set something up so that it
> points to that specific db?
> >
> > 2011/9/29 Vinícius Moraes de Araújo 
> > You have the table posts created on your database ?
> >
> > Atenciosamente,
> >
> > Vinícius Moraes
> >
> >
> > 2011/9/29 Yves S. Garret 
> > By the way, this is my database.php file:
> >
> >  > /**
> >  * This is core configuration file.
> >  *
> >  * Use it to configure core behaviour ofCake.
> >  *
> >  * PHP versions 4 and 5
> >  *
> >  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
> >  * Copyright 2005-2011, Cake Software Foundation, Inc. (
> http://cakefoundation.org)
> >  *
> >  * Licensed under The MIT License
> >  * Redistributions of files must retain the above copyright notice.
> >  *
> >  * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (
> http://cakefoundation.org)
> >  * @link  http://cakephp.org CakePHP(tm) Project
> >  * @package   cake
> >  * @subpackagecake.app.config
> >  * @since CakePHP(tm) v 0.2.9
> >  * @license   MIT License (
> http://www.opensource.org/licenses/mit-license.php)
> >  */
> > /**
> >  * In this file you set up your database connection details.
> >  *
> >  * @package   cake
> >  * @subpackagecake.config
> >  */
> > /**
> >  * Database configuration class.
> >  * You can specify multiple configurations for production, development
> and testing.
> >  *
> >  * driver => The name of a supported driver; valid options are as
> follows:
> >  *mysql - MySQL 4 & 5,
> >  *mysqli - MySQL 4 & 5 Improved Interface (PHP5 only),
> >  *sqlite- SQLite (PHP5 only),
> >  *postgres- PostgreSQL 7 and higher,
> >  *mssql- Microsoft SQL Server 2000 and higher,
> >  *db2- IBM DB2, Cloudscape, and Apache Derby (
> http://php.net/ibm-db2)
> >  *oracle- Oracle 8 and higher
> >  *firebird- Firebird/Interbase
> >  *sybase- Sybase ASE
> >  *adodb-[drivername]- ADOdb interface wrapper (see below),
> >  *odbc- ODBC DBO driver
> >  *
> >  * You can add custom database drivers (or override existing drivers) by
> adding the
> >  * appropriate file to app/models/datasources/dbo.  Drivers should be
> named 'dbo_x.php',
> >  * where 'x' is the name of the database.
> >  *
> >  * persistent => true / false
> >  * Determines whether or not the database should use a persistent
> connection
> >  *
> >  * connect =>
> >  * ADOdb set the connect to one of these
> >  *(http://phplens.com/adodb/supported.databases.html) and
> >  *append it '|p' for persistent connection. (mssql|p for example, or
> just mssql for not persistent)
> >  * For all other databases, this setting is deprecated.
> >  *
> >  * host =>
> >  * the host you connect to the database.  To add a socket or port number,
> use 'port' => #
> >  *
> >  * prefix =>
> >  * Uses the given prefix for all the tables in this database.  This
> setting can be overridden
> >  * on a per-table basis with the Model::$tablePrefix property.
> >  *
> >  * schema =>
> >  * For Postgres and DB2, specifies which schema you would like to use the
> tables in. Postgres defaults to
> >  * 'public', DB2 defaults to empty.
> >  *
> >  * encoding =>
> >  * For MySQL, MySQLi, Postgres and DB2, specifies the character encoding
> to use when connecting to the
> >  * database.  Uses database default.
> >  *
> >  */
> > class DATABASE_CONFIG {
> >
> > var $default = array(
> > 'driver' => 'mysqli',
> > 'persistent' => false,
> > 'host' => 'localhost',
> > 'login' => 'root',
> > 'password' => 'summer11',
> > 'database' => 'mysql',
> > 'prefix' => '',
> > //'encoding' => 'utf8',
> > );
> >
> > var $cake_posts = array(
> > 'driver' => 'mysqli',
> > 'persistent' => false,
> > 'host' => 'localhost',
> > 'login' => 'root',
> > 'password' => 'summer11',
> > 'database' => 'cake_posts',
> > 'prefix' => '',
> > //'encoding' => 'utf8',
> > );
> >
> > var $doc_lookup = array(
> > 'driver' => 'mysqli',
> > 'persistent' => false,
> > 'host' => 'localhost',
> > 'login' => 'root',
> > 'password' => 'summer11',
> >

Re: Problem with linking a pdf at a outside webroot folder

2011-09-29 Thread Ryan Schmidt
On Sep 28, 2011, at 04:15, heohni wrote:

> I have this structure:
> controller
> model
> pdf <
> webroot
> 
> In this pdf folder are my files and I am not able to change this
> folder location as it gets filled by and external CMS Service.
> 
> I need now to link to these pdfs and my link outputs me something like
> that:
> http://localhost/pdf/8104-3-de.pdf
> 
> Is there a way through the routes.php or maybe htaccess to get the
> files properly opened?

http://groups.google.com/group/cake-php/browse_thread/thread/d9d85da93ae29088



-- 
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: Errors trying to run a shell in cron

2011-09-29 Thread #2Will
Thanks, but it isn't that the settings are wrong on the folder: the
console is trying to use the wrong folder.



On Sep 29, 5:25 pm, Andras Kende  wrote:
> Try:
>
> chmod -R 777 /home/kindlem1/tmp
>
> On Sep 29, 2011, at 2:01 AM, #2Will wrote:
>
>
>
>
>
>
>
> > Hello.  I made a shell for my app - notify.  It emails people things.
> > Its all working from the command prompt on my mac , but when i try and
> > use it on the stage server through cron, it emails me an error. It
> > seems like cake is looking for things in the wrong place:
>
> > "/home/kindlem1/tmp/cache/persistent/ is not writable"
>
> > which is because the app is in /home/kindlem1/public_html/eeip   - the
> > staging subdomain points to this dir.
>
> > What can i do?
>
> > --error message--
> > Warning: _cake_core_ cache was unable to write 'cake_dev_' to File
> > cache in /home/kindlem1/public_html/eeip/lib/Cake/Cache/Cache.php on
> > line 310
>
> > Warning: /home/kindlem1/tmp/cache/persistent/ is not writable in /home/
> > kindlem1/public_html/eeip/lib/Cake/Cache/Engine/FileEngine.php on line
> > 306
>
> > Warning: /home/kindlem1/tmp/cache/models/ is not writable in /home/
> > kindlem1/public_html/eeip/lib/Cake/Cache/Engine/FileEngine.php on line
> > 306
> > [31;4mWarning Error: [0m _cake_core_ cache was unable to write
> > 'cake_console_' to File cache in [/home/kindlem1/public_html/eeip/lib/
> > Cake/Cache/Cache.php, line 310]
>
> > [31;4mError: [0m Shell file notify could not be loaded.
> > #0 /home/kindlem1/public_html/eeip/lib/Cake/Console/
> > ShellDispatcher.php(166): ShellDispatcher->_getShell('notify')
> > #1 /home/kindlem1/public_html/eeip/lib/Cake/Console/
> > ShellDispatcher.php(69): ShellDispatcher->dispatch()
> > #2 /home/kindlem1/public_html/eeip/app/Console/cake.php(24):
> > ShellDispatcher::run(Array)
> > #3 {main}
>
> > --
> > 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: uploading large file fails

2011-09-29 Thread aortizhi
I already have changed the default max to 800M and still don't work

On Sep 29, 3:06 pm, Ryan Schmidt  wrote:
> On Sep 29, 2011, at 15:01, aortizhi wrote:
>
> > When i select a file that
> > is not that big, it uploads ok, but when i am trying to upload a file
> > that is at least 58 MB it fails uploading and the file won't be the
> > same at server side.
>
> http://php.net/upload-max-filesize
>
> The default max is 2MB in PHP 5.3.8.

-- 
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: Can't locate the database?

2011-09-29 Thread Ryan Schmidt
..so you have a *database* called cake_posts that contains a *table* called 
posts?

Also, in your config I see you have chosen not to set up the $default database 
config but instead to set up a new config called $cake_posts. Where are you 
telling CakePHP that you want it to use the new $cake_posts config instead of 
the $default config?



On Sep 29, 2011, at 14:02, Yves S. Garret wrote:

> Yes.  I called the database cake_posts.  Do I set something up so that it 
> points to that specific db?
> 
> 2011/9/29 Vinícius Moraes de Araújo 
> You have the table posts created on your database ?
> 
> Atenciosamente,
> 
> Vinícius Moraes
> 
> 
> 2011/9/29 Yves S. Garret 
> By the way, this is my database.php file:
> 
>  /**
>  * This is core configuration file.
>  *
>  * Use it to configure core behaviour ofCake.
>  *
>  * PHP versions 4 and 5
>  *
>  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
>  * Copyright 2005-2011, Cake Software Foundation, Inc. 
> (http://cakefoundation.org)
>  *
>  * Licensed under The MIT License
>  * Redistributions of files must retain the above copyright notice.
>  *
>  * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. 
> (http://cakefoundation.org)
>  * @link  http://cakephp.org CakePHP(tm) Project
>  * @package   cake
>  * @subpackagecake.app.config
>  * @since CakePHP(tm) v 0.2.9
>  * @license   MIT License 
> (http://www.opensource.org/licenses/mit-license.php)
>  */
> /**
>  * In this file you set up your database connection details.
>  *
>  * @package   cake
>  * @subpackagecake.config
>  */
> /**
>  * Database configuration class.
>  * You can specify multiple configurations for production, development and 
> testing.
>  *
>  * driver => The name of a supported driver; valid options are as follows:
>  *mysql - MySQL 4 & 5,
>  *mysqli - MySQL 4 & 5 Improved Interface (PHP5 only),
>  *sqlite- SQLite (PHP5 only),
>  *postgres- PostgreSQL 7 and higher,
>  *mssql- Microsoft SQL Server 2000 and higher,
>  *db2- IBM DB2, Cloudscape, and Apache Derby 
> (http://php.net/ibm-db2)
>  *oracle- Oracle 8 and higher
>  *firebird- Firebird/Interbase
>  *sybase- Sybase ASE
>  *adodb-[drivername]- ADOdb interface wrapper (see below),
>  *odbc- ODBC DBO driver
>  *
>  * You can add custom database drivers (or override existing drivers) by 
> adding the
>  * appropriate file to app/models/datasources/dbo.  Drivers should be named 
> 'dbo_x.php',
>  * where 'x' is the name of the database.
>  *
>  * persistent => true / false
>  * Determines whether or not the database should use a persistent connection
>  *
>  * connect =>
>  * ADOdb set the connect to one of these
>  *(http://phplens.com/adodb/supported.databases.html) and
>  *append it '|p' for persistent connection. (mssql|p for example, or just 
> mssql for not persistent)
>  * For all other databases, this setting is deprecated.
>  *
>  * host =>
>  * the host you connect to the database.  To add a socket or port number, use 
> 'port' => #
>  *
>  * prefix =>
>  * Uses the given prefix for all the tables in this database.  This setting 
> can be overridden
>  * on a per-table basis with the Model::$tablePrefix property.
>  *
>  * schema =>
>  * For Postgres and DB2, specifies which schema you would like to use the 
> tables in. Postgres defaults to
>  * 'public', DB2 defaults to empty.
>  *
>  * encoding =>
>  * For MySQL, MySQLi, Postgres and DB2, specifies the character encoding to 
> use when connecting to the
>  * database.  Uses database default.
>  *
>  */
> class DATABASE_CONFIG {
> 
> var $default = array(
> 'driver' => 'mysqli',
> 'persistent' => false,
> 'host' => 'localhost',
> 'login' => 'root',
> 'password' => 'summer11',
> 'database' => 'mysql',
> 'prefix' => '',
> //'encoding' => 'utf8',
> );
> 
> var $cake_posts = array(
> 'driver' => 'mysqli',
> 'persistent' => false,
> 'host' => 'localhost',
> 'login' => 'root',
> 'password' => 'summer11',
> 'database' => 'cake_posts',
> 'prefix' => '',
> //'encoding' => 'utf8',
> );
> 
> var $doc_lookup = array(
> 'driver' => 'mysqli',
> 'persistent' => false,
> 'host' => 'localhost',
> 'login' => 'root',
> 'password' => 'summer11',
> 'database' => 'doc_lookup',
> 'prefix' => '',
> //'encoding' => 'utf8',
> );
> 
> var $test = array(
> 'driver' => 'mysql',
> 'persistent' => false,
> 'host' => 'localhost',
> 'login' => 'user',
> 'password' => 'password',
> 'database' => 'test_database_name',
> 'prefix' => '',
> //'encoding' => 'utf8',
> );
> }

-- 
Our newes

Re: uploading large file fails

2011-09-29 Thread aortizhi
i already have changed to post_max_size=800M and upload_max_filesize =
800M, and still don't work, am i doing something wrong?
On Sep 29, 3:06 pm, Ryan Schmidt  wrote:
> On Sep 29, 2011, at 15:01, aortizhi wrote:
>
> > When i select a file that
> > is not that big, it uploads ok, but when i am trying to upload a file
> > that is at least 58 MB it fails uploading and the file won't be the
> > same at server side.
>
> http://php.net/upload-max-filesize
>
> The default max is 2MB in PHP 5.3.8.

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


uploading large file fails

2011-09-29 Thread aortizhi
Hi people. I have a problem trying to upload a file to my webserver,
here's what i'm doing:

my view:






my controller:

function beforeFilter() {
parent::beforeFilter();
$this->FileUpload->fileModel = null;  //Upload by default.
$this->FileUpload->allowedTypes = 
array('image/jpeg','text/plain');
$this->FileUpload->uploadDir = '../archivos_subidos/';
 }

i have this component called "file_upload". When i select a file that
is not that big, it uploads ok, but when i am trying to upload a file
that is at least 58 MB it fails uploading and the file won't be the
same at server side. Can anyone help me?. Thanks a lot.

-- 
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: uploading large file fails

2011-09-29 Thread Ryan Schmidt

On Sep 29, 2011, at 15:01, aortizhi wrote:

> When i select a file that
> is not that big, it uploads ok, but when i am trying to upload a file
> that is at least 58 MB it fails uploading and the file won't be the
> same at server side.

http://php.net/upload-max-filesize

The default max is 2MB in PHP 5.3.8.


-- 
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: Can't locate the database?

2011-09-29 Thread Yves S. Garret
Yes.  I called the database cake_posts.  Do I set something up so that it
points to that specific db?

2011/9/29 Vinícius Moraes de Araújo 

> You have the table posts created on your database ?
>
> Atenciosamente,
>
> Vinícius Moraes
>
>
> 2011/9/29 Yves S. Garret 
>
>> By the way, this is my database.php file:
>>
>> > /**
>>  * This is core configuration file.
>>  *
>>  * Use it to configure core behaviour ofCake.
>>  *
>>  * PHP versions 4 and 5
>>  *
>>  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
>>  * Copyright 2005-2011, Cake Software Foundation, Inc. (
>> http://cakefoundation.org)
>>  *
>>  * Licensed under The MIT License
>>  * Redistributions of files must retain the above copyright notice.
>>  *
>>  * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (
>> http://cakefoundation.org)
>>  * @link  http://cakephp.org CakePHP(tm) Project
>>  * @package   cake
>>  * @subpackagecake.app.config
>>  * @since CakePHP(tm) v 0.2.9
>>  * @license   MIT License (
>> http://www.opensource.org/licenses/mit-license.php)
>>  */
>> /**
>>  * In this file you set up your database connection details.
>>  *
>>  * @package   cake
>>  * @subpackagecake.config
>>  */
>> /**
>>  * Database configuration class.
>>  * You can specify multiple configurations for production, development and
>> testing.
>>  *
>>  * driver => The name of a supported driver; valid options are as follows:
>>  *mysql - MySQL 4 & 5,
>>  *mysqli - MySQL 4 & 5 Improved Interface (PHP5 only),
>>  *sqlite- SQLite (PHP5 only),
>>  *postgres- PostgreSQL 7 and higher,
>>  *mssql- Microsoft SQL Server 2000 and higher,
>>  *db2- IBM DB2, Cloudscape, and Apache Derby (
>> http://php.net/ibm-db2)
>>  *oracle- Oracle 8 and higher
>>  *firebird- Firebird/Interbase
>>  *sybase- Sybase ASE
>>  *adodb-[drivername]- ADOdb interface wrapper (see below),
>>  *odbc- ODBC DBO driver
>>  *
>>  * You can add custom database drivers (or override existing drivers) by
>> adding the
>>  * appropriate file to app/models/datasources/dbo.  Drivers should be
>> named 'dbo_x.php',
>>  * where 'x' is the name of the database.
>>  *
>>  * persistent => true / false
>>  * Determines whether or not the database should use a persistent
>> connection
>>  *
>>  * connect =>
>>  * ADOdb set the connect to one of these
>>  *(http://phplens.com/adodb/supported.databases.html) and
>>  *append it '|p' for persistent connection. (mssql|p for example, or
>> just mssql for not persistent)
>>  * For all other databases, this setting is deprecated.
>>  *
>>  * host =>
>>  * the host you connect to the database.  To add a socket or port number,
>> use 'port' => #
>>  *
>>  * prefix =>
>>  * Uses the given prefix for all the tables in this database.  This
>> setting can be overridden
>>  * on a per-table basis with the Model::$tablePrefix property.
>>  *
>>  * schema =>
>>  * For Postgres and DB2, specifies which schema you would like to use the
>> tables in. Postgres defaults to
>>  * 'public', DB2 defaults to empty.
>>  *
>>  * encoding =>
>>  * For MySQL, MySQLi, Postgres and DB2, specifies the character encoding
>> to use when connecting to the
>>  * database.  Uses database default.
>>  *
>>  */
>> class DATABASE_CONFIG {
>>
>> var $default = array(
>> 'driver' => 'mysqli',
>> 'persistent' => false,
>> 'host' => 'localhost',
>> 'login' => 'root',
>> 'password' => 'summer11',
>> 'database' => 'mysql',
>> 'prefix' => '',
>> //'encoding' => 'utf8',
>> );
>>
>> var $cake_posts = array(
>> 'driver' => 'mysqli',
>> 'persistent' => false,
>> 'host' => 'localhost',
>> 'login' => 'root',
>> 'password' => 'summer11',
>> 'database' => 'cake_posts',
>> 'prefix' => '',
>> //'encoding' => 'utf8',
>> );
>>
>> var $doc_lookup = array(
>> 'driver' => 'mysqli',
>> 'persistent' => false,
>> 'host' => 'localhost',
>> 'login' => 'root',
>> 'password' => 'summer11',
>> 'database' => 'doc_lookup',
>> 'prefix' => '',
>> //'encoding' => 'utf8',
>> );
>>
>> var $test = array(
>> 'driver' => 'mysql',
>> 'persistent' => false,
>> 'host' => 'localhost',
>> 'login' => 'user',
>> 'password' => 'password',
>> 'database' => 'test_database_name',
>> 'prefix' => '',
>> //'encoding' => 'utf8',
>> );
>> }
>>
>>
>> -- Forwarded message --
>> From: Yves S. Garret 
>> Date: Thu, Sep 29, 2011 at 2:02 PM
>> Subject: Can't locate the database?
>> To: cake-php@googlegroups.com
>>
>>
>> I got to the following portion of the tutorial:
>>
>> http://book.cakephp.org/view/1538/Data-Validation
>>

Re: Doubt in autocomplete jquery

2011-09-29 Thread Sathia S
Hi,

Thank you for your reply.

>
> [{"id":1,"value":"villivakkam","label":"villivakkam", }]
>

I tried this too . even now i cannot view list.


Regards

sathia
http://www.sathia27.wordpress.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


Re: Can't locate the database?

2011-09-29 Thread Vinícius Moraes de Araújo
You have the table posts created on your database ?

Atenciosamente,

Vinícius Moraes


2011/9/29 Yves S. Garret 

> By the way, this is my database.php file:
>
>  /**
>  * This is core configuration file.
>  *
>  * Use it to configure core behaviour ofCake.
>  *
>  * PHP versions 4 and 5
>  *
>  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
>  * Copyright 2005-2011, Cake Software Foundation, Inc. (
> http://cakefoundation.org)
>  *
>  * Licensed under The MIT License
>  * Redistributions of files must retain the above copyright notice.
>  *
>  * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (
> http://cakefoundation.org)
>  * @link  http://cakephp.org CakePHP(tm) Project
>  * @package   cake
>  * @subpackagecake.app.config
>  * @since CakePHP(tm) v 0.2.9
>  * @license   MIT License (
> http://www.opensource.org/licenses/mit-license.php)
>  */
> /**
>  * In this file you set up your database connection details.
>  *
>  * @package   cake
>  * @subpackagecake.config
>  */
> /**
>  * Database configuration class.
>  * You can specify multiple configurations for production, development and
> testing.
>  *
>  * driver => The name of a supported driver; valid options are as follows:
>  *mysql - MySQL 4 & 5,
>  *mysqli - MySQL 4 & 5 Improved Interface (PHP5 only),
>  *sqlite- SQLite (PHP5 only),
>  *postgres- PostgreSQL 7 and higher,
>  *mssql- Microsoft SQL Server 2000 and higher,
>  *db2- IBM DB2, Cloudscape, and Apache Derby (
> http://php.net/ibm-db2)
>  *oracle- Oracle 8 and higher
>  *firebird- Firebird/Interbase
>  *sybase- Sybase ASE
>  *adodb-[drivername]- ADOdb interface wrapper (see below),
>  *odbc- ODBC DBO driver
>  *
>  * You can add custom database drivers (or override existing drivers) by
> adding the
>  * appropriate file to app/models/datasources/dbo.  Drivers should be named
> 'dbo_x.php',
>  * where 'x' is the name of the database.
>  *
>  * persistent => true / false
>  * Determines whether or not the database should use a persistent
> connection
>  *
>  * connect =>
>  * ADOdb set the connect to one of these
>  *(http://phplens.com/adodb/supported.databases.html) and
>  *append it '|p' for persistent connection. (mssql|p for example, or
> just mssql for not persistent)
>  * For all other databases, this setting is deprecated.
>  *
>  * host =>
>  * the host you connect to the database.  To add a socket or port number,
> use 'port' => #
>  *
>  * prefix =>
>  * Uses the given prefix for all the tables in this database.  This setting
> can be overridden
>  * on a per-table basis with the Model::$tablePrefix property.
>  *
>  * schema =>
>  * For Postgres and DB2, specifies which schema you would like to use the
> tables in. Postgres defaults to
>  * 'public', DB2 defaults to empty.
>  *
>  * encoding =>
>  * For MySQL, MySQLi, Postgres and DB2, specifies the character encoding to
> use when connecting to the
>  * database.  Uses database default.
>  *
>  */
> class DATABASE_CONFIG {
>
> var $default = array(
> 'driver' => 'mysqli',
> 'persistent' => false,
> 'host' => 'localhost',
> 'login' => 'root',
> 'password' => 'summer11',
> 'database' => 'mysql',
> 'prefix' => '',
> //'encoding' => 'utf8',
> );
>
> var $cake_posts = array(
> 'driver' => 'mysqli',
> 'persistent' => false,
> 'host' => 'localhost',
> 'login' => 'root',
> 'password' => 'summer11',
> 'database' => 'cake_posts',
> 'prefix' => '',
> //'encoding' => 'utf8',
> );
>
> var $doc_lookup = array(
> 'driver' => 'mysqli',
> 'persistent' => false,
> 'host' => 'localhost',
> 'login' => 'root',
> 'password' => 'summer11',
> 'database' => 'doc_lookup',
> 'prefix' => '',
> //'encoding' => 'utf8',
> );
>
> var $test = array(
> 'driver' => 'mysql',
> 'persistent' => false,
> 'host' => 'localhost',
> 'login' => 'user',
> 'password' => 'password',
> 'database' => 'test_database_name',
> 'prefix' => '',
> //'encoding' => 'utf8',
> );
> }
>
>
> -- Forwarded message --
> From: Yves S. Garret 
> Date: Thu, Sep 29, 2011 at 2:02 PM
> Subject: Can't locate the database?
> To: cake-php@googlegroups.com
>
>
> I got to the following portion of the tutorial:
>
> http://book.cakephp.org/view/1538/Data-Validation
>
> At the very end of the tutorial I have the impression that I can proceed to
> view at least some fruits of my labor.  However, when I went to:
>
> http://localhost/cakery/posts/index
>
> Cakery being where Cake resides, I get the following error... why?
>
> Missing Database Table
>
> *Error: *Datab

Can't locate the database?

2011-09-29 Thread Yves S. Garret
By the way, this is my database.php file:

http://cakephp.org)
 * Copyright 2005-2011, Cake Software Foundation, Inc. (
http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (
http://cakefoundation.org)
 * @link  http://cakephp.org CakePHP(tm) Project
 * @package   cake
 * @subpackagecake.app.config
 * @since CakePHP(tm) v 0.2.9
 * @license   MIT License (
http://www.opensource.org/licenses/mit-license.php)
 */
/**
 * In this file you set up your database connection details.
 *
 * @package   cake
 * @subpackagecake.config
 */
/**
 * Database configuration class.
 * You can specify multiple configurations for production, development and
testing.
 *
 * driver => The name of a supported driver; valid options are as follows:
 *mysql - MySQL 4 & 5,
 *mysqli - MySQL 4 & 5 Improved Interface (PHP5 only),
 *sqlite- SQLite (PHP5 only),
 *postgres- PostgreSQL 7 and higher,
 *mssql- Microsoft SQL Server 2000 and higher,
 *db2- IBM DB2, Cloudscape, and Apache Derby (
http://php.net/ibm-db2)
 *oracle- Oracle 8 and higher
 *firebird- Firebird/Interbase
 *sybase- Sybase ASE
 *adodb-[drivername]- ADOdb interface wrapper (see below),
 *odbc- ODBC DBO driver
 *
 * You can add custom database drivers (or override existing drivers) by
adding the
 * appropriate file to app/models/datasources/dbo.  Drivers should be named
'dbo_x.php',
 * where 'x' is the name of the database.
 *
 * persistent => true / false
 * Determines whether or not the database should use a persistent connection
 *
 * connect =>
 * ADOdb set the connect to one of these
 *(http://phplens.com/adodb/supported.databases.html) and
 *append it '|p' for persistent connection. (mssql|p for example, or
just mssql for not persistent)
 * For all other databases, this setting is deprecated.
 *
 * host =>
 * the host you connect to the database.  To add a socket or port number,
use 'port' => #
 *
 * prefix =>
 * Uses the given prefix for all the tables in this database.  This setting
can be overridden
 * on a per-table basis with the Model::$tablePrefix property.
 *
 * schema =>
 * For Postgres and DB2, specifies which schema you would like to use the
tables in. Postgres defaults to
 * 'public', DB2 defaults to empty.
 *
 * encoding =>
 * For MySQL, MySQLi, Postgres and DB2, specifies the character encoding to
use when connecting to the
 * database.  Uses database default.
 *
 */
class DATABASE_CONFIG {

var $default = array(
'driver' => 'mysqli',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => 'summer11',
'database' => 'mysql',
'prefix' => '',
//'encoding' => 'utf8',
);

var $cake_posts = array(
'driver' => 'mysqli',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => 'summer11',
'database' => 'cake_posts',
'prefix' => '',
//'encoding' => 'utf8',
);

var $doc_lookup = array(
'driver' => 'mysqli',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => 'summer11',
'database' => 'doc_lookup',
'prefix' => '',
//'encoding' => 'utf8',
);

var $test = array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'test_database_name',
'prefix' => '',
//'encoding' => 'utf8',
);
}


-- Forwarded message --
From: Yves S. Garret 
Date: Thu, Sep 29, 2011 at 2:02 PM
Subject: Can't locate the database?
To: cake-php@googlegroups.com


I got to the following portion of the tutorial:

http://book.cakephp.org/view/1538/Data-Validation

At the very end of the tutorial I have the impression that I can proceed to
view at least some fruits of my labor.  However, when I went to:

http://localhost/cakery/posts/index

Cakery being where Cake resides, I get the following error... why?

Missing Database Table

*Error: *Database table *posts* for model *Post* was not found.

*Notice: *If you want to customize this error message, create
app\views\errors\missing_table.ctp

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


Can't locate the database?

2011-09-29 Thread Yves S. Garret
 I got to the following portion of the tutorial:

http://book.cakephp.org/view/1538/Data-Validation

At the very end of the tutorial I have the impression that I can proceed to
view at least some fruits of my labor.  However, when I went to:

http://localhost/cakery/posts/index

Cakery being where Cake resides, I get the following error... why?

Missing Database Table

*Error: *Database table *posts* for model *Post* was not found.

*Notice: *If you want to customize this error message, create
app\views\errors\missing_table.ctp

-- 
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: Doubt in autocomplete jquery

2011-09-29 Thread luca capra

I think you should add a "label" value to the results


[{"id":1,"value":"villivakkam","label":"villivakkam",}]



On 29/09/2011 19:03, Sathia S wrote:

Hi,
  I am working in basic of autocomplete in cakephp. When i enter th 
text in input, i request for server and return json output (i.e) it 
shows result in firebug. I am not getting list in view.


In view file

[code]

  $songs_array = array();
  foreach($songs as $key => $value){
array_push($songs_array, array("id"=>$key, "value" => 
strip_tags($value)));

  }
  echo json_encode($songs_array);

[/code]

It returns json as

[{"id":1,"value":"villivakkam"}]

when i checked in http://jsonlint.com/ it shows me valid json format.

Please tell me about this issue.

Thanks in advance


--
Regards

sathia
http://www.sathia27.wordpress.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


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


Doubt in autocomplete jquery

2011-09-29 Thread Sathia S
Hi,

  I am working in basic of autocomplete in cakephp. When i enter th text in
input, i request for server and return json output (i.e) it shows result in
firebug. I am not getting list in view.

In view file

[code]

  $songs_array = array();
  foreach($songs as $key => $value){
array_push($songs_array, array("id"=>$key, "value" =>
strip_tags($value)));
  }
  echo json_encode($songs_array);

[/code]

It returns json as

[{"id":1,"value":"villivakkam"}]

when i checked in http://jsonlint.com/ it shows me valid json format.

Please tell me about this issue.

Thanks in advance


-- 
Regards

sathia
http://www.sathia27.wordpress.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


Re: Is this a syntax error in the 1.3 book?

2011-09-29 Thread Thomas Ploch
Don't apologize to me, apologize to the server hosting the mailing
list :D

Am Donnerstag, den 29.09.2011, 18:30 +0300 schrieb Teddy Zeenny:
> Sorry Thomas didn't see your answer :)
> 
> On Thu, Sep 29, 2011 at 6:29 PM, Teddy Zeenny 
> wrote:
> You don't need to have a semicolon if the statement ends with
> a php closing tag ( ?> ).
> 
> 
> 
> On Thu, Sep 29, 2011 at 6:00 PM, Yves S. Garret
>  wrote:
> Just going through the book tutorial.  I got to this
> page:
> 
> 
> http://book.cakephp.org/view/1536/Creating-Post-Views
> 
> 
> At the very end you see this:
> 
> 
> 
> 
> Created:  $post['Post']['created']?>
> 
> 
> 
> Wouldn't the echo $post[...] need a semicolon in the
> end for both cases?  If this is indeed an issue, how
> do I go about notifying the documentation maintainers?
> 
> -- 
> 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


-- 
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: Is this a syntax error in the 1.3 book?

2011-09-29 Thread Teddy Zeenny
Sorry Thomas didn't see your answer :)

On Thu, Sep 29, 2011 at 6:29 PM, Teddy Zeenny  wrote:

> You don't need to have a semicolon if the statement ends with a php closing
> tag ( ?> ).
>
>
> On Thu, Sep 29, 2011 at 6:00 PM, Yves S. Garret <
> yoursurrogate...@gmail.com> wrote:
>
>> Just going through the book tutorial.  I got to this page:
>>
>> http://book.cakephp.org/view/1536/Creating-Post-Views
>>
>> At the very end you see this:
>>
>> 
>> 
>> Created: 
>> 
>>
>> Wouldn't the echo $post[...] need a semicolon in the end for both cases?
>>  If this is indeed an issue, how do I go about notifying the documentation
>> maintainers?
>>
>> --
>> 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: Is this a syntax error in the 1.3 book?

2011-09-29 Thread Teddy Zeenny
You don't need to have a semicolon if the statement ends with a php closing
tag ( ?> ).

On Thu, Sep 29, 2011 at 6:00 PM, Yves S. Garret
wrote:

> Just going through the book tutorial.  I got to this page:
>
> http://book.cakephp.org/view/1536/Creating-Post-Views
>
> At the very end you see this:
>
> 
> 
> Created: 
> 
>
> Wouldn't the echo $post[...] need a semicolon in the end for both cases?
>  If this is indeed an issue, how do I go about notifying the documentation
> maintainers?
>
> --
> 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: Is this a syntax error in the 1.3 book?

2011-09-29 Thread Thomas Ploch
You don't need the semicolon if you end the PHP script block with '?>'.
Although you can add the semicolon, it makes no difference to the
interpreter.

Kind regards
Thomas

Am Donnerstag, den 29.09.2011, 11:00 -0400 schrieb Yves S. Garret:
> Just going through the book tutorial.  I got to this page:
> 
> 
> http://book.cakephp.org/view/1536/Creating-Post-Views
> 
> 
> At the very end you see this:
> 
> 
> 
> 
> Created: 
> 
> 
> 
> Wouldn't the echo $post[...] need a semicolon in the end for both
> cases?  If this is indeed an issue, how do I go about notifying the
> documentation maintainers?
> 
> -- 
> 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


Is this a syntax error in the 1.3 book?

2011-09-29 Thread Yves S. Garret
Just going through the book tutorial.  I got to this page:

http://book.cakephp.org/view/1536/Creating-Post-Views

At the very end you see this:



Created: 


Wouldn't the echo $post[...] need a semicolon in the end for both cases?  If
this is indeed an issue, how do I go about notifying the documentation
maintainers?

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


I can find() but can't save(), why?

2011-09-29 Thread reynie...@gmail.com
Hi,
I have a BIG problem because as the title says I can find() but can't save()
and not understand where the problem is. This the code:
http://pastebin.com/VNYSh5j3, can any help me to find where the problem is?

Cheers and thanks in advance
Ing. Reynier Pérez Mira
Cel: +58 416.921.7406
Correo: reynie...@gmail.com / reynie...@hotmail.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


Re: Trying to convince management that Open Source is a good thing

2011-09-29 Thread mark_story
Getting paid support is generally possible for most infrastructure
type open source projects.

- MySQL -> Pay oracle.
- Linux -> Pay Redhat or Canonical

For smaller non infrastructure type projects there is usually a
developer or affiliated company that is happy to take money and be on
a retainer in case something goes bad.

-Mark

On Sep 27, 10:40 am, "Yves S. Garret" 
wrote:
> Sorry about this not being CakePHP specific, but rather something being
> tangentially related to CakePHP.  However, in my organization, there is a
> serious issue with convincing management that Open Source is a good idea.
>  As a result we are stuck with using Windows servers and _forced_ to use
> MSSQL.
>
> Don't get me wrong, I don't hate Microsoft (I run Mac, Windows and Linux at
> home) or want to start a flamewar of some sort.  However, I would like to
> know of some BUSINESS REASONS that I can use to sell to management that this
> is not only a good idea, but head and shoulders above our present way of
> going.
>
> My reason for doing this is because it's so much easier to get updates,
> fixes and improvements than with a close source approach.  Management is
> worried about support.  I don't really care, I can admin my own box just
> fine.  They want an approach that will cover their rear ends in case
> something bad happens (i.e. someone will come on-site and fix it for them).
>  Is there consultant group that provides support and other such services in
> the Rhode Island area that we could tap into?  I'd keep Windows around, but
> since we do most of our development on the web, it's kind of pointless to
> care too much what OS you're running.

-- 
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: Fat Model Skinny Controlller? Is this really correct?

2011-09-29 Thread Larry E. Masters
Fat models are the best practice, use it.

-- 
Larry E. Masters


On Thu, Sep 29, 2011 at 4:27 AM, heohni <
heidi.anselstet...@consultingteam.de> wrote:

> Hi,
>
> the more I work with Cake, the more I use google and read a lot about
> cake.
>
> And again and again I read about the fat model logic.
> I tried this for one model in my current project and it works well for
> me.
>
> But is this really best practice?
> How do YOU work in big projects?
>
> Please let me know your opinions!!
>
> --
> 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: Problem displaying output to view when using loadModel()

2011-09-29 Thread dave
Thanks.

By adding

 $this->Registration->id = $id;

immed before

 $this->set('registration', $this->Registration->read());

it worked fine.

As the id was passed into the function thru the url, and is named id
on both tables, I ignorantly thought this may pass directly to the
Registration->read() method.

Your reply (poss written at the end of a long day?) helped. Thanks.



On Sep 28, 6:47 pm, euromark  wrote:
> if you dont submit the id how can read() ever return the correct/
> expected result?
> thats what I ask myself when I look at your code
>
> On 28 Sep., 17:08, dave  wrote:
>
>
>
>
>
>
>
> > Hi
>
> > A newb having problems I'm afraid...
>
> > I have a controller as follows:
>
> >  > class NdasController extends AppController {
>
> >     var $name = 'Ndas';
>
> >     function view($id = null) {
> >                 $this->set('nda', $this->Nda->read());
>
> >                 $this->loadModel('Post');
> >                 $this->set('posts',$this->Post->find('all'));
>
> >                 $this->loadModel('Registration');
> >                 $this->set('registration', $this->Registration->read());
> >     }
>
> > }
>
> > This uses table ndas, but I also want to access info from posts, and
> > registrations...so I use loadModel.
>
> > The view correctly shows a single nda details and all post details,
> > but not the registration details (?). Here is the view:
>
> > 
> >         Viewing POST info (where we fetched all data)
> >          >                 foreach ($posts as $post):
> >                         echo $post['Post']['title'];
> >                 endforeach;
> >         ?>
>
> >         Viewing NDA for 
> >         
> >                 Some fancy title referring to the NDA
> >                 
> >                 Created:  > $nda['Nda']['created']?>
> >                 ...
> >         
>
> >         Viewing Registration for  > $registration['Registration']
> > ['name']?>
> >         
> >                 Some fancy title referring to the Registration
> >                 
> >                 Created:  > ['created']?>
> >                 ...
> >         
> > 
>
> > When I access all registration rows, it throws them out to the page
> > correctly, so no problem retrieving data for all. The nda table and
> > registration table are identical. What I really want to do is use this
> > controller and view (NDAs) to access detail from the registration
> > table. No errors are rendered, just that info from the registration
> > row doesn't appear...
>
> > Any help would be muchly appreciated. Apologies if not enough info,
> > just ask. The models etc all ok as all work in other instances.
>
> > Thanks
>
> > Dave Burton

-- 
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: Can't get my form in a modal box working in cakephp

2011-09-29 Thread Sam Sherlock
Are you using firebug or such?

Or place some calls to $this->log in the given controller action.

- S
On 29 Sep 2011 13:55, "crazysarahtemple...@aol.com" <
crazysarahtemple...@aol.com> wrote:
> Hey there. I've added
> var $components = array('RequestHandler');
> to my Images_Controller
>
> and
> if ($this->RequestHandler->isAjax())
> to the function that the form is meant to submit to but that did
> absolutely nothing at all :(
>
> Any further hints?
>
> thanks
>
> --
> 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: Can't get my form in a modal box working in cakephp

2011-09-29 Thread crazysarahtemple...@aol.com
Hey there. I've added
var $components = array('RequestHandler');
to my Images_Controller

and
if ($this->RequestHandler->isAjax())
to the function that the form is meant to submit to but that did
absolutely nothing at all :(

Any further hints?

thanks

-- 
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: Can't get my form in a modal box working in cakephp

2011-09-29 Thread Sam Sherlock
Use the Reqesthandler isajax method.

- S
On 29 Sep 2011 12:35, "crazysarahtemple...@aol.com" <
crazysarahtemple...@aol.com> wrote:
> Hey Paul, thanks for the useful info :)
>
> I'm new so it's all a bit confusing but thanks for pointing me to the
> RequestHandler which I've never used before. Handling Ajax requests...
> hummm... wha?!? Some reading ahead of me today I think!
>
> I've tried jQuery UI's modal box which worked great - in fact as well
> as reading up about RequestHandler I was going to try to compare the
> two modals and see why one works and one doesn't - but I didn't like
> the themes. NyroModal just looks nice and plain and simple. I might
> have to go back and just use it if I can't figure things out. Why
> would the form work in a UI modal and not a Nyro Modal !?! g..
> does it handle ajax requests automatically?
>
> thanks
> Sarah
>
> On Sep 29, 8:23 am, WebbedIT  wrote:
>> Sarah,ut
>> I've
>> This is not a CakePHP issue, this is related to a jQuery plugin that I
>> don't think there is a CakePHP helper for (may find one somewhere but
>> never heard of the plugin myself).
>>
>> However, let's try and get you on the right path.  It's one thing to
>> open a modal that contains a form, which it seems you're managing to
>> do, but you then need to ensure that the form within the modal is
>> being submitted as an AJAX request that updates the modal rather than
>> loading a new page.
>>
>> I am not familiar with NyroModal so can't give specific help on that
>> jQuery Plugin.  I've had a quick look at the plugin's documentation
>> and I found the demos very hard to follow:http://nyromodal.nyrodev.com/
>>
>> However, I think you simply need to add class='nyroModal' to your form
>> tag and it will submit the form as an ajax request, but you need to
>> make sure Cake is then able to handle the AJAX request properly and
>> send it back without the default layout and debug messages etc.  I
>> reccomend using the RequestHandler component to check if a request to
>> the controller/action isAjax and then set the layout to 'ajax' which
>> will probably just contain .  I also
>> strongly reccomend using FireBug when working with AJAX so you can see
>> if your requests are being fired, what they sent and what they
>> returned.
>>
>> Why did you chose NyroModal over jQuery UI's excellent native 'dialog'
>> which creates modals that are themeable?  I use these all the time and
>> find the documentation to be spot on.
http://jqueryui.com/demos/dialog/#modal-form
>>
>> HTH, Paul
>>
>> On Sep 28, 6:01 pm, "crazysarahtemple...@aol.com"
>>
>>
>>
>>  wrote:
>> > Hi Mike, I really really appreciate your help with this but I've been
>> > fiddling about and trying to understand what you've told me but I'm
>> > still a little bit unsure. I'm really new to JS and not too sure what
>> > bits go where.
>>
>> > Heres what I have in my JS file for this page:
>> > $(function() {
>> >   $('.nyroModal').nyroModal();
>>
>> > });
>>
>> > As far as I know that is meant to mean that when someone clicks a link
>> > with the class="nyroModal" the modal pop up should appear (which it
>> > does:)
>>
>> > Here's what I have to open the modal:
>> > Html->image('uploadimage.gif');?>
>>
>> >   > > echo $form->create('Image', array('action'=>'upload',
'type' =>
>> > 'file'));
>> > echo $form->input('fileName', array('type' => 'file'));
>> > echo $form->end('Upload');?>
>> > 
>>
>> > What bits do you mean I should be changing?
>>
>> > thanks ;)
>>
>> > On Sep 28, 3:41 pm, mike karthauser  wrote:
>>
>> > > Hi Sarah
>>
>> > > On 28 Sep 2011, at 15:05, crazysarahtemple...@aol.com wrote:
>>
>> > > > I'm learning all about cakephp but having an issue which I can't
>> > > > figure out. I'm trying to have a file upload form inside a modal
box,
>> > > > but although the form works fine when not in a modal box and just
in a
>> > > > ctp file, when it's in the modal box it doesn't submit at all.
>>
>> > > > I'm using Uploader by Miles Johnsonhttp://
milesj.me/code/cakephp/uploader#script
>> > > > and the modal box is fromhttp://nyromodal.nyrodev.com/
>>
>> > > > The code I'm using to create the form is:
>> > > > Html-
>> > > >> image('uploadimage.gif');?>
>> > > > > > > >echo $form->create('Image', array('action'=>'upload', 'type' =>
>> > > > 'file'));
>> > > >echo $form->input('fileName', array('type' => 'file'));
>> > > >echo $form->end('Upload');
>> > > > 
>>
>> > > > When I click the image the modal box pops up as expected with the
form
>> > > > inside just like it's meant to be. But when I click submit nothing
>> > > > happens.
>>
>> > > > Like I said, the exact same form works outside the modal box. Plus
the
>> > > > outputted code appears the same:
>> > > > > > > > action="/sponster/images/upload" accept-charset="utf-8">
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >File Name
>> > > >> > > > id="ImageFileName" />
>> > > >   

Re: Pagination and delete an item in a paginated list with jquery

2011-09-29 Thread euromark
you can update the complete content of the content div
this way everything is current then again


On 29 Sep., 12:23, heohni 
wrote:
> Hi,
>
> I have a paginated list and want to remove single items out of it with
> jquery.
> Is there any way I can update the pagination info for the paginator as
> the pagination needs to count one item less and needs to change the
> counting and paging accordingly?
>
> Thanks!

-- 
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: Can't get my form in a modal box working in cakephp

2011-09-29 Thread crazysarahtemple...@aol.com
Hey Paul, thanks for the useful info :)

I'm new so it's all a bit confusing but thanks for pointing me to the
RequestHandler which I've never used before. Handling Ajax requests...
hummm... wha?!? Some reading ahead of me today I think!

I've tried jQuery UI's modal box which worked great - in fact as well
as reading up about RequestHandler I was going to try to compare the
two modals and see why one works and one doesn't - but I didn't like
the themes. NyroModal just looks nice and plain and simple. I might
have to go back and just use it if I can't figure things out. Why
would the form work in a UI modal and not a Nyro Modal !?! g..
does it handle ajax requests automatically?

thanks
Sarah

On Sep 29, 8:23 am, WebbedIT  wrote:
> Sarah,ut
> I've
> This is not a CakePHP issue, this is related to a jQuery plugin that I
> don't think there is a CakePHP helper for (may find one somewhere but
> never heard of the plugin myself).
>
> However, let's try and get you on the right path.  It's one thing to
> open a modal that contains a form, which it seems you're managing to
> do, but you then need to ensure that the form within the modal is
> being submitted as an AJAX request that updates the modal rather than
> loading a new page.
>
> I am not familiar with NyroModal so can't give specific help on that
> jQuery Plugin.  I've had a quick look at the plugin's documentation
> and I found the demos very hard to follow:http://nyromodal.nyrodev.com/
>
> However, I think you simply need to add class='nyroModal' to your form
> tag and it will submit the form as an ajax request, but you need to
> make sure Cake is then able to handle the AJAX request properly and
> send it back without the default layout and debug messages etc.  I
> reccomend using the RequestHandler component to check if a request to
> the controller/action isAjax and then set the layout to 'ajax' which
> will probably just contain .  I also
> strongly reccomend using FireBug when working with AJAX so you can see
> if your requests are being fired, what they sent and what they
> returned.
>
> Why did you chose NyroModal over jQuery UI's excellent native 'dialog'
> which creates modals that are themeable?  I use these all the time and
> find the documentation to be spot 
> on.http://jqueryui.com/demos/dialog/#modal-form
>
> HTH, Paul
>
> On Sep 28, 6:01 pm, "crazysarahtemple...@aol.com"
>
>
>
>  wrote:
> > Hi Mike, I really really appreciate your help with this but I've been
> > fiddling about and trying to understand what you've told me but I'm
> > still a little bit unsure. I'm really new to JS and not too sure what
> > bits go where.
>
> > Heres what I have in my JS file for this page:
> > $(function() {
> >   $('.nyroModal').nyroModal();
>
> > });
>
> > As far as I know that is meant to mean that when someone clicks a link
> > with the class="nyroModal" the modal pop up should appear (which it
> > does:)
>
> > Here's what I have to open the modal:
> >  > $this->Html->image('uploadimage.gif');?>
>
> >            >                 echo $form->create('Image', array('action'=>'upload', 
> > 'type' =>
> > 'file'));
> >                 echo $form->input('fileName', array('type' => 'file'));
> >                 echo $form->end('Upload');?>
> >         
>
> > What bits do you mean I should be changing?
>
> > thanks ;)
>
> > On Sep 28, 3:41 pm, mike karthauser  wrote:
>
> > > Hi Sarah
>
> > > On 28 Sep 2011, at 15:05, crazysarahtemple...@aol.com wrote:
>
> > > > I'm learning all about cakephp but having an issue which I can't
> > > > figure out. I'm trying to have a file upload form inside a modal box,
> > > > but although the form works fine when not in a modal box and just in a
> > > > ctp file, when it's in the modal box it doesn't submit at all.
>
> > > > I'm using Uploader by Miles 
> > > > Johnsonhttp://milesj.me/code/cakephp/uploader#script
> > > > and the modal box is fromhttp://nyromodal.nyrodev.com/
>
> > > > The code I'm using to create the form is:
> > > > Html-
> > > >> image('uploadimage.gif');?>
> > > >      > > >    echo $form->create('Image', array('action'=>'upload', 'type' =>
> > > > 'file'));
> > > >    echo $form->input('fileName', array('type' => 'file'));
> > > >    echo $form->end('Upload');
> > > > 
>
> > > > When I click the image the modal box pops up as expected with the form
> > > > inside just like it's meant to be. But when I click submit nothing
> > > > happens.
>
> > > > Like I said, the exact same form works outside the modal box. Plus the
> > > > outputted code appears the same:
> > > >  > > > action="/sponster/images/upload" accept-charset="utf-8">
> > > >    
> > > >        
> > > >    
> > > >    
> > > >        File Name
> > > >         > > > id="ImageFileName" />
> > > >    
> > > >    
> > > >    
> > > > 
>
> > > > I've obviously missed something stupid or something? Can anyone help
> > > > me please?
>
> > > I suspect your js trying to do something like 
> > > $('#ImageUploadForm').submit(function(){
>
> > > // 

Re: Can't get my form in a modal box working in cakephp

2011-09-29 Thread crazysarahtemple...@aol.com
Hey Paul, thanks for the useful info :)

I'm new so it's all a bit confusing but thanks for pointing me to the
RequestHandler which I've never used before. Some reading ahead of me
today I think!

I've tried jQuery UI's modal box which worked great - in fact as well
as reading up about RequestHandler I was going to try to compare the
two modals and see why one works and one doesn't - but I didn't like
the themes. NyroModal just looks nice and plain and simple. I might
have to go back and just use it if I can't figure things out. Why
would the form work in a UI modal and not a Nyro Modal !?! g..

thanks
Sarah

On Sep 29, 8:23 am, WebbedIT  wrote:
> Sarah,ut
> I've
> This is not a CakePHP issue, this is related to a jQuery plugin that I
> don't think there is a CakePHP helper for (may find one somewhere but
> never heard of the plugin myself).
>
> However, let's try and get you on the right path.  It's one thing to
> open a modal that contains a form, which it seems you're managing to
> do, but you then need to ensure that the form within the modal is
> being submitted as an AJAX request that updates the modal rather than
> loading a new page.
>
> I am not familiar with NyroModal so can't give specific help on that
> jQuery Plugin.  I've had a quick look at the plugin's documentation
> and I found the demos very hard to follow:http://nyromodal.nyrodev.com/
>
> However, I think you simply need to add class='nyroModal' to your form
> tag and it will submit the form as an ajax request, but you need to
> make sure Cake is then able to handle the AJAX request properly and
> send it back without the default layout and debug messages etc.  I
> reccomend using the RequestHandler component to check if a request to
> the controller/action isAjax and then set the layout to 'ajax' which
> will probably just contain .  I also
> strongly reccomend using FireBug when working with AJAX so you can see
> if your requests are being fired, what they sent and what they
> returned.
>
> Why did you chose NyroModal over jQuery UI's excellent native 'dialog'
> which creates modals that are themeable?  I use these all the time and
> find the documentation to be spot 
> on.http://jqueryui.com/demos/dialog/#modal-form
>
> HTH, Paul
>
> On Sep 28, 6:01 pm, "crazysarahtemple...@aol.com"
>
>
>
>  wrote:
> > Hi Mike, I really really appreciate your help with this but I've been
> > fiddling about and trying to understand what you've told me but I'm
> > still a little bit unsure. I'm really new to JS and not too sure what
> > bits go where.
>
> > Heres what I have in my JS file for this page:
> > $(function() {
> >   $('.nyroModal').nyroModal();
>
> > });
>
> > As far as I know that is meant to mean that when someone clicks a link
> > with the class="nyroModal" the modal pop up should appear (which it
> > does:)
>
> > Here's what I have to open the modal:
> >  > $this->Html->image('uploadimage.gif');?>
>
> >            >                 echo $form->create('Image', array('action'=>'upload', 
> > 'type' =>
> > 'file'));
> >                 echo $form->input('fileName', array('type' => 'file'));
> >                 echo $form->end('Upload');?>
> >         
>
> > What bits do you mean I should be changing?
>
> > thanks ;)
>
> > On Sep 28, 3:41 pm, mike karthauser  wrote:
>
> > > Hi Sarah
>
> > > On 28 Sep 2011, at 15:05, crazysarahtemple...@aol.com wrote:
>
> > > > I'm learning all about cakephp but having an issue which I can't
> > > > figure out. I'm trying to have a file upload form inside a modal box,
> > > > but although the form works fine when not in a modal box and just in a
> > > > ctp file, when it's in the modal box it doesn't submit at all.
>
> > > > I'm using Uploader by Miles 
> > > > Johnsonhttp://milesj.me/code/cakephp/uploader#script
> > > > and the modal box is fromhttp://nyromodal.nyrodev.com/
>
> > > > The code I'm using to create the form is:
> > > > Html-
> > > >> image('uploadimage.gif');?>
> > > >      > > >    echo $form->create('Image', array('action'=>'upload', 'type' =>
> > > > 'file'));
> > > >    echo $form->input('fileName', array('type' => 'file'));
> > > >    echo $form->end('Upload');
> > > > 
>
> > > > When I click the image the modal box pops up as expected with the form
> > > > inside just like it's meant to be. But when I click submit nothing
> > > > happens.
>
> > > > Like I said, the exact same form works outside the modal box. Plus the
> > > > outputted code appears the same:
> > > >  > > > action="/sponster/images/upload" accept-charset="utf-8">
> > > >    
> > > >        
> > > >    
> > > >    
> > > >        File Name
> > > >         > > > id="ImageFileName" />
> > > >    
> > > >    
> > > >    
> > > > 
>
> > > > I've obviously missed something stupid or something? Can anyone help
> > > > me please?
>
> > > I suspect your js trying to do something like 
> > > $('#ImageUploadForm').submit(function(){
>
> > > // do something
>
> > > };
>
> > > this is fine in outside the modal as the form loads be

Pagination and delete an item in a paginated list with jquery

2011-09-29 Thread heohni
Hi,

I have a paginated list and want to remove single items out of it with
jquery.
Is there any way I can update the pagination info for the paginator as
the pagination needs to count one item less and needs to change the
counting and paging accordingly?

Thanks!

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


Ajax Link - How to exchange/toogle a link?

2011-09-29 Thread heohni
Hi,

I have this part of code in my view


Bookmark->checkBookmarkStatus($objects[0]
['Gesamtobjekt']['OBJ_ID']) == 'bookmark'){
$image = 'bookmark.png';
$text = __('Immobilie merken', true);
$action = 'add';
}else{
$image = 'bookmarked.png';
$text = __('Immobilie vorgemerkt', true);
$action = 'delete';
}
?>
link($this->Html->image($image).$text,
array('controller'=>'bookmark', 'action'=>$action, $objects[0]
['Gesamtobjekt']['OBJ_ID']), array('escape' => false, 'update' =>
'dynbookmark'));?>


This shows me on page load if this item is saved on "bookmark" list,
or not.
With the Ajax Link I can toogle this t save or to delete this item
from the bookmarks list.

But to display the correct link I need 3 important infos:
- the right picture
- link text ("add me" + "delete me")
- the controller action name (add / delete)

As far as I understand the ajax link stuff, I can return only a simple
string?
How could I create the entire link with all my needed information?

Any ideas or help?

Thanks!!

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


Fat Model Skinny Controlller? Is this really correct?

2011-09-29 Thread heohni
Hi,

the more I work with Cake, the more I use google and read a lot about
cake.

And again and again I read about the fat model logic.
I tried this for one model in my current project and it works well for
me.

But is this really best practice?
How do YOU work in big projects?

Please let me know your opinions!!

-- 
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: Problem with linking a pdf at a outside webroot folder

2011-09-29 Thread WebbedIT
Why can't this be changed?  If you've never been able to access these
PDF's then this process has never been working and I'm sure all
concerned would welcome configuration changes to the logical folder of
'/app/webroot/files/pdf'.

Seems like you're creating a whole load of work for yourself when it
must be possible to change the config of the external CMS to drop the
PDFs in the correct place, especially when it must have been
configured by someone to drop these files into the middle of Cake's
folder structure in the first place.

Paul.

On Sep 28, 10:15 am, heohni 
wrote:
> Hi,
>
> I have this structure:
> controller
> model
> pdf <
> webroot
>
> In this pdf folder are my files and I am not able to change this
> folder location as it gets filled by and external CMS Service.
>
> I need now to link to these pdfs and my link outputs me something like
> that:http://localhost/pdf/8104-3-de.pdf
>
> Is there a way through the routes.php or maybe htaccess to get the
> files properly opened?
> Anyone any ideas?

-- 
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: Project logic question about AUTH

2011-09-29 Thread WebbedIT
Heohni,

I would say you turn Auth on at AppController level so it;s available
all the time, as you will want to know on every page request whether
the user is logged in or not.  The most basic reason for this is to
only show 'login/register' links when logged out and 'logout/your
account' links when logged in.

Just make sure that for all controllers that do not require login you
set $this->Auth->allow(*) and you're good to go.

HTH, Paul

On Sep 28, 11:22 am, heohni 
wrote:
> Hi,
>
> I am working an a project where you can see products.
> Products can be saved in a kind of bookmark list.
> This bookmark list is either valid per session, or if the user wants,
> he can setup an account and save the bookmark list for longer time.
>
> I need the auth functions only on a certain point. When the User is on
> the bookmarks page and wants to create an account and wants to login
> into his account to check his bookmarks.
>
> What do I have to do that AUTH is only "listening" to the bookmarks
> page and not to all others controllers?
>
> I really need some starting help :-)
>
> Thanks!!

-- 
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 would I do this project best in CakePHP?

2011-09-29 Thread WebbedIT
Yeah, you specified your groups in your OP:
- Users
- Editors
- Admins

Set Auth->authorize to controller and create an isAuthorized() action
in each controller which checks $this->Auth->user('user_group_id') and
returns true or false depending on if the user has access to the
actions they are trying to access.
http://book.cakephp.org/view/1275/authorize

HTH, Paul.

On Sep 28, 12:47 pm, "Yves S. Garret" 
wrote:
> Why user_groups?  What is that for?  For permissions?
>
>
>
>
>
>
>
> On Wed, Sep 28, 2011 at 3:53 AM, WebbedIT  wrote:
> > The way to develop any good solid app is to start with the database,
> > create models, then contorllers, then views and est voila you have an
> > app.
>
> > At it's most simple, you should have the following tables in your
> > schema:
> > - users
> > - user_groups
> > - teachers
>
> > I would then use Auth with $this->Auth->authorize = 'controller'; and
> > create an isAuthorized() action in each controller to check
> > authorisation levels depending on a users group.
>
> > HTH, Paul
>
> > On Sep 27, 9:40 pm, "Yves S. Garret" 
> > wrote:
> > > Hi all,
>
> > >    I'd like some advice/direction on this.  I'm fairly new to Cake, so
> > this
> > > would be very much appreciated.  Basically, I have this assignment at
> > work
> > > (oh yeah, CakePHP will be our framework as we're going along in our
> > > department, something I'm not 100% familiar), where you have a website
> > that
> > > shows a list of names (last name and first name) and 3 code that mean
> > > something to the person searching for the person.  It's a list of
> > teachers.
>
> > >    Now, there will be 3 roles, Users, Editors and Admins.  Users can view
> > > data (no sign on is necessary). Editors can do what a User can do and add
> > > new names to the list, delete them and update them (there is a
> > requirement
> > > that you should be able to 'Enable' and 'Disable' teachers, essentially
> > they
> > > are not shown when searched for).  The Admin can do what an Editor can
> > do,
> > > add new Editors to the system and make the existing Editors also Admins
> > > (need to guard against an Admin from getting rid of his own privileges if
> > > he's the only one).
>
> > >    Now, I don't expect anyone to do this for me (what, you think I'm
> > going
> > > to let someone else have the fun :-) ?)  But the current tutorial seems
> > not
> > > really close to what I wanna do and since I'm not too familiar with
> > CakePHP
> > > and how it works, I'd like some pointers on this or -- even better -- a
> > > tutorial that's similar to what I am trying to do.
>
> > >    I'm already sketching out how the database will look as a start.
>
> > --
> > 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

-- 
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: Errors trying to run a shell in cron

2011-09-29 Thread Andras Kende
Try:

chmod -R 777 /home/kindlem1/tmp


On Sep 29, 2011, at 2:01 AM, #2Will wrote:

> Hello.  I made a shell for my app - notify.  It emails people things.
> Its all working from the command prompt on my mac , but when i try and
> use it on the stage server through cron, it emails me an error. It
> seems like cake is looking for things in the wrong place:
> 
> "/home/kindlem1/tmp/cache/persistent/ is not writable"
> 
> which is because the app is in /home/kindlem1/public_html/eeip   - the
> staging subdomain points to this dir.
> 
> What can i do?
> 
> --error message--
> Warning: _cake_core_ cache was unable to write 'cake_dev_' to File
> cache in /home/kindlem1/public_html/eeip/lib/Cake/Cache/Cache.php on
> line 310
> 
> Warning: /home/kindlem1/tmp/cache/persistent/ is not writable in /home/
> kindlem1/public_html/eeip/lib/Cake/Cache/Engine/FileEngine.php on line
> 306
> 
> Warning: /home/kindlem1/tmp/cache/models/ is not writable in /home/
> kindlem1/public_html/eeip/lib/Cake/Cache/Engine/FileEngine.php on line
> 306
> [31;4mWarning Error: [0m _cake_core_ cache was unable to write
> 'cake_console_' to File cache in [/home/kindlem1/public_html/eeip/lib/
> Cake/Cache/Cache.php, line 310]
> 
> [31;4mError: [0m Shell file notify could not be loaded.
> #0 /home/kindlem1/public_html/eeip/lib/Cake/Console/
> ShellDispatcher.php(166): ShellDispatcher->_getShell('notify')
> #1 /home/kindlem1/public_html/eeip/lib/Cake/Console/
> ShellDispatcher.php(69): ShellDispatcher->dispatch()
> #2 /home/kindlem1/public_html/eeip/app/Console/cake.php(24):
> ShellDispatcher::run(Array)
> #3 {main}
> 
> -- 
> 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: Can't get my form in a modal box working in cakephp

2011-09-29 Thread WebbedIT
Sarah,

This is not a CakePHP issue, this is related to a jQuery plugin that I
don't think there is a CakePHP helper for (may find one somewhere but
never heard of the plugin myself).

However, let's try and get you on the right path.  It's one thing to
open a modal that contains a form, which it seems you're managing to
do, but you then need to ensure that the form within the modal is
being submitted as an AJAX request that updates the modal rather than
loading a new page.

I am not familiar with NyroModal so can't give specific help on that
jQuery Plugin.  I've had a quick look at the plugin's documentation
and I found the demos very hard to follow:
http://nyromodal.nyrodev.com/

However, I think you simply need to add class='nyroModal' to your form
tag and it will submit the form as an ajax request, but you need to
make sure Cake is then able to handle the AJAX request properly and
send it back without the default layout and debug messages etc.  I
reccomend using the RequestHandler component to check if a request to
the controller/action isAjax and then set the layout to 'ajax' which
will probably just contain .  I also
strongly reccomend using FireBug when working with AJAX so you can see
if your requests are being fired, what they sent and what they
returned.

Why did you chose NyroModal over jQuery UI's excellent native 'dialog'
which creates modals that are themeable?  I use these all the time and
find the documentation to be spot on.
http://jqueryui.com/demos/dialog/#modal-form

HTH, Paul

On Sep 28, 6:01 pm, "crazysarahtemple...@aol.com"
 wrote:
> Hi Mike, I really really appreciate your help with this but I've been
> fiddling about and trying to understand what you've told me but I'm
> still a little bit unsure. I'm really new to JS and not too sure what
> bits go where.
>
> Heres what I have in my JS file for this page:
> $(function() {
>   $('.nyroModal').nyroModal();
>
> });
>
> As far as I know that is meant to mean that when someone clicks a link
> with the class="nyroModal" the modal pop up should appear (which it
> does:)
>
> Here's what I have to open the modal:
>  $this->Html->image('uploadimage.gif');?>
>
>                            echo $form->create('Image', array('action'=>'upload', 'type' 
> =>
> 'file'));
>                 echo $form->input('fileName', array('type' => 'file'));
>                 echo $form->end('Upload');?>
>         
>
> What bits do you mean I should be changing?
>
> thanks ;)
>
> On Sep 28, 3:41 pm, mike karthauser  wrote:
>
>
>
>
>
>
>
> > Hi Sarah
>
> > On 28 Sep 2011, at 15:05, crazysarahtemple...@aol.com wrote:
>
> > > I'm learning all about cakephp but having an issue which I can't
> > > figure out. I'm trying to have a file upload form inside a modal box,
> > > but although the form works fine when not in a modal box and just in a
> > > ctp file, when it's in the modal box it doesn't submit at all.
>
> > > I'm using Uploader by Miles 
> > > Johnsonhttp://milesj.me/code/cakephp/uploader#script
> > > and the modal box is fromhttp://nyromodal.nyrodev.com/
>
> > > The code I'm using to create the form is:
> > > Html-
> > >> image('uploadimage.gif');?>
> > >      > >    echo $form->create('Image', array('action'=>'upload', 'type' =>
> > > 'file'));
> > >    echo $form->input('fileName', array('type' => 'file'));
> > >    echo $form->end('Upload');
> > > 
>
> > > When I click the image the modal box pops up as expected with the form
> > > inside just like it's meant to be. But when I click submit nothing
> > > happens.
>
> > > Like I said, the exact same form works outside the modal box. Plus the
> > > outputted code appears the same:
> > >  > > action="/sponster/images/upload" accept-charset="utf-8">
> > >    
> > >        
> > >    
> > >    
> > >        File Name
> > >         > > id="ImageFileName" />
> > >    
> > >    
> > >    
> > > 
>
> > > I've obviously missed something stupid or something? Can anyone help
> > > me please?
>
> > I suspect your js trying to do something like 
> > $('#ImageUploadForm').submit(function(){
>
> > // do something
>
> > };
>
> > this is fine in outside the modal as the form loads before the document is 
> > ready so js can hang an event off the dom object. When you load this in a 
> > modal, the js isnt aware of the object so no event can be triggered.
>
> > A way round this is to use the .live event handler in jquery.
>
> > $('#ImageUploadForm').live('submit',function(){
>
> > // do something
>
> > };
>
> > Also if your js is being loaded as part of your view, then its likely that 
> > in the modal its not being loaded at all. use firebug to check this. if its 
> > not loading, stick it in your main template.
>
> > Hopefully it'll be something like this.
>
> > mikek
>
> > --
> > Mike Karthäuser
> > Managing Director - Brightstorm Ltd
> > Email: mi...@brightstorm.co.uk
> > Web:http://www.brightstorm.co.uk
> > Tel: 07939 252144
> > Address: 1 Brewery Court, North Street, Bristol, BS3 1JS

-- 
Our newest site for the communi

Re: Errors trying to run a shell in cron

2011-09-29 Thread #2Will
Sorry, fogort some things:

Cakephp2.0 rc2

and my cron comand is:
home/kindlem1/public_html/eeip/app/Console/cake notify

On Sep 29, 5:01 pm, "#2Will"  wrote:
> Hello.  I made a shell for my app - notify.  It emails people things.
> Its all working from the command prompt on my mac , but when i try and
> use it on the stage server through cron, it emails me an error. It
> seems like cake is looking for things in the wrong place:
>
> "/home/kindlem1/tmp/cache/persistent/ is not writable"
>
> which is because the app is in /home/kindlem1/public_html/eeip   - the
> staging subdomain points to this dir.
>
> What can i do?
>
> --error message--
> Warning: _cake_core_ cache was unable to write 'cake_dev_' to File
> cache in /home/kindlem1/public_html/eeip/lib/Cake/Cache/Cache.php on
> line 310
>
> Warning: /home/kindlem1/tmp/cache/persistent/ is not writable in /home/
> kindlem1/public_html/eeip/lib/Cake/Cache/Engine/FileEngine.php on line
> 306
>
> Warning: /home/kindlem1/tmp/cache/models/ is not writable in /home/
> kindlem1/public_html/eeip/lib/Cake/Cache/Engine/FileEngine.php on line
> 306
>  [31;4mWarning Error: [0m _cake_core_ cache was unable to write
> 'cake_console_' to File cache in [/home/kindlem1/public_html/eeip/lib/
> Cake/Cache/Cache.php, line 310]
>
>  [31;4mError: [0m Shell file notify could not be loaded.
> #0 /home/kindlem1/public_html/eeip/lib/Cake/Console/
> ShellDispatcher.php(166): ShellDispatcher->_getShell('notify')
> #1 /home/kindlem1/public_html/eeip/lib/Cake/Console/
> ShellDispatcher.php(69): ShellDispatcher->dispatch()
> #2 /home/kindlem1/public_html/eeip/app/Console/cake.php(24):
> ShellDispatcher::run(Array)
> #3 {main}

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


Errors trying to run a shell in cron

2011-09-29 Thread #2Will
Hello.  I made a shell for my app - notify.  It emails people things.
Its all working from the command prompt on my mac , but when i try and
use it on the stage server through cron, it emails me an error. It
seems like cake is looking for things in the wrong place:

"/home/kindlem1/tmp/cache/persistent/ is not writable"

which is because the app is in /home/kindlem1/public_html/eeip   - the
staging subdomain points to this dir.

What can i do?

--error message--
Warning: _cake_core_ cache was unable to write 'cake_dev_' to File
cache in /home/kindlem1/public_html/eeip/lib/Cake/Cache/Cache.php on
line 310

Warning: /home/kindlem1/tmp/cache/persistent/ is not writable in /home/
kindlem1/public_html/eeip/lib/Cake/Cache/Engine/FileEngine.php on line
306

Warning: /home/kindlem1/tmp/cache/models/ is not writable in /home/
kindlem1/public_html/eeip/lib/Cake/Cache/Engine/FileEngine.php on line
306
 [31;4mWarning Error: [0m _cake_core_ cache was unable to write
'cake_console_' to File cache in [/home/kindlem1/public_html/eeip/lib/
Cake/Cache/Cache.php, line 310]

 [31;4mError: [0m Shell file notify could not be loaded.
#0 /home/kindlem1/public_html/eeip/lib/Cake/Console/
ShellDispatcher.php(166): ShellDispatcher->_getShell('notify')
#1 /home/kindlem1/public_html/eeip/lib/Cake/Console/
ShellDispatcher.php(69): ShellDispatcher->dispatch()
#2 /home/kindlem1/public_html/eeip/app/Console/cake.php(24):
ShellDispatcher::run(Array)
#3 {main}

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