SQLite, CakePHP, and "database is locked" errors

2006-07-19 Thread Lokkju

This is just a quick note to anyone who is trying to get sqlite to work
with CakePHP.  If you are getting "database is locked" error when
trying to insert data, check your PHP version.  Anything less then PHP
5.1.3RC3 has a bug in thw sqlite driver code that will lock it after
performing specific calls, can cakephp just happens to call one of
those functions.

After upgrading to 5.1.4, every thing is soved - don;t know what to
tell those of you in hosting environments with a lower php version
though...


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Getting scaffolding to work in /admin

2006-07-19 Thread John Zimmerman [gmail]
Baking your controllers for the admin section would be the best solution.You will get the main funcitonality of scaffolds which can then be customized to create a proper admin interface and change over time.
Even if it worked, if you rely on scaffolding for any part of your site that is not temporary, the next release of Cake could produce slightly different scaffolding which completely breaks what you were relying on for the admin interface
There is a reason not to rely on scaffolding for anything other than initial development.On 7/19/06, [EMAIL PROTECTED]
 <[EMAIL PROTECTED]> wrote:
Hey guys,I've done a search and can't seem to find anything concrete on how toget the scaffolding working for models when using the CAKE_ADMINsetting.I've seen 
https://trac.cakephp.org/ticket/327 and phpNut, I take yourpoint about scaffolding not being suitable for production but in someinstances, it would be really handy.So, if this is not possible, should I use the 
bake.php script andcreate the everything that way?Sorry, I'm still just learning about everything and I'm still sussingout best practices.Best Regards,Ryno
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" 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  -~--~~~~--~~--~--~---


Getting scaffolding to work in /admin

2006-07-19 Thread [EMAIL PROTECTED]

Hey guys,

I've done a search and can't seem to find anything concrete on how to
get the scaffolding working for models when using the CAKE_ADMIN
setting.

I've seen https://trac.cakephp.org/ticket/327 and phpNut, I take your
point about scaffolding not being suitable for production but in some
instances, it would be really handy.

So, if this is not possible, should I use the bake.php script and
create the everything that way?

Sorry, I'm still just learning about everything and I'm still sussing
out best practices.

Best Regards,
Ryno


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



How to stop ajax submition?

2006-07-19 Thread Daniel King

I want to use javascript to validate some fields before I submit an
ajax form. How?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: file download problem in cakephp

2006-07-19 Thread John David Anderson (_psychic_)


On Jul 19, 2006, at 4:23 PM, srini wrote:

> 
> This cakephp method does not work. It is prefixing  '\r\n' charecters
> at the bigining of the downloaded file. So I cannot open image, pdf,
> doc file.
> I wasted a lot of time trying to figure out this problem.
> Please suggest a work around. I really appreciate your help.

You might try to add:

$this->autoRender = false;

To the action. You might also want to set the layout for the action  
to something that is empty (such as the Ajax layout) just in case by  
doing

$this->layout = 'ajax';

See if that helps any.

-- John

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: securing data by saving User id with each record

2006-07-19 Thread John David Anderson (_psychic_)


On Jul 19, 2006, at 5:05 PM, [EMAIL PROTECTED] wrote:
> I'm not sure if Cake does anything to mitigate this risk, or how much
> of a risk it actually is.  I'd like to hear more about it myself, if
> someone is more knowledgeable about how sessions work.

Set CAKE_SECURITY to 'high' in core.php to have the session ID  
regenerated between requests. This makes it much harder for someone  
to hijack sessions.

Besides this, I'm pretty sure there are php.ini settings that help in  
avoiding hijack problems (trans_sid comes to mind). If the ID can  
only come from the cookie, it would be harder to hijack.

-- John

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: securing data by saving User id with each record

2006-07-19 Thread [EMAIL PROTECTED]

You wrote:

"i´m not sure if using the user id is save enough. could it be
possible
that someone changes the cookie value to another user id ? or does the
session somehow provides security to this? "

I thought it was relatively safe; however, I did find a site that
suggested otherwise:

http://www.sitepoint.com/article/php-security-blunders

"Session ID hijacking can be a problem with PHP Websites. The PHP
session tracking component uses a unique ID for each user's session,
but if this ID is known to another user, that person can hijack the
user's session and see information that should be confidential. Session
ID hijacking cannot completely be prevented; you should know the risks
so you can mitigate them.

For instance, even after a user has been validated and assigned a
session ID, you should revalidate that user when he or she performs any
highly sensitive actions, such as resetting passwords. Never allow a
session-validated user to enter a new password without also entering
their old password, for example. You should also avoid displaying truly
sensitive data, such as credit card numbers, to a user who has only
been validated by session ID."

I'm not sure if Cake does anything to mitigate this risk, or how much
of a risk it actually is.  I'd like to hear more about it myself, if
someone is more knowledgeable about how sessions work.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Turn off Cake processing for a file via view

2006-07-19 Thread I. E. Smith-Heisters

Yes, that does work! And it works better than my script, since it was
getting a false mime-type for .tar.gz files. So what I've actually done
is something like this:

/files : contains files
/html/ : DocumentRoot
/html/app/views/resources/files : -> symlink to /files
/html/app/webroot/archive : -> symlink to /files (since webroot/files
already existed)

Then a simple
$this->controller->redirect("/archive/$location");
in the view file makes things downloadable.

