Re: AD7six Upload Behaviour

2008-08-31 Thread Josoroma

Hi,

Somebody knows how to use and configure at model level the upload
behavior of AD7Six, but without using the attachments table?
http://groups.google.com/group/cake-php/browse_thread/thread/8ac41ad9dfd4bb7d/a1b2160874e5da48

Any help is welcome.
Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Trying to set up CakePHP for the first time

2008-08-31 Thread JBeckton

I am in the process of learning PHP and wanted to get started with a
framework as well. I have several years dev experience with another
web language and I just feel naked when building apps without a
framework.

I was hoping that CakePHP would be easy to get running but that has
not been the case. I am on a Ubuntu 8 desktop with Apache2, MySQL and
PHP5 running.

I was following the instructions @ 
http://book.cakephp.org/view/27/developing-with-cakephp.

In MySQL I created a DB and a User account just for my app to use. I
put this information in the /app/config/database.php file thinking the
framework would use that information to connect to the DB.

Here is the message I am getting.


 Your tmp directory is writable.

The FileEngine is being used for caching. To change the config edit
APP/config/core.php

Your database configuration file is present.

Warning (2): mysql_connect() [function.mysql-connect]: Access denied
for user 'user'@'localhost' (using password: YES) [CORE/cake/libs/
model/datasources/dbo/dbo_mysql.php, line 117]

Warning (2): mysql_select_db(): supplied argument is not a valid MySQL-
Link resource [CORE/cake/libs/model/datasources/dbo/dbo_mysql.php,
line 122]

Warning (2): mysql_get_server_info(): supplied argument is not a valid
MySQL-Link resource [CORE/cake/libs/model/datasources/dbo/
dbo_mysql.php, line 130]

Cake is NOT able to connect to the database.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: method find using regex

2008-08-31 Thread Luigi Castro Cardeles

On Aug 30, 10:03 pm, Rafael Bandeira aka rafaelbandeira3
<[EMAIL PROTECTED]> wrote:
> > athttp://book.cakephp.org/view/73/retrieving-your-data, is some info
> > about usind find with regex (at conditions param). I can't find one
> > example of usage and there is nothing at the docs. Someone can give a
> > example of usage?
>
> I actually didn't understand what you want but if you want to use
> REGEXP in your query:
>
> $this->Project->find('all', array(
>                         'conditions' => array(
>                                 'Project.title REGEXP' => '^ui'
>                         )
>                 ))
>
> Always when using operators in find conditions use them in  the
> field's side, to avoid sql injections

Hi,

This is what i want, doing that (REGEXP) only work for a MySQL
database.
I am using PostgreSQL and to do a regex search i use '~' (Select *
FROM mytable WHERE field ~ my-regex-expression). If i put that at a
find conditions, this dont work.

at cake:

 $this->Project->find('all', array(
 'conditions' => array(
 'Project.title ~' => '^ui'
 )
 ))

but the sql statement looks like:

SELECT ... FROM my-table WHERE Project.title ~ = ^ui.

The REGEX search works only with MySQL?

thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: failed to open stream: Permission denied ...

2008-08-31 Thread fhx

Hi David,
thx for the reply. I deleted everything in .../apps/tmp/cache, but the
same messages still appear. I read also the other linked posting, but
don't know right now how to use it. I know what a shell is and what a
script is, but don't know what is meant there with writing a shell
script ... is this the controller.php where the functions are
defined ?

Regards,
Frank

On Aug 31, 3:21 am, David Persson <[EMAIL PROTECTED]> wrote:
> Hi Frank,
>
> Try flushing your caches by deleting the files in ../app/tmp/
> cache/(models|persistent|views) directory. The cache files are
> sometimes written with wrong file permissions if you execute bake (or
> any other shell) prior to visiting one of your app's pages via
> browser.  This way the cache files belong to the user which executed
> the shell and are readable/writable by the apache user.
>
> Also 
> see:http://groups.google.com/group/cake-php/browse_thread/thread/c70af5d6...
>
> for more info on how to disable caching in shells.
>
> - David
>
> On Aug 31, 7:04 am, xfh <[EMAIL PROTECTED]> wrote:
>
>
>
> > I thought I added this posting already by google groups, but it didn't
> > show up anywhere again, so I post it new ... it also didn't forward to
> > my e-mail and I guess it still won't with this new posting. Please
> > send me a link to your reply if possible to   [EMAIL PROTECTED]
> > because I also don't get any link to my posting presented by google
> > groups. Also I can't see the url of the CakePHP group so to go there
> > directly instead of connecting by google groups.
>
> > Thx, Frank
>
> > Doing the first CakePHP tutorial when checking out the
>
> >http://www.example.com/posts/indexIget those error messages. Any
>
> > suggestions why + how to fix this ?
>
> > Warning:
>
> > file_put_contents(/var/www/vhosts/picmoweb.com/subdomains/dev/httpdocs/
> > app
>
> > /tmp/cache/models/default_cake_blog_tutorial_list)
>
> > [function.file-put-contents]: failed to open stream: Permission denied
> > in
>
> > /var/www/vhosts/picmoweb.com/subdomains/dev/httpdocs/cake/basics.php
> > on
>
> > line 936
>
> > Warning:
>
> > file_put_contents(/var/www/vhosts/picmoweb.com/subdomains/dev/httpdocs/
> > app
>
> > /tmp/cache/models/default_posts) [function.file-put-contents]: failed
> > to
>
> > open stream: Permission denied in
>
> > /var/www/vhosts/picmoweb.com/subdomains/dev/httpdocs/cake/basics.php
> > on
>
> > line 936- Hide quoted text -
>
> - Show quoted text -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