Thanks again.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



file download problem in cakephp

2006-07-19 Thread srini

Hi,

I got the following stand alone php script working for file downloads:




I copied the code and created a new method in a cakephp controller:

function download2()
{
$file = "C:\\test\\asinglerose8ev.gif";

$basename = basename($file);

$file_extension = strtolower(substr(strrchr($basename,"."),1));

if (!file_exists($file))
{
print "ERROR: File not found. $basename";
exit;
}
else {
switch($file_extension)
{
case "PLS": $ctype="audio/x-scpls"; break;
case "pls": $ctype="audio/x-scpls"; break;
case "pdf": $ctype="application/pdf"; break;
case "exe": $ctype="application/octet-stream"; break;
case "zip": $ctype="application/zip"; break;
case "doc": $ctype="application/msword"; break;
case "xls": $ctype="application/vnd.ms-excel"; break;
case "ppt": $ctype="application/vnd.ms-powerpoint"; 
break;
case "gif": $ctype="image/gif"; break;
case "png": $ctype="image/png"; break;
case "jpeg":
case "jpg": $ctype="image/jpg"; break;
default: $ctype="application/force-download";
}

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, 
pre-check=0");
header("Cache-Control: private",false); // required for certain
browsers
header("Content-Type: $ctype");
header("Content-Disposition: attachment; 
filename=\"$basename\";" );
header("Content-Transfer-Encoding: binary");
readfile($file);
exit();
}
}


This cakephp method does not work. It is prefixing  '\r\n' charecters
at the bigining of the downloaded file. So I cannot open image, pdf,
doc file.
I wasted a lot of time trying to figure out this problem.
Please suggest a work around. I really appreciate your help.

Thanks
Srini


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: requestAction() causing infinite loop in AppController->beforeFilter()

2006-07-19 Thread DJ Spark

On 7/19/06, nate <[EMAIL PROTECTED]> wrote:

> (3) Or, make isLoggedIn a private method (prefixed with '_' of
> AppController, so you could call $this->_isLoggedIn() instead of using
> requestAction, which is slower, and largely pointless in your case.
>
maaannn, the things we learn here, make life much more beatiful

-- 
[web] http://synapsisdi.com.br
[livesets] http://djspark.com.br

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: trying to create a form builder

2006-07-19 Thread John Zimmerman [gmail]
I haven't looked at it too closely lately but WebsiteBaker has a sort of form builder that might be helpful in answering some design questions.It is nothing fancy but it lets you define as many fields as you want.
On 7/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Any progress on this? I am facing the same problem.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" 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  -~--~~~~--~~--~--~---


Re: CakePHP 1.1.6.3264 Released

2006-07-19 Thread [EMAIL PROTECTED]

Thanks guys, Got it to work, I just used the entire new cake folder and
replaced the app folder with mine.

Thanks for the help!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: CakePHP getDisplayField() usage

2006-07-19 Thread bracchetto

if you specify the var $displayField = 'myfield' in your model, then
when there is an association with this model, instead of show the id it
will show 'myfield'.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: trying to create a form builder

2006-07-19 Thread [EMAIL PROTECTED]

Any progress on this? I am facing the same problem.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



CakePHP getDisplayField() usage

2006-07-19 Thread 379 the manifesto

Could anyone enlighten me about CakePHP's getDisplayField() please?

Is it just a shorthand function that allows other Model's to access the
field name?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: CakePHP 1.1.6.3264 Released

2006-07-19 Thread John Zimmerman [gmail]
First thing you should do when upgrading from 1.0 is replace your .htaccess files and the index.php files in your /app directory with the ones from the new /app directory.Then compare your files in /app/config with the new ones and make changes as necessary, usually replacing your file with the one fro m the new installation and then adding your modifications to the new file.
Then you will have to troubleshoot any other errors that come up.On 7/19/06, [EMAIL PROTECTED]
 <[EMAIL PROTECTED]> wrote:
>From 1.0.0.2378. Sorry I forgot to search, will have a look now.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" 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  -~--~~~~--~~--~--~---


Re: CakePHP 1.1.6.3264 Released

2006-07-19 Thread John Zimmerman [gmail]
I just upgraded from 1.1.5 to 1.1.6 and had no problems.Here is what I did...Back up my /app directory outside of my webroot.Delete the contents of my webroot AFTER backing up /app somewhere else.
Extract the new cake version into my webrootDouble check to make sure the .htaccess files are actually there.Rename the /app that came with the new version of cake to app.stock
Move my originall /app directory back into the webroot where it was before I backed it up.Everything came up just fine for me.You might check to make sure that you have all the .htaccess files in the appropriate places after upgrade
/.htaccess/app/.htaccess/app/webroot/.htaccessHTHOn 7/19/06, [EMAIL PROTECTED]
 <[EMAIL PROTECTED]> wrote:
I tried just replacing the cake folder, but I get countless errors andcake cannot find my models. I am using my old app_controller andapp_model files, so I can't think where the problem is.Larry E. Masters aka PhpNut wrote:
> > Way to go...progress is fast around here! Can I upgrade from 1.1.5.3148> > by simply replacing the /cake directory?>>> Yes, it is that simple --
> /**> * @author Larry E. Masters> * @var string $userName> * @param string $realName> * @returns string aka PhpNut> * @access  public> */>> --=_Part_46420_22845335.1152933668403
> Content-Type: text/html; charset=ISO-8859-1> X-Google-AttachSize: 508>> Way to go...progress is fast around here! Can I upgrade from 1.1.5.3148by simply replacing the /cake directory?> Yes, it is that simple -- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @access  public
> */>> --=_Part_46420_22845335.1152933668403--

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" 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  -~--~~~~--~~--~--~---


Re: CakePHP 1.1.6.3264 Released

2006-07-19 Thread [EMAIL PROTECTED]

>From 1.0.0.2378. Sorry I forgot to search, will have a look now.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: CakePHP 1.1.6.3264 Released

2006-07-19 Thread gwoo

What version are you upgrading from?
There have been a couple of recent threads on upgrading.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Set table prefix depending on what user is logged in?

2006-07-19 Thread nate

> The point of having two different configurations is that the models
> using the default configuration won't be affected by the reconnect call
> below. Is that correct?

Yeah, I sort of assumed you had two different sets of models.  One
general, and one user-specific.

> This should be placed in a controller, right? Can this be executed even
> if the current model doesn't and shouldn't use the $user configuration
> and the custom prefix?

Yes, it should be in the controller, and yes, it can be executed even
if the current model doesn't use it, since the model's $useDbConfig
will be set to the default database, and therefore unaffected.

> Now let me explain my current problem:
> Let's say that i, for example, have two user-specific tables, with the
> prefix "prefix_", called "prefix_table1" and "prefix_table2". When
> doing like you said, Cake tells me that the tables "table1" and
> "table2" (without the prefixes) are missing and have to be created.

Okay, you have one of two options here.  You can either set $uses =
null in your controller, and instantiate your models manually *after*
you do the reconnect; or, you can setup an extra copy of all your
tables with no prefixes.

> I tried to create those tables just to see if that could make it work,
> but then the tables without prefixes are used, instead of the ones with
> prefixes.

Right, that'll happen.  You have to call reconnect *before* actually
using the user-specific models.

> Then i removed those again and tried to add this in every model using
> user-specific tables:
> var $useTable = false;
> I did this to stop cake from reading tables until i did the reconnect,
> but that only gave me a bunch of notices, warnings and errors.

Yeah, you don't want to do that.  Personally, I'd just create the
default (empty) tables, and reconnect before using the model.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: CakePHP 1.1.6.3264 Released

2006-07-19 Thread [EMAIL PROTECTED]

I tried just replacing the cake folder, but I get countless errors and
cake cannot find my models. I am using my old app_controller and
app_model files, so I can't think where the problem is.


Larry E. Masters aka PhpNut wrote:
> > Way to go...progress is fast around here! Can I upgrade from 1.1.5.3148
> > by simply replacing the /cake directory?
>
>
> Yes, it is that simple
>
>
>
> --
> /**
> * @author Larry E. Masters
> * @var string $userName
> * @param string $realName
> * @returns string aka PhpNut
> * @access  public
> */
>
> --=_Part_46420_22845335.1152933668403
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 508
>
> Way to 
> go...progress is fast around here! Can I upgrade from 1.1.5.3148by simply 
> replacing the /cake directory?
> Yes, it is that simple  clear="all">-- /*** @author Larry E. Masters* @var string 
> $userName* @param string $realName* @returns string aka PhpNut* 
> @access  public
> */ 
> 
> --=_Part_46420_22845335.1152933668403--


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: requestAction() causing infinite loop in AppController->beforeFilter()

2006-07-19 Thread nate

Couple things you could do here:

(1) Change $this->action != 'login' to !in_array($this->action,
array('login', 'isLoggedIn'))
(2) Or better yet, move the isLoggedIn( ) check to the beforeFilter
itself, since that should be the only place you'd need it.
(3) Or, make isLoggedIn a private method (prefixed with '_' of
AppController, so you could call $this->_isLoggedIn() instead of using
requestAction, which is slower, and largely pointless in your case.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



securing data by saving User id with each record

2006-07-19 Thread georgeL

I looked into the acl classes but i´m not sure if i should use that.
the additional 3 db queries might be a slow down and i don´t need
rights/group inheritance right now.

i´m thinking if using the following setup instead and maybe someone
can give me a feedback or hint of this is ok.

- each table has an extra field named user_id
- after the login the user id is saved in the session
- the app_controller checks for the session hash (like in the tutorial)
- app_controller has an extra function which returns the user_id from
the session, so it is available in each class ( function userId()  )
- the editpages have a hidden field which is populated with the current
user ID and so saved with the record.
- when reading records im using findAll with a condition:

$this->Customer->findAll('Customer.user_id
='.$this->userId(),null,'last_name ASC')

i´m not sure if using the user id is save enough. could it be possible
that someone changes the cookie value to another user id ? or does the
session somehow provides security to this?
Another approach could be the generation of a persistent hash for each
user saved in the user table.

How could a before filter in each controller look like, so  the check
for the right records would not have to be in each crud function?

thanks for ideas and input.

george


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Hosting (i.e. Dreamhost)

2006-07-19 Thread [EMAIL PROTECTED]

I use http://www.1and1.com/?k_id=6447276>1and1.com hosting
for all of my business and personal sites. Has phpMyAdmin built in to
the control panel and php4/5 support. I had a few issues with rewriting
at first, but so far has been great. Good luck on finding a great host.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Point of Sanitize->sql?

2006-07-19 Thread gwoo

Cake escapes by default without the need for Sanitize.
But if you want to be extra secure, using the cleanArray, cleanValue   
methods of Sanitize are important.
I imagine Sanitize::sql() is there in case there are other places in  
your app that you might want to escape data in the same way.




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Point of Sanitize->sql?

2006-07-19 Thread [EMAIL PROTECTED]

Hey,

I'm using Cake for the first time to develop an application, and I'm
intent on making it secure as possible.  One question that came up for
me is the point of the Sanitize->sql function.  The description of the
function reads:

" Makes a string SQL-safe by adding slashes (if needed). "

As best I can tell however, this is already done.  I've turned the
Debug mode up so that I can see the queries generated, but every time
something like a quote appears, it's escaped by default.  Is it safe to
assume that Cake, or some library that it uses, is automatically taking
care of these things?  If so, why does this function exist?

Just wondering if I'm missing something.

Thanks!

Eric


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: ACM front-end to ACL -- lots of php errors?

2006-07-19 Thread /BigSur

Hi Ryan,

Ryan J. Peterson wrote:
> The last ACM release has not been tested with the most recent releases
> of CakePHP.  We are working on getting out release 1.0 to work with the
> latest version and hope to have it done mid august. My best guess is
> that ACM is not compatible with your CakePHP version.

Thanks for the quick reply.

For the past couple of days I'd been advised by numerous folks (other
than yourself as author, of course!) -- including Cake devs -- that
it's known to work, that i should recheck my config, that i should
follow the install instructions, etc etc

Do you think you might state this info not-yet-ready info prominently
in the ACM INSTALL.txt?  If might save the next person a fair amount of
wasted effort.

Thanks again for the heads-up.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: ACM front-end to ACL -- lots of php errors?

2006-07-19 Thread Ryan J. Peterson

The last ACM release has not been tested with the most recent releases 
of CakePHP.  We are working on getting out release 1.0 to work with the 
latest version and hope to have it done mid august. My best guess is 
that ACM is not compatible with your CakePHP version.

~rpeterson

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: How i can access to method of Object class on AppController ?

2006-07-19 Thread reyman


AD7six wrote:
> The problem has nothing to do with a variable on a model.
>
> Think about what happens when you request any page...
>
> You go to /
> your controller before filter calls
> $this->requestAction('/ssites/getSites',
> in the beforeFilter for ssites/getSites your  beforeFilter
> calls requestAction again
> in the beforeFilter for ssites/getSites your  beforeFilter
> calls requestAction again
> etc.
>
> I hope that clarifies the problem, you _need_ to break that loop.
>
> I think it would be a much better idea to make the logic that is
> generating your menu a component/element. I wrote a simple tutorial for
> that on the wiki some time ago.
>
> HTH, Cheers,
>
> AD7six

About this >> "I think it would be a much better idea to make the logic
that is generating your menu a component/element. I wrote a simple
tutorial for that on the wiki some time ago."

How i do to get util data from my database and give them to my
component  (like your tutorial) ?

> I can't call a requestAction in startup method of my component ... ( because 
> Loop ... )
> I can't access data because component is called in AppController

So how i do lol ? I don't understand all in the architecture of cake it
seams ...
big Thx,
Sebastien


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



ACM front-end to ACL -- lots of php errors?

2006-07-19 Thread /BigSur

Hello,

I have installed:

 cake 1.1.x.x branch, svn Revision 3273
 apache 2.2 release
 mysql 5.0.22
 php 5.2 from cvs

My cake install itself, and my developing site, seem to be behaving as
expected.

I've init'd/installed ACL tables, and verified that they exist.

now, i am trying to install the ACM front-end to ACL.

after installing the ACM plugin, and per guidance from #irc,
config'ing:

app/plugins/acm/config.php

...
/* -- ACM AutoLoad Config Vars - */

 /* This sets AutoLoad on or off
  * using true or false. This is to
  * connect ACM to your existing Users/Groups
  */

$this->Session->write('ACM.AutoLoad',false);

 /* This defines the tables that hold
  * your existing Users/Groups.
  */
$this->Session->write('ACM.Roles','users');
$this->Session->write('ACM.Users','users');

 /* This defines the fields that hold
  * the Users/Groups unique alias.
  */
$this->Session->write('ACM.RoleAlias','group_id');
$this->Session->write('ACM.UserAlias','username');

/* this constant allows you to decide
 * if ACM can add Users & Groups additional
 * to those managed by AutoLoad, defaults
 * to true if AutoLoad is off.
 */
$this->Session->write('ACM.AllowAddAco',true);
...



on nav to http://vhost/acm/ i DO see the ACM home page as expected.

however, I do NOT see the button/menu referred to "clicking on AutoLoad
in ACM menu" in the INSTALL.txt.

also, clicking any OTHER links from the ACM home page results in a
number of browser errors:


Errors in browser

Warning: Invalid argument supplied for foreach() in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1140
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1147
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1149
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1152
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1157
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1160
Warning: Invalid argument supplied for foreach() in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1140
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1147
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1149
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1152
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1157
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1160
Warning: Invalid argument supplied for foreach() in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1140
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1147
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1149
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1152
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1157
Notice: Uninitialized string offset: 0 in
/Sites/cakephp/1.1.x.x/cake/libs/model/datasources/dbo_source.php on
line 1160
SQL Error in model Aro: 1054: Unknown column 'Aro.' in 'field list'
Warning: Invalid argument supplied for foreach() in
/Sites/cakeproject/plugins/acm/controllers/acm_controller.php on line
160
Cake Access Control Manager

* Home
* Users & Groups
* Managed Controllers
* Permissions

CakePHP : Rapid Development Framework




can someone help determine whether this is a problem in cake, in acm,
or in my config?

thank you.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Hosting (i.e. Dreamhost)

2006-07-19 Thread John Zimmerman [gmail]
@chrisI have the SESSID popup on a couple of custom scripting sites, but it wouldn't stick around.  Was kind of weird.You might try turning the "extra security" option off in the controll panel on your domain and see if that helps.  It wasn't a regular occurance for me, but I did see it happen.
@stefanoIf problems come up with dreamhost again I think I will request to be moved to another server.  I am guessing this affects my static IP's though,  hI do check 
www.dreamhoststatus.com quite often actually, and while I understand things happen, "things" have just been happening way too often lately.So far the response I got from their support has been pretty friendly but consisted on "we are working on it" or "are you sure you are programming your scripts right?".
While one site is a mess of code I inherited, the others are actually either based on Cake or fairly well thought out.  The database performance issue affects them all.Thanks for all the suggestions.
Additional host recommendations are still welcomed.Thanks!On 7/19/06, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:Have any of you dreamhost-based bakers had problems with SESSID as a
get variable in the address bar? I've have the development copy of anapp on dreamhost for a few months now, and I haven't been able to getrid of the get variable...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" 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  -~--~~~~--~~--~--~---


Re: Hosting (i.e. Dreamhost)

2006-07-19 Thread Felix Geisendörfer




I get the SID as a get variable on my local setup for some reason. The
easiest fix has been
to move session management from PHP to database (or cake) which you can
simply do
in app/config/core.php.

Maybe this could be a solution for your problem on Dreamhost as well?

Best Regards,
Felix Geisendörfer
--
http://www.thinkingphp.org
http://www.fg-webdesign.de



[EMAIL PROTECTED] schrieb:

  Have any of you dreamhost-based bakers had problems with SESSID as a
get variable in the address bar? I've have the development copy of an
app on dreamhost for a few months now, and I haven't been able to get
rid of the get variable...




  


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" 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  -~--~~~~--~~--~--~---





Re: Hosting (i.e. Dreamhost)

2006-07-19 Thread [EMAIL PROTECTED]

Have any of you dreamhost-based bakers had problems with SESSID as a
get variable in the address bar? I've have the development copy of an
app on dreamhost for a few months now, and I haven't been able to get
rid of the get variable...


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: passing values when constructing a "new" object from a model

2006-07-19 Thread Langdon Stevenson

Hi Tomas

> Err... correct version.
> 
> function index () {
>   $this->data['Commitment']['actionplan_id'] = 300;
>   $this->data['Commitment']['action_area'] = 1;
>   $this->data['Commitment']['order'] = 0;
>   $this->Commitment->save($this->data);
> }


This is what I have been doing previously.  However in this application 
it has resulted in lots of these set-up routines to create the complete 
object, which is making the controller large and cumbersome.

What I have ended up doing is to create a method newData() in the 
Commitment model that sets up the data (as you do above) in an array and 
returns it.  I call that from the Feedback controller and hey presto I 
have a new data set ready to use.

This seems like the best place to put that code to create a data set. 
Now if I modify the Commitment model I have all of its relevant code in 
one place, rather than having to hunt for it in various controllers.

Thanks for your input :-)

Regards,
Langdon

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: search functionality for whole website

2006-07-19 Thread DJ Spark

 thank you for the feedback, felix,
 so, for a start, i will just check if there's a exact match for
title/name fields.
if not found, try a more broad regex LIKE '%$conditions%' for title/name ,
if not found, search in other fields

$conditions = $this->params['url']['s'];
$results['exact']['filme'] = $this->Filme->findAll(array('title'=>$conditions));

if not found

$results['fuzzy']['filme'] = $this->Filme->findAll("title LIKE
'%".$conditions."%'");

if not found

$results['full']['filme'] = $this->Filme->findAll("slug LIKE
'%".$conditions."%' OR titulo_original LIKE '%".$conditions."%' OR
titulo_ingles LIKE '%".$conditions."%' OR sinopse LIKE
'%".$conditions."%' OR description LIKE '%".$conditions."%'");

 and use that array on the view

 looks simple and effective, but i'll post when i can make something better

 thank  you
 spark

On 7/19/06, Felix Geisendörfer <[EMAIL PROTECTED]> wrote:
>
>  Hi spark,
>
>  unfortunately the code I've written was for searching local files and
> doesn't make usage of several advantages you've
>  got when working with databases, so it would not be worth for you trying to
> apply it to your own solution. Other then that
>  I've written some regex that will parse the queries, so "connected
> keywords" will be recognized and stupid user mistakes
>  like doubling keywords will be ignored. But if you are good with regex
> yourself that shouldn't take you that long.
>
>  Regarding ranking, there is almost no limit on the complexity of the
> algorithm you may use to determine one items
>  popularity. I think user feedback should be weighted pretty high, but only
> if the input can be trusted. And to determine
>  trusted feedback from spam & manipulation can be pretty tricky. So this
> isn't something I would completely rely on, when
>  implementing search in a site where advantages can be taken from having
> certain items high up in the serps (search result
>  pages).
>
>  A better solution is to put efforts into understanding the relationships of
> the items you are trying to compare. Now, when searching
>  your own database, you are in the lucky situation that you can track things
> like item popularity, creation / updated time stamps and
>  tons of other useful information, just like Amazon does with "Other people
> who liked this product also bought ..." that you wouldn't be
>  able to track, when searching through foreign databases (or web sites). Of
> course, this is sort of suffering from similar problems
>  like the idea of taking user feedback.
>
>  So again, I think it would be really nice to have a generic search solution
> for cakephp that's based on a central Search Model that
>  get's it's informations from special Crawler (Components?) written by the
> community. This would be quite challenging, but as a result,
>  we could have a common data interface for the applications we write with,
> that we could make available as a web service. I'm sure
>  there are tons of sweet things we could do with that.
>
>  Alright, but before I start to sound like an employee of this big company
> that tries to index the entire world, I'll stop here and leave it
>  to you to figure out what will be the best solution for the site you are
> creating ; ).
>
>
>  Best Regards,
>  Felix Geisendörfer
>
> --
>  http://www.thinkingphp.org
>  http://www.fg-webdesign.de
>
>  DJ Spark schrieb:
>  quite elegant solution, gwoo ! thanx!
>
>  i'm also working on a tiny search for a project in cakephp, Felix.
> Anyone have some references on search enhancements? ( like that in
> youtube, for example, where a string is sent and it says it comes from
> a search result, a ranks it better on the next search for the same
> term).
>  Any article related would be a good reading for me at this point ;)
>
>  spark
>
>
>
> On 7/19/06, Felix Geisendörfer <[EMAIL PROTECTED]> wrote:
>
>
>  Well you could refactor the Search functionality into an own model, which
> would make
>  sense to me. But you don't necessarily have to do that. You can put this in
> any controller
>  to say that no Model is being used:
>
>  var $uses = array();
>
>  But really, if you plan to implement a quality search into a high usage web
> site, you should
>  seriously consider maintaining an own search index as well as to do some
> regex on the
>  queries (so users can use "two words" and such). Once you get into this
> topic you'll find out,
>  that doing a good job on search (even for your own db), is not all that
> easy. I mean you can
>  literally spend 50 hours (and more ...) to write the code required for an
> intelligent search tool.
>  I've worked on a file search tool for my personal use in CakePHP, and I was
> really surprised
>  about the complexity that comes with it. If I find some time this sommer I
> might try to create a
>  Generic Search Model for CakePHP, that will work together with different
> types of crawlers you
>  can create by yourself (DB Tables, RSS feeds, Html, XML, Image Meta dat

Re: Hosting (i.e. Dreamhost)

2006-07-19 Thread stefano

I host a lot of websites on DreamHost and 2 of them are built on
Cake... plus a lot of private projects...
I'm very happy with them and never had even one problem with cake and
dreamhost.

As suggested, if you have problems with a server you can ask to be
moved to a different one.

Also keep an eye on their status page: in this few days they had
problems with one or more servers: http://www.dreamhoststatus.com/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: /app/app_controller.php ??

2006-07-19 Thread Tomas Lopasovsky

In other words, /app/app_controller.php overwrites
/cake/app_controller.php.

It's useful for situations when you need to extend AppController with
functions for session checking and so on.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: How i can access to method of Object class on AppController ?

2006-07-19 Thread Felix Geisendörfer




I think it's only a lack of coffee that can cause problems like this
(at least for me) ... ; )
Maybe you just haven't refilled your 'cup' since java ; )

--
http://www.thinkingphp.org
http://www.fg-webdesign.de



reyman schrieb:

  I see ... i'm VERY silly ... i have many problem with OO conception on
php, i don't understand why because i have two years of OO conception
in java behind me lol ... silly, very silly, perhaps too much coffe in
my blood ? :)