ORDER BY conundrum

2008-08-31 Thread seanislegend

OK, so I'm using Find to retrieve data as I need to set recursive to
1.

I've got a 'filter' form on my page which allows a user to sort how a
bands' shows are displayed. The choices are by band name, date and
location and either ascending or descending.

My problem is with ordering...when the user is choosing to order by
band name, I want to order by 'band,date ASC' (or descending if
selected) - otherwise it'll be simply 'date ASC' etc.

I can't find a way to do this...any ideas?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Migration from CakePHP 1.1.x to CakePHP 1.2.x - how to acces controller component from view?

2008-08-31 Thread Dardo Sordi Bogado

Also, for reading session values use the session helper, avoid
accessing controller/components in view, you certainly can push all de
data from the controller to the view. I'm no MVC cop, but try to keep
views clean.

On Thu, Aug 28, 2008 at 4:14 AM, Bernhard J. M. Grün
<[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> This is quite easy. It is just
> $account = $this->Session->read('Account');
>
>
> On 28 Aug., 07:35, Pizgin <[EMAIL PROTECTED]> wrote:
>> Hi! Before was
>>
>> $account = $this->controller->Session->read('Account');
>>
>> On CakePHP 1.2.x this not work. Have error:
>>
>> Undefined property:  View::$controller [APP/views/elements/cart.thtml,
>> line 3]
>>
>> Tell me please how i can acces to controller component from the view?
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best practice for plugin configuration

2008-08-31 Thread Dardo Sordi Bogado

I'm not using it in plugins right now, but in my apps I use a config like this:

APP/config/settings.php

 true,
'options' => array(


?>

Also I'm not aware of any convention about plugins config, but I would
choose a sepparated config file for every plugin, but it's just a
matter of taste, ex: APP/config/plugin.php

On Sun, Aug 31, 2008 at 5:16 PM, Filippo Toso
<[EMAIL PROTECTED]> wrote:
>
> On 31 Ago, 20:30, Filippo Toso <[EMAIL PROTECTED]> wrote:
>>
>> Is there a naming convention for the configuration fields?
>>
>> // /app/config/plugin_name.php:
>> > $config['Plugins']['PluginName']['config_field_1'] = true;
>> $config['Plugins']['PluginName']['config_field_2'] = false;
>> $config['Plugins']['PluginName']['config_field_3'] = 123;
>> ?>
>
> Probably the correct format is:
>
> // /app/config/plugin_name.php:
>  $config['Plugins.PluginName.config_field_1'] = true;
> $config['Plugins.PluginName.config_field_2'] = false;
> $config['Plugins.PluginName.config_field_3'] = 123;
> ?>
>
> Sincerely,
> Filippo Toso
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best practice for plugin configuration

2008-08-31 Thread Filippo Toso

On 31 Ago, 20:30, Filippo Toso <[EMAIL PROTECTED]> wrote:
>
> Is there a naming convention for the configuration fields?
>
> // /app/config/plugin_name.php:
>  $config['Plugins']['PluginName']['config_field_1'] = true;
> $config['Plugins']['PluginName']['config_field_2'] = false;
> $config['Plugins']['PluginName']['config_field_3'] = 123;
> ?>

Probably the correct format is:

// /app/config/plugin_name.php:


Sincerely,
Filippo Toso
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best practice for plugin configuration

2008-08-31 Thread Filippo Toso

Dear Dardo,

> Look at Configure::load().
>
> I would prefer to use good defaults if there is no plugin config
> loaded, and then have the plugin config in the app/config/plugin.php.

Thank you for the suggestion.

Is there a naming convention for the configuration fields?

Maybe something like this?

// /app/config/plugin_name.php:


Where 'PluginName' is the name of the plugin I'm going to create.

Is there another way to avoid possible name conflicts?

> The benefits are that if you need to change something, just need to
> create a config in the app config dir, so plugin code gets untouched
> and can be easily upgraded. Also all the app config get's stored in
> the same place.

That exactly what I'm searching for :)

Sincerely,
Filippo Toso

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: 404 Error When Accessing Controllers Using XAMPP

2008-08-31 Thread fabio . sfuncia

On Sun, Aug 31, 2008 at 6:24 PM, Wole <[EMAIL PROTECTED]> wrote:
>
> Thanks for the reply. I tried adding RewriteBase /myapp to app/
> webroot/.htaccess but no luck. I still get the same error. I'm not
> even sure mod_rewrite is working properly in XAMPP, because even if I
> make an error in a .htaccess file, say like purposefully misspelling
> RewriteBase, I don't get a 500 server error. I've followed all the
> suggested configurations from various forums and Websites but none
> seem to work. Any other suggestions? Thanks.

The problem is mod_rewrite or .htaccess?

Test in .htacces (webroot)
Deny from all

no forbidden? .htaccess is set correctly in httpd.conf?

 AccessFileName .htaccess


> On Aug 31, 7:10 am, [EMAIL PROTECTED] wrote:
>> Try to add
>> RewriteBase /myapp
>>
>> in app/webroot/.htaccess
>>
>> On Sun, Aug 31, 2008 at 12:26 PM, Wole <[EMAIL PROTECTED]> wrote:
>>
>> > So far I have successfully setup CakePHP using XAMPP on my Mac. I am
>> > able to view the main page for my application with the CSS working.
>> > Next I created a users table, user.php model, users_controller.php,
>> > and my views/users/index.ctp page. The problem is when I view
>> >http://localhost/myapp/usersin my browser I get a "404 Not Found"
>> > error. It says "The requested URL /myapp/users was not found on this
>> > server." But, if I view the "pretty url" version 
>> > athttp://localhost/myapp/index.php/users
>> > I can see the main page for the users controller.
>>
>> > I checked my httpd.conf file and everything looks right:
>>
>> > - I uncommented the LoadModule rewrite_module modules/mod_rewrite.so
>> > line
>>
>> > - I added the alias and directory information
>>
>> > Alias /myapp /Applications/xampp/xamppfiles/htdocs/myapp/app/webroot
>> > 
>> >AllowOverride All
>> >Options All
>> >Order allow,deny
>> >Allow from all
>> > 
>>
>> > - In the  section
>> > of httpd.conf I also changed
>>
>> > AllowOverride AuthConfig to read AllowOverride All
>>
>> > I'm not sure what I'm doing wrong here. I've tested my configuration
>> > on  MAMP but still the same problem. I would greatly appreciate it if
>> > anyone can help me out here. Thanks.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Best practice for plugin configuration

2008-08-31 Thread Dardo Sordi Bogado

Look at Configure::load().

I would prefer to use good defaults if there is no plugin config
loaded, and then have the plugin config in the app/config/plugin.php.

The benefits are that if you need to change something, just need to
create a config in the app config dir, so plugin code gets untouched
and can be easily upgraded. Also all the app config get's stored in
the same place.


-Dardo.

On Fri, Aug 29, 2008 at 6:56 PM, Filippo Toso
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm going to create an authentication plugin for Cake 1.2 (login/
> logout/registration/etc.).
>
> I would like to make it a bit customizable using a sort of
> configuration (i.e. use captcha, users model, etc.).
>
> Which is the best way to achieve this?
>
> A plugin doesn't have a bootstrap.php file that is loaded at startup.
> As far as I have understood, the only file where I can load a kind of
> "global plugin configuration" is the  plugin AppController class file.
> Maybe using a code like the following:
>
> // /app/plugins/auth/auth_app_controller.php:
> 
> require_once(dirname(__FILE__) . DS . 'config' . DS .
> 'bootstrap.php');
>
> class AuthAppController extends AppController {
> //...
> }
> ?>
>
> // /app/plugins/auth/config/bootstrap.php:
>  Configure::write(
>'AuthPlugin', array('use_captcha' => true,
>'require_verification' => false,
>'users_model', 'users')
>);
> ?>
>
> Is there a better way? Maybe using some constant instead of the
> Configure class. Is there another file that is loaded automagically by
> CakePHP when a plugin is loaded?
>
> Thank you for any suggestion.
>
> Sincerely,
> Filippo Toso
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: 404 Error When Accessing Controllers Using XAMPP

2008-08-31 Thread Wole

Thanks for the reply. I tried adding RewriteBase /myapp to app/
webroot/.htaccess but no luck. I still get the same error. I'm not
even sure mod_rewrite is working properly in XAMPP, because even if I
make an error in a .htaccess file, say like purposefully misspelling
RewriteBase, I don't get a 500 server error. I've followed all the
suggested configurations from various forums and Websites but none
seem to work. Any other suggestions? Thanks.

On Aug 31, 7:10 am, [EMAIL PROTECTED] wrote:
> Try to add
> RewriteBase /myapp
>
> in app/webroot/.htaccess
>
> On Sun, Aug 31, 2008 at 12:26 PM, Wole <[EMAIL PROTECTED]> wrote:
>
> > So far I have successfully setup CakePHP using XAMPP on my Mac. I am
> > able to view the main page for my application with the CSS working.
> > Next I created a users table, user.php model, users_controller.php,
> > and my views/users/index.ctp page. The problem is when I view
> >http://localhost/myapp/usersin my browser I get a "404 Not Found"
> > error. It says "The requested URL /myapp/users was not found on this
> > server." But, if I view the "pretty url" version 
> > athttp://localhost/myapp/index.php/users
> > I can see the main page for the users controller.
>
> > I checked my httpd.conf file and everything looks right:
>
> > - I uncommented the LoadModule rewrite_module modules/mod_rewrite.so
> > line
>
> > - I added the alias and directory information
>
> > Alias /myapp /Applications/xampp/xamppfiles/htdocs/myapp/app/webroot
> > 
> >    AllowOverride All
> >    Options All
> >    Order allow,deny
> >    Allow from all
> > 
>
> > - In the  section
> > of httpd.conf I also changed
>
> > AllowOverride AuthConfig to read AllowOverride All
>
> > I'm not sure what I'm doing wrong here. I've tested my configuration
> > on  MAMP but still the same problem. I would greatly appreciate it if
> > anyone can help me out here. Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: DESCRIBE happening too often

2008-08-31 Thread Dardo Sordi Bogado

All that describes (and other stuff) are chached in debug level 0, so
check yur app/config/core.php settings and by the way reading the
manual (http:://manual.cakephp.org) doesn't hurt.

On Fri, Aug 29, 2008 at 3:54 PM, cmbg <[EMAIL PROTECTED]> wrote:
>
> Hi all --
>
> I have tried to manually define the schema in the models -- i.e.,
>
> class MyModel extends AppModel {
>var $name = 'MyModel ';
>
>var $_schema = array(
>'id'=> array('type' => 'integer', 'null' => '', 'default' => 
> '1',
> 'length' => '8', 'key'=>'primary'),
>'name'=>array('type'=>'string', 'null'=>'', 'default'=>'',
> 'length'=>'50'),
>'created'=> array('type' => 'date', 'null' => '1', 'default' 
> => '',
> 'length' => ''),
>'modified'=> array('type' => 'datetime', 'null' => '1', 
> 'default' =>
> '', 'length' => null)
>);
> }
>
> but every page view always brings up first the auth tables (aros,
> acos, aros_acos) and then every table that I use in the controller
> even if the view isn't requiring that table... in some cases up to 20+
> tables.  My DBA doesn't like this at all performance wise.  I've
> looked at the bakery and other cakephp docs but haven't found an
> answer and I'd really like to stop this from happening...
>
> Thanks,
> bg
>
>
> -- Forwarded message --
> From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> Date: Dec 18 2007, 2:56 am
> Subject: DESCRIBE happening too often
> To: CakePHP
>
>
> As far as I know, the describe should not occur if there is is a
> schema defined for the database tables. The new console in 1.2 should
> generate this automatically when you create a new model with 'cake
> bake'. I haven't tried it yet cause i can't find those bloody minutes
> but i can't postpone it much longer. If you do happen to find a
> solution until then please let me know too. I would appreciate it.
>
> Thanks,
> Cristian
>
> On Dec 16, 5:26 am, "Olexandr Melnyk" <[EMAIL PROTECTED]> wrote:
>
>> SHOW PROCESSLIST
>
>> On 12/14/07, Grant Cox <[EMAIL PROTECTED]> wrote:
>
>> > How are you checking that you are getting a lot of DESCRIBE queries
>> > with DEBUG set to 0?
>
>> > On Dec 14, 7:09 am, "Olexandr Melnyk" <[EMAIL PROTECTED]> wrote:
>> > > Hello bakers,
>
>> > > in one of applications I'm working on, I have noticed DESCRIBE queries
>> > being
>> > > executed on every page for all used models. With a load of page views,
>> > this
>> > > only creates problems.
>
>> > > As far as I know, such queries should be cached if
>> > > application is in production (DEBUG = 0), but I still get them quite
>> > > often. I have cheched /app/tmp/ directory permissions, and they are set
>> > to 777.
>
>> > > I am using CakePHP 1.1
>
>> > > I don't know if CakePHP's cache expires after a number of pageviews
>> > since
>> > > last update or after a set
>> > > period of time, but is there a way to extend its lifetime?
>
>> > > Thanks
>
>> > > --
>> > > Sincerely yours,
>> > > Olexandr Melnyk <>
>> --
>> Sincerely yours,
>> Olexandr Melnykhttp://omelnyk.net/
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Reporting solution for CakePHP

2008-08-31 Thread Alex Seim

Hello,

I would like to know if anyone has any reporting solution to suggest
that works well with cake (like Crystal Reports or something)

thanx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem with FCKEditor

2008-08-31 Thread Warringer

I want to add the FCKEditor to a Cake project.

But with every FCKHelper I use, I run into the same problem...

It appear to work, however the FCKEditor does not load correctly. The
iframe does appear, but the fckeditor.html is not loaded.

Apparently it does not exist...

Looking at it with Firebug, I get two GET requests for the
fckeditor.html on two different locations, that obviously are not
going to get the file.

First location:

http://localhost/js/fckeditor/editor/fckeditor.html?InstanceName=data[MediaCoverage][content]&Toolbar=Default

Response:



404 Not Found

Not Found
The requested URL /js/fckeditor/editor/fckeditor.html was not found
on this server.

Apache/2.2.9 (Unix) DAV/2 mod_ssl/2.2.9 OpenSSL/0.9.8h PHP/
5.2.6 mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 Server at
localhost Port 80


Second location:

http://localhost/opt/lampp/htdocs/xampp/www/workspace/CakeMSC/app/webroot/js/fckeditor/editor/fckeditor.html?InstanceName=data[MediaCoverage][content]&Toolbar=Default

Response:



404 Not Found

Not Found
The requested URL /opt/lampp/htdocs/xampp/www/workspace/CakeMSC/app/
webroot/js/fckeditor/editor/fckeditor.html was not found on this
server.

Apache/2.2.9 (Unix) DAV/2 mod_ssl/2.2.9 OpenSSL/0.9.8h PHP/
5.2.6 mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 Server at
localhost Port 80


Worse, the source of the iframe points at the correct location. And I
can try as I want, with different ways to get the location, I always
get those two GET requests...



Please someone help me...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



using javascript with form element

2008-08-31 Thread assaggaf

i wanna to know how to make event for  simple input



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Pagination question about filtered views

2008-08-31 Thread teknoid

Try (in the view):$paginator->options(array('url' => $this-
>passedArgs));

see manual for more details.

On Aug 31, 7:35 am, itsnotvalid <[EMAIL PROTECTED]> wrote:
> but seems that $paginator->numbers() still doesn't give the right
> result after changing the option.
>
> On Aug 25, 12:59 am, clemos <[EMAIL PROTECTED]> wrote:
>
> > Hi
>
> > You need to set the "url" option of the paginator, by writing this
> > kind of code on top of your view (before the paginator links are
> > generated)
> > options(array("url"=>"/categories/view/".$category_id)); ?>
>
> > +++
> > Clément
>
> > On Sun, Aug 24, 2008 at 6:33 PM,itsnotvalid<[EMAIL PROTECTED]> wrote:
>
> > > I have made an app using pagination. Recently I discovered that the
> > > links generated isn't valid for some use.
> > > e.g.http://example.com/categories/view/1isthe page refering to
> > > using 'categories' controller's 'view' action, listing information for
> > > category_id = 1.
>
> > > Now I want to apply pagination for this page, using $paginator-
> > >>next(), but the link points tohttp://example.com/categories/view/page:2
> > > which is not what I really wanted. What I want is something like
> > >http://example.com/categories/view/1/page:2.
>
> > > How can I achieve this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Auth - can't login

2008-08-31 Thread Jeroen

No I didn't have.
Thanks! Problem solved!
What a stupid mistake


On 31 aug, 02:35, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> Has your user table a field called `username` ?
>
> On Sat, Aug 30, 2008 at 6:00 PM, Jeroen <[EMAIL PROTECTED]> wrote:
>
> > I followed the instructions 
> > onhttp://book.cakephp.org/view/172/authentication
> > to create a login. The problem is that I get the following error when
> > I try to login:
> > SQL Error: 1054: Unknown column 'User.username' in 'where clause' [CORE
> > \cake\libs\model\datasources\dbo_source.php, line 512]
>
> > Cake (Auth) searches for the wrong table to login, it need to search
> > for the table Users instead of User.
> > I'm using Cake version 1.2.0.7296 RC2.
>
> > I use the following code:
> > class AppController extends Controller {
> >        var $components = array('Auth');
>
> >        function beforeFilter(){
> >                $this->Auth->loginAction = 
> > array(Configure::read('Routing.admin') =>
> > false, 'controller' => 'users', 'action' => 'login');
> >                $this->Auth->allow('index','view');
> >        }
>
> > }
>
> > Login view:
> >  > if ($session->check('Message.auth')) $session->flash('auth');
> >        echo $form->create('User',array('action' => 'login'));
> >        echo $form->input('username');
> >        echo $form->input('password');
> >        echo $form->end('Login');
> > ?>
>
> >  > class UsersController extends AppController {
>
> >        var $name = 'Users';
> >        var $helpers = array('Html', 'Form', 'Session' );
>
> >        /**
> >        * The AuthComponent provides the needed functionality
> >        * for login, so you can leave this function blank.
> >        */
> >        function login() {
> >        }
>
> >        function logout() {
> >                $this->redirect($this->Auth->logout());
> >        }
>
> > }
> > ?>
>
> > I tried the following things:
> > 1. echo $form->create('Users',array('action' => 'login')); instead of
> > echo $form->create('User',array('action' => 'login'));, but then Auth
> > wopn't do anything at all. Comparing to other views the syntax echo
> > $form->create('User',array('action' => 'login')); should be the
> > correct synax.
> > 2. Searching the Internet if anyone else had the same problem, but I
> > can't find anyone with the same problem.
>
> > Three questions
> > 1. Is this a bug of CakePHP 1.2.0.7296 RC2 or am I doing something
> > wrong?
> > 2. Is there amnyone else who uses the Auth-component successfully in
> > version 1.2.0.7296 RC2?
> > 3. The most important: anyone has a solution or got an idea?? :)
>
> > Thanks,
>
> > Jeroen

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Pagination question about filtered views

2008-08-31 Thread itsnotvalid

but seems that $paginator->numbers() still doesn't give the right
result after changing the option.

On Aug 25, 12:59 am, clemos <[EMAIL PROTECTED]> wrote:
> Hi
>
> You need to set the "url" option of the paginator, by writing this
> kind of code on top of your view (before the paginator links are
> generated)
> options(array("url"=>"/categories/view/".$category_id)); ?>
>
> +++
> Clément
>
> On Sun, Aug 24, 2008 at 6:33 PM,itsnotvalid<[EMAIL PROTECTED]> wrote:
>
> > I have made an app using pagination. Recently I discovered that the
> > links generated isn't valid for some use.
> > e.g.http://example.com/categories/view/1is the page refering to
> > using 'categories' controller's 'view' action, listing information for
> > category_id = 1.
>
> > Now I want to apply pagination for this page, using $paginator-
> >>next(), but the link points tohttp://example.com/categories/view/page:2
> > which is not what I really wanted. What I want is something like
> >http://example.com/categories/view/1/page:2.
>
> > How can I achieve this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: 404 Error When Accessing Controllers Using XAMPP

2008-08-31 Thread fabio . sfuncia

Try to add
RewriteBase /myapp

in app/webroot/.htaccess



On Sun, Aug 31, 2008 at 12:26 PM, Wole <[EMAIL PROTECTED]> wrote:
>
> So far I have successfully setup CakePHP using XAMPP on my Mac. I am
> able to view the main page for my application with the CSS working.
> Next I created a users table, user.php model, users_controller.php,
> and my views/users/index.ctp page. The problem is when I view
> http://localhost/myapp/users in my browser I get a "404 Not Found"
> error. It says "The requested URL /myapp/users was not found on this
> server." But, if I view the "pretty url" version at 
> http://localhost/myapp/index.php/users
> I can see the main page for the users controller.
>
> I checked my httpd.conf file and everything looks right:
>
> - I uncommented the LoadModule rewrite_module modules/mod_rewrite.so
> line
>
> - I added the alias and directory information
>
> Alias /myapp /Applications/xampp/xamppfiles/htdocs/myapp/app/webroot
> 
>AllowOverride All
>Options All
>Order allow,deny
>Allow from all
> 
>
> - In the  section
> of httpd.conf I also changed
>
> AllowOverride AuthConfig to read AllowOverride All
>
> I'm not sure what I'm doing wrong here. I've tested my configuration
> on  MAMP but still the same problem. I would greatly appreciate it if
> anyone can help me out here. Thanks.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



404 Error When Accessing Controllers Using XAMPP

2008-08-31 Thread Wole

So far I have successfully setup CakePHP using XAMPP on my Mac. I am
able to view the main page for my application with the CSS working.
Next I created a users table, user.php model, users_controller.php,
and my views/users/index.ctp page. The problem is when I view
http://localhost/myapp/users in my browser I get a "404 Not Found"
error. It says "The requested URL /myapp/users was not found on this
server." But, if I view the "pretty url" version at 
http://localhost/myapp/index.php/users
I can see the main page for the users controller.

I checked my httpd.conf file and everything looks right:

- I uncommented the LoadModule rewrite_module modules/mod_rewrite.so
line

- I added the alias and directory information

Alias /myapp /Applications/xampp/xamppfiles/htdocs/myapp/app/webroot

AllowOverride All
Options All
Order allow,deny
Allow from all


- In the  section
of httpd.conf I also changed

AllowOverride AuthConfig to read AllowOverride All

I'm not sure what I'm doing wrong here. I've tested my configuration
on  MAMP but still the same problem. I would greatly appreciate it if
anyone can help me out here. Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: failed to open stream: Permission denied ...

2008-08-31 Thread David Persson

Hi Frank,

Try flushing your caches by deleting the files in ../app/tmp/
cache/(models|persistent|views) directory. The cache files are
sometimes written with wrong file permissions if you execute bake (or
any other shell) prior to visiting one of your app's pages via
browser.  This way the cache files belong to the user which executed
the shell and are readable/writable by the apache user.

Also see:
http://groups.google.com/group/cake-php/browse_thread/thread/c70af5d64315748b/46ff391c8d279c1b?lnk=gst&q=permission+denied#46ff391c8d279c1b

for more info on how to disable caching in shells.

- David

On Aug 31, 7:04 am, xfh <[EMAIL PROTECTED]> wrote:
> I thought I added this posting already by google groups, but it didn't
> show up anywhere again, so I post it new ... it also didn't forward to
> my e-mail and I guess it still won't with this new posting. Please
> send me a link to your reply if possible to   [EMAIL PROTECTED]
> because I also don't get any link to my posting presented by google
> groups. Also I can't see the url of the CakePHP group so to go there
> directly instead of connecting by google groups.
>
> Thx, Frank
>
> Doing the first CakePHP tutorial when checking out the
>
> http://www.example.com/posts/indexI get those error messages. Any
>
> suggestions why + how to fix this ?
>
> Warning:
>
> file_put_contents(/var/www/vhosts/picmoweb.com/subdomains/dev/httpdocs/
> app
>
> /tmp/cache/models/default_cake_blog_tutorial_list)
>
> [function.file-put-contents]: failed to open stream: Permission denied
> in
>
> /var/www/vhosts/picmoweb.com/subdomains/dev/httpdocs/cake/basics.php
> on
>
> line 936
>
> Warning:
>
> file_put_contents(/var/www/vhosts/picmoweb.com/subdomains/dev/httpdocs/
> app
>
> /tmp/cache/models/default_posts) [function.file-put-contents]: failed
> to
>
> open stream: Permission denied in
>
> /var/www/vhosts/picmoweb.com/subdomains/dev/httpdocs/cake/basics.php
> on
>
> line 936
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: it would be helpfull if you could post the solution

2008-08-31 Thread RichardAtHome

CakePHP is very clever, but it doesn't have a mind reading module
(yet).

Give us some details please :-)

On Aug 30, 12:04 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I read the manual and the ibm code and they are the same. How did you
> solve the problem ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: please help me with the set class

2008-08-31 Thread MarcS

thank you very much, works like a charm.

Too bad that there is no way to have the people not be indexed by
their ids but just starting with zero though
But for most cases this is fine

On Aug 26, 10:51 am, grigri <[EMAIL PROTECTED]> wrote:
> Set::combine($data, '{n}.Person.id', '{n}', '{n}.Person.group_id');
>
> Note that the people will be indexed by their ids, but that shouldn't
> be a problem.
>
> hth
> grigri
>
> On Aug 25, 3:14 pm, MarcS <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have the following data
>
> >   0: array =
> >     Person: array =
> >       id: long = 1
> >       name: string = "n1"
> >       group_id: long = 1
> >   1: array =
> >     Person: array =
> >       id: long = 2
> >       name: string = "n2"
> >       group_id: long = 1
> >   2: array =
> >     Person: array =
> >       id: long = 3
> >       name: string = "n3"
> >       group_id: long = 2
>
> > What I would like an array that is grouped by the group_id
> > The result should be
> >   1: array =
> >       0: array =
> >           Person: array =
> >           id: long = 1
> >           name: string = "n1"
> >           group_id: long = 1
> >     1: array =
> >         Person: array =
> >         id: long = 2
> >         name: string = "n2"
> >         group_id: long = 1
> >   2: array =
> >      0: array =
> >        Person: array =
> >        id: long = 3
> >        name: string = "n3"
> >        group_id: long = 2
>
> > Is that possible to do with the set class?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: saveAll with 'validate' => 'first' has problems

2008-08-31 Thread hansashish

Would like to add that since the 'dob' field is not in the data that I
am tying to save, and it is not marked as 'required', Why should
Model::saveAll( $data, array ('validate' => 'first')) give an error on
this?

Also, if you try -
Model::saveAll( $data) without the validate option,  it does not give
any validation error...

So, it sure does seem to be a bug to me?

Can somebody shed light on this...


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



having trouble to initiate any posts in the CakePHP group

2008-08-31 Thread xfh

Hi,
I'm having trouble to initiate any posts in the CakePHP group.


I thought I added a posting already by google groups, but it didn't

show up anywhere again ... it also didn't forward to my

e-mail and I guess it still won't with this new test posting. Please
send me a

link to your reply if possible to[EMAIL PROTECTED] because I
also

don't get any link to my posting presented by google groups. Also I
can't

see the url of the CakePHP group so to go there directly instead of

connecting by google groups.

Thx, Frank

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



failed to open stream: Permission denied ...

2008-08-31 Thread xfh

I thought I added this posting already by google groups, but it didn't
show up anywhere again, so I post it new ... it also didn't forward to
my e-mail and I guess it still won't with this new posting. Please
send me a link to your reply if possible to[EMAIL PROTECTED]
because I also don't get any link to my posting presented by google
groups. Also I can't see the url of the CakePHP group so to go there
directly instead of connecting by google groups.

Thx, Frank



Doing the first CakePHP tutorial when checking out the

http://www.example.com/posts/index I get those error messages. Any

suggestions why + how to fix this ?


Warning:

file_put_contents(/var/www/vhosts/picmoweb.com/subdomains/dev/httpdocs/
app

/tmp/cache/models/default_cake_blog_tutorial_list)

[function.file-put-contents]: failed to open stream: Permission denied
in

/var/www/vhosts/picmoweb.com/subdomains/dev/httpdocs/cake/basics.php
on

line 936

Warning:

file_put_contents(/var/www/vhosts/picmoweb.com/subdomains/dev/httpdocs/
app

/tmp/cache/models/default_posts) [function.file-put-contents]: failed
to

open stream: Permission denied in

/var/www/vhosts/picmoweb.com/subdomains/dev/httpdocs/cake/basics.php
on

line 936



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: nested condition

2008-08-31 Thread haj

yeah, i figured out that later. Only, "NOT sth IN ('a', 'b')" was
kinda unnatural to me in the mind of SQL,  i was used to "sth NOT
IN('a','b')" way.


On Aug 30, 9:11 pm, Rafael Bandeira aka rafaelbandeira3
<[EMAIL PROTECTED]> wrote:
> > Only, unfortunately, I found out cake can't yeild expression like:
>
> > sth NOT IN('a','b')
>
> Yes it can, use
>
> 'not' => array('sth' => array('a', 'b'))
> 
> And you could write those conditions like this
>
> > 'conditions'=>array(
> >   array( 'or' => array(
> >       array('Report.user_id' => $user_id),
> >      array('Report.user_id2' => $user_id)
> >  )),
> >  array('or'=>array(
> >           array('Report.del_flg' => 0),
> >           array('Report.status <>' => array('6s', '6r'))
> >  ))
> > )
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Changes to home.ctp and default.ctp Not Displaying

2008-08-31 Thread Wole

I recently downloaded the nightly version of CakePHP. Everything has
been setup and looks like it's working. When I go to the main page I
see the setup messages and each one is green so I know everything is
setup and good to go. The problem I have is changing the home.ctp and
layout.ctp pages. When I go to the app/views/pages/ directory I don't
see a home.ctp file. Same with app/views/layouts/ I don't see a
default.ctp. So, I create a home.ctp file and edit it but there is no
change when I reload the Webpage. Same thing goes for the layout, no
changes after reload. Is there something I'm missing here? I'm testing
my Web application using XAMPP on a Mac. Any help is appreciated.
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



No home.cpt or defualt.cpt Files in app Folder

2008-08-31 Thread Wole

I recently downloaded the nightly version of CakePHP. Everything has
been setup and looks like it's working. When I go to the main page I
see the setup messages and each one is green so I know everything is
setup and good to go. The problem I have is changing the home.cpt and
layout.cpt pages. When I go to the app/views/pages/ directory I don't
see a home.cpt file. Same with app/views/layouts/ I don't see a
default.cpt. So, I create a home.cpt file and edit it but there is no
change when I reload the Webpage. Same thing goes for the layout, no
changes after reload. Is there something I'm missing here? I'm testing
my Web application using XAMPP on a Mac. Any help is appreciated.
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---