Thx for all AD7Six and community :)
Sebastien.




  


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" 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  -~--~~~~--~~--~--~---





Re: Hosting (i.e. Dreamhost)

2006-07-19 Thread ShepherdWeb

I've been with DreamHost for about 6 months now.  I host about 20 sites
there.  I haven't launched a Cake site yet, but will soon.  I do have
other dynamic sites though.  I would say that so far my experience with
Dreamhost has been pretty good.  Performance is a little better than my
previous experience on another shared host; uptime and support are both
better than my previous host.  I have no experience with Rails at any
host.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: search functionality for whole website

2006-07-19 Thread Felix Geisendörfer




Hi spark,

unfortunately the code I've written was for searching local files and
doesn't make usage of several advantages you've
got when working with databases, so it would not be worth for you
trying to apply it to your own solution. Other then that
I've written some regex that will parse the queries, so "connected
keywords" will be recognized and stupid user mistakes
like doubling keywords will be ignored. But if you are good with regex
yourself that shouldn't take you that long.

Regarding ranking, there is almost no limit on the complexity of the
algorithm you may use to determine one items
popularity. I think user feedback should be weighted pretty high, but
only if the input can be trusted. And to determine
trusted feedback from spam & manipulation can be pretty tricky. So
this isn't something I would completely rely on, when
implementing search in a site where advantages can be taken from having
certain items high up in the serps (search result
pages).

A better solution is to put efforts into understanding the
relationships of the items you are trying to compare. Now, when
searching
your own database, you are in the lucky situation that you can track
things like item popularity, creation / updated time stamps and
tons of other useful information, just like Amazon does with "Other
people who liked this product also bought ..." that you wouldn't be 
able to track, when searching through foreign databases (or web sites).
Of course, this is sort of suffering from similar problems
like the idea of taking user feedback.

So again, I think it would be really nice to have a generic search
solution for cakephp that's based on a central Search Model that
get's it's informations from special Crawler (Components?) written by
the community. This would be quite challenging, but as a result, 
we could have a common data interface for the applications we write
with, that we could make available as a web service. I'm sure 
there are tons of sweet things we could do with that.

Alright, but before I start to sound like an employee of this big
company that tries to index the entire world, I'll stop here and leave
it
to you to figure out what will be the best solution for the site you
are creating ; ).

Best Regards,
Felix Geisendörfer
--
http://www.thinkingphp.org
http://www.fg-webdesign.de



DJ Spark schrieb:

   quite elegant solution, gwoo ! thanx!

 i'm also working on a tiny search for a project in cakephp, Felix.
Anyone have some references on search enhancements? ( like that in
youtube, for example, where a string is sent and it says it comes from
a search result, a ranks it better on the next search for the same
term).
 Any article related would be a good reading for me at this point ;)

 spark



On 7/19/06, Felix Geisendörfer <[EMAIL PROTECTED]> wrote:
  
  
 Well you could refactor the Search functionality into an own model, which
would make
 sense to me. But you don't necessarily have to do that. You can put this in
any controller
 to say that no Model is being used:

 var $uses = array();

 But really, if you plan to implement a quality search into a high usage web
site, you should
 seriously consider maintaining an own search index as well as to do some
regex on the
 queries (so users can use "two words" and such). Once you get into this
topic you'll find out,
 that doing a good job on search (even for your own db), is not all that
easy. I mean you can
 literally spend 50 hours (and more ...) to write the code required for an
intelligent search tool.
 I've worked on a file search tool for my personal use in CakePHP, and I was
really surprised
 about the complexity that comes with it. If I find some time this sommer I
might try to create a
 Generic Search Model for CakePHP, that will work together with different
types of crawlers you
 can create by yourself (DB Tables, RSS feeds, Html, XML, Image Meta data,
...). I think it's quite
 an interesting topic and if anybody else would be interested in it it might
well be worth a little
 CakeForge project.

 Best Regards,
 Felix Geisendörfer

--
 http://www.thinkingphp.org
 http://www.fg-webdesign.de

 carlosrg schrieb:
 But, we need a model for this Controller, it's ok? What should be the
model?






 >



  
  

  


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" 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  -~--~~~~--~~--~--~---





Re: How i can access to method of Object class on AppController ?

2006-07-19 Thread reyman

I see ... i'm VERY silly ... i have many problem with OO conception on
php, i don't understand why because i have two years of OO conception
in java behind me lol ... silly, very silly, perhaps too much coffe in
my blood ? :)

Thx for all AD7Six and community :)
Sebastien.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Adding new model

2006-07-19 Thread Philipp Ittershagen

If you want to use multiple Models in one Controller, put this into the
corresponding Controller class:

var $uses = array('Model1', 'Model2' [...] );


klmann

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: /app/app_controller.php ??

2006-07-19 Thread nate

You need to copy it out of /cake/app_controller.php into /app.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: /app/app_controller.php ??

2006-07-19 Thread AD7six

It´s a controller, that you can (if you wish) create to store any of
your application wide logic/parameters.

e.g. if you define var $helpers = Array ('Ajax'), that would mean that
all controllers would have this variable set so you don´t have to
define it in each individual controller.

HTH,

Cheers,

AD7six


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Hosting (i.e. Dreamhost)

2006-07-19 Thread Jonathan Snook

Similar boat, I just launched withcake.com and it's been working well
minus the recent downtime. If you're having problems on a particular
server, you can ask to get moved to another box. I did this because of
repeated downtime I was having early on and have since been pretty
stable.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



/app/app_controller.php ??

2006-07-19 Thread Stalemate

I see this path refrenced in several tutorials
"/app/app_controller.php"

This does not exist by default.   Could soemone explain what this is?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: How i can access to method of Object class on AppController ?

2006-07-19 Thread AD7six

The problem has nothing to do with a variable on a model.

Think about what happens when you request any page...

You go to /
your controller before filter calls
$this->requestAction('/ssites/getSites',
in the beforeFilter for ssites/getSites your  beforeFilter
calls requestAction again
in the beforeFilter for ssites/getSites your  beforeFilter
calls requestAction again
etc.

I hope that clarifies the problem, you _need_ to break that loop.

I think it would be a much better idea to make the logic that is
generating your menu a component/element. I wrote a simple tutorial for
that on the wiki some time ago.

HTH, Cheers,

AD7six


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: passing values when constructing a "new" object from a model

2006-07-19 Thread Tomas Lopasovsky

Err... correct version.

function index () {
  $this->data['Commitment']['actionplan_id'] = 300;
  $this->data['Commitment']['action_area'] = 1;
  $this->data['Commitment']['order'] = 0;
  $this->Commitment->save($this->data);
}


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: passing values when constructing a "new" object from a model

2006-07-19 Thread Tomas Lopasovsky

I'm not very clear on your problem, but if you want to create new item
for "Model A" from "Model B", you can use this principe:
-

class Commitment extends AppModel
{
   var $name = 'Commitment'; //for php4
}

class FeedbackController extends AppController
{
   var $name = 'Feedback'; //for php4
   var $uses = array('Commitment');

   function index () {
 $this->data['Commitment']['actionplan_id'] = 300;
 $this->data['Commitment']['action_area'] = 1;
 $this->data['Commitment']['order'] = 0;
 $this->save();
   }

}


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Hosting (i.e. Dreamhost)

2006-07-19 Thread ryanb006

I've been using iPowerWeb.com. They have a reseller program, excellent
support and control panel (vDeck), and the performance is great.

http://www.ipowerweb.com/reseller/index.html

Ryan


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: How i can access to method of Object class on AppController ?

2006-07-19 Thread reyman

I don't understand really ...

RequestAction is called by all controller , that's ok, i want that to
build my dynamic menu to inject in element ...

Sorry my english is approximative .. :-s


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: search functionality for whole website

2006-07-19 Thread DJ Spark

 quite elegant solution, gwoo ! thanx!

 i'm also working on a tiny search for a project in cakephp, Felix.
Anyone have some references on search enhancements? ( like that in
youtube, for example, where a string is sent and it says it comes from
a search result, a ranks it better on the next search for the same
term).
 Any article related would be a good reading for me at this point ;)

 spark



On 7/19/06, Felix Geisendörfer <[EMAIL PROTECTED]> wrote:
>
>  Well you could refactor the Search functionality into an own model, which
> would make
>  sense to me. But you don't necessarily have to do that. You can put this in
> any controller
>  to say that no Model is being used:
>
>  var $uses = array();
>
>  But really, if you plan to implement a quality search into a high usage web
> site, you should
>  seriously consider maintaining an own search index as well as to do some
> regex on the
>  queries (so users can use "two words" and such). Once you get into this
> topic you'll find out,
>  that doing a good job on search (even for your own db), is not all that
> easy. I mean you can
>  literally spend 50 hours (and more ...) to write the code required for an
> intelligent search tool.
>  I've worked on a file search tool for my personal use in CakePHP, and I was
> really surprised
>  about the complexity that comes with it. If I find some time this sommer I
> might try to create a
>  Generic Search Model for CakePHP, that will work together with different
> types of crawlers you
>  can create by yourself (DB Tables, RSS feeds, Html, XML, Image Meta data,
> ...). I think it's quite
>  an interesting topic and if anybody else would be interested in it it might
> well be worth a little
>  CakeForge project.
>
>  Best Regards,
>  Felix Geisendörfer
>
> --
>  http://www.thinkingphp.org
>  http://www.fg-webdesign.de
>
>  carlosrg schrieb:
>  But, we need a model for this Controller, it's ok? What should be the
> model?
>
>
>
>
>
>
>  >
>
>


-- 
[web] http://synapsisdi.com.br
[livesets] http://djspark.com.br

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: search functionality for whole website

2006-07-19 Thread Felix Geisendörfer




Well you could refactor the Search functionality into an own model,
which would make
sense to me. But you don't necessarily have to do that. You can put
this in any controller
to say that no Model is being used:

var $uses = array();

But really, if you plan to implement a quality search into a high usage
web site, you should
seriously consider maintaining an own search index as well as to do
some regex on the
queries (so users can use "two words" and such). Once you get into this
topic you'll find out,
that doing a good job on search (even for your own db), is not all that
easy. I mean you can
literally spend 50 hours (and more ...) to write the code required for
an intelligent search tool.
I've worked on a file search tool for my personal use in CakePHP, and I
was really surprised
about the complexity that comes with it. If I find some time this
sommer I might try to create a
Generic Search Model for CakePHP, that will work together with
different types of crawlers you
can create by yourself (DB Tables, RSS feeds, Html, XML, Image Meta
data, ...). I think it's quite
an interesting topic and if anybody else would be interested in it it
might well be worth a little
CakeForge project.

Best Regards,
Felix Geisendörfer
--
http://www.thinkingphp.org
http://www.fg-webdesign.de



carlosrg schrieb:

  But, we need a model for this Controller, it's ok? What should be the
model?




  


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" 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  -~--~~~~--~~--~--~---





Re: search functionality for whole website

2006-07-19 Thread carlosrg

But, we need a model for this Controller, it's ok? What should be the
model?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: Delete, hasOne and dependent

2006-07-19 Thread Mike S

I had a similar problem until I remembered that this is a database
level issue.  When creating your foreign keys you must set the "On
Delete" action to "Cascade".  This can easily be done using the MySQL
administrator application or using SQL when you create the foreign key.

More information can be found on this page -

http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: cheeseCake Photoblog V1.0 Beta 1 released

2006-07-19 Thread Dr. Tarique Sani <[EMAIL PROTECTED]>

naryga wrote:
> I tried downloading the package, but all I get is an empty tar file.
Must be a hitch in cakeforge when you tried - I just tried a download
and it worked

Thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



Re: cheeseCake Photoblog V1.0 Beta 1 released

2006-07-19 Thread Dr. Tarique Sani <[EMAIL PROTECTED]>

Thanks for letting me know - if ever I register a domain I will name it
cheesecakephp.org ;)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---