Re: Can't share elements between apps

2009-04-22 Thread John Andersen

Hi Ernesto

Try look at this "http://book.cakephp.org/view/36/Additional-Class-
Paths", maybe it may solve your issue :)

Enjoy,
   John

On Apr 22, 5:13 pm, Ernesto  wrote:
> Hello.
>
> view sharing works, but not elements sharing
>
> here's a snippet from my bootstrap.php
>
> if (!defined('SHARED_ITEMS_FOLDER')) {
>         define('SHARED_ITEMS_FOLDER',
> CAKE_CORE_INCLUDE_PATH .'\shared_items');
>
> }
>
> $viewPaths = array(SHARED_ITEMS_FOLDER .'\views');
>
> My webroot dir tree is this:
>
> WebRoot
>         cake
>         apps
>         shared_items
>                 helpers
>                 views
>                         elements
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Steps Form

2009-04-22 Thread John Andersen

Just keep the data from each page/step in the session or in temporary
tables, then save them at the end.
All the other stuff is up to you as you learn about CakePHP :)
Enjoy,
   John

On Apr 22, 11:27 pm, Mike  wrote:
> Hi everyone, i'm new in CakePHP development (and framework developping
> too).
>
> I need to do a really thick aplication, so i decided to develop it
> with this framework, but i have a question for you guys:
>
> We need a register form divided in different steps (personal
> information, professional info, etc) and the data must be saved after
> the final step.
> how can i do that?, what do you think is the best way?, do you have
> any recommendations??
>
> Thanks for your help!
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Sanitization Confusion

2009-04-22 Thread John Andersen

The clean method has some options, these are:
'odd_spaces' (Remove odd spaces when true)
'encode' (Remove html symbols using Sanitize::html when true)
'dollar' (Remove $ symbols when true)
'carriage' (Remove carriage \r when true)
'unicode' (Replace unicode with non-unicode when true)
'escape' (Escape using Sanitize::escape when true)
'backslash' (Replace \ when true)

Look at the source at http://api.cakephp.org/view_source/sanitize/#line-192

Enjoy,
   John


On Apr 22, 9:22 pm, "Dave Maharaj :: WidePixels.com"
 wrote:
> I have been reading the cookbook looking for info on cleaning data submitted
> by user.
>
> $badString = ' color="#FF">HEY...';
> echo Sanitize::html($badString);
>
> Appears to me this is in the view.
>
> But how can I prevent it from being saved to the database?
>
> I have this in a controller my understanding is its cleaning the form
> submitted data?
> $this->params['form']['value'] =
> Sanitize::clean($this->params['form']['value'], array(' '));
>
> Thanks,
>
> Dave
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: A question about configuring your root directory

2009-04-22 Thread Dr. Loboto

Give your  tag generation code. Error should be there.

On Apr 23, 2:24 am, Beedge  wrote:
> Hi all,
>
> I have cake installed on my local machine.
>
> The directory is:
>
> http://127.0.0.1/cake
>
> I type this in the URL and get the confirmation page saying everything
> is ok with the install.
>
> I am doing the IBM tutorial at:
>
> https://www6.software.ibm.com/developerworks/education/os-php-cake1/s...
>
> I am at the stage that I have set up a simple users view and model and
> controller with register.ctp. I go to this page and it works fine:
>
> http://127.0.0.1/cake/users/register/
>
> however when I submit a new user the page tries to go 
> tohttp://127.0.0.1/cake/users/register/users/register/
>
> when in the tutorial it goes tohttp://127.0.0.1/cake/users/register/
>
> I know its not a typo/spelling mistake or anything, so I wonder do I
> need to configure the root directory ?
>
> Im sorry if this is vague or rambling but would really appreciate any
> help
>
> Thanks
>
> Kevin
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Steps Form

2009-04-22 Thread brian

Have a look at the Bakery (or google) for WizardComponent. I've looked
at it but haven't used it myself.

On Wed, Apr 22, 2009 at 4:27 PM, Mike  wrote:
>
> Hi everyone, i'm new in CakePHP development (and framework developping
> too).
>
> I need to do a really thick aplication, so i decided to develop it
> with this framework, but i have a question for you guys:
>
> We need a register form divided in different steps (personal
> information, professional info, etc) and the data must be saved after
> the final step.
> how can i do that?, what do you think is the best way?, do you have
> any recommendations??
>
> Thanks for your help!
>
> >
>

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Maintaining drop down menus when validation fails?

2009-04-22 Thread brian

Just do your find('list') for the select options outside of any if/else block:

public function action()
{
if (!empty($this->data))
{
if ($this->Whatever->save($this->data))
{
// redirect
}
else
{
// flash msg, no redirect
}
}
$this->set(
'foods',
$this->Food->find('list', array(...))
);
}

This way, the only time you're not fetching the options is when you've
redirected after a successful save.

On Wed, Apr 22, 2009 at 4:52 PM, _Z  wrote:
>
> Hello Cake Community!
>
> I was wondering if there is a standard approach to maintaining drop
> down menus within a view when the submitted data does not pass
> validation (in the model.)
>
> For example, I have a dropdown menu of foods and other fields within a
> view.
> When submitted, the data does not pass validation, and an error
> message is displayed in the view.
>
> Instead of showing the drop down menu, all that is displayed is the id
> of the selected food.
>
> Does anyone have a good way of maintaining this drop down data in an
> error condition when validating from the model ?
>
> Thank you!
>
>
> >
>

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using jQuery.ajax - Sending non-forms values to server

2009-04-22 Thread Miles J

You have to send it within a data array like so:

jQuery.ajax({
type: "POST",
url: '/controller/action',
data: "data[Model][name]=value&data[name]=value"
});

And in the controller:

$this->data['Model']['name'] OR
$this->data['name']
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $this->passedArgs versus $this->params['named']

2009-04-22 Thread Miles J

$this->params['named'] is only named parameters.

$this->passedArgs is ALL parameters passed in the query string,
including named params.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using jQuery.ajax - Sending non-forms values to server

2009-04-22 Thread yodi

On view :
var input_id = '2';
$.getJSON("http://website/controller/action",{id:input_id},function(data){
// callback
if(data.result){

}
});

On Controller :
$this->params['url']['id'];


On Wed, 2009-04-22 at 12:36 -0700, rartavia wrote:
> Hello, I'm wondering how to make jQuery.ajax call to cake when you
> need to send parameters both simple values or complex (json, objects,
> etc).
> I've two scenarios, one is not to send a form but a really complex js
> object, how do I send it with jQuery.ajax?
> The second is, also not sending a form but a single/simple value or
> set of simple values.
> For this second I've made some tests:
> 
> jQuery.ajax({
>   type: "POST",
>   url: '/controller/action',
>   data: {value:"1,2,3,4,5"},
> });
> 
> var test = [];
> test["data['value']"] = "myvalue"
> jQuery.ajax({
>   type: "POST",
>   url: '/controller/action',
>   data: test,
> });
> 
> Tryied to read on server side with both $this->params["value"] and
> $this->data["value"] without succes.
> How do one sends nonforms, complex and simple values and how to read
> them in controllers (server side)?
> 
> 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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $this->passedArgs versus $this->params['named']

2009-04-22 Thread yodi

IMO, it have difference. Just say, we have two kind of request,
1. direct url request ( /articles/index/date:2009-04-22/page:3)
2. ajax request (/articles/#)

So, on first request, $this->passedArgs is effective
but, in seconds, using $this->params['named] is effective than
$this->passedArgs.

Just imagine we have 5 input form sended via Ajax and using
$this->passedArgs *don't ask me to do that*


On Wed, 2009-04-22 at 13:20 -0700, justinrussell wrote:
> In the following case, it appears that both $this->passedArgs and
> $this->params['named'] will yield the same value from a controller
> action:
> 
> /articles/index/date:2009-04-22/page:3
> 
> I can't seem to find a clear answer as to whether there is any
> difference between the two in any situation. Articles online
> (including the manul) seem to be divided on the issue. Is it
> beneficial in any way to use one over the other, or is it just a
> personal choice?
> 
> > 


--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Maintaining drop down menus when validation fails?

2009-04-22 Thread _Z

Hello Cake Community!

I was wondering if there is a standard approach to maintaining drop
down menus within a view when the submitted data does not pass
validation (in the model.)

For example, I have a dropdown menu of foods and other fields within a
view.
When submitted, the data does not pass validation, and an error
message is displayed in the view.

Instead of showing the drop down menu, all that is displayed is the id
of the selected food.

Does anyone have a good way of maintaining this drop down data in an
error condition when validating from the model ?

Thank you!


--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: PhpED and code completion

2009-04-22 Thread Petr Vytlačil

I have red this, but it dont work. Do you try it, or have same
example?
By THX

On 22 Dub, 16:47, Brendon Kozlowski  wrote:
> Google was my friend.http://www.nusphere.com/php/cakephp.htm
>
> On Apr 22, 2:36 am, Petr Vytlačil  wrote:
>
> > HI,
> > Im tryPhpEdbut i dont know how setting code completion in cotroller.
> > For example: I have UsersController and a need call $this->User->find
> > ('all');, but thisPhpEDcant auto competing.
> > Is any way how write same rule for suggestion methods from models?
>
> > THX
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Steps Form

2009-04-22 Thread Mike

Hi everyone, i'm new in CakePHP development (and framework developping
too).

I need to do a really thick aplication, so i decided to develop it
with this framework, but i have a question for you guys:

We need a register form divided in different steps (personal
information, professional info, etc) and the data must be saved after
the final step.
how can i do that?, what do you think is the best way?, do you have
any recommendations??

Thanks for your help!

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



$this->passedArgs versus $this->params['named']

2009-04-22 Thread justinrussell

In the following case, it appears that both $this->passedArgs and
$this->params['named'] will yield the same value from a controller
action:

/articles/index/date:2009-04-22/page:3

I can't seem to find a clear answer as to whether there is any
difference between the two in any situation. Articles online
(including the manul) seem to be divided on the issue. Is it
beneficial in any way to use one over the other, or is it just a
personal choice?

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Using jQuery.ajax - Sending non-forms values to server

2009-04-22 Thread rartavia

Hello, I'm wondering how to make jQuery.ajax call to cake when you
need to send parameters both simple values or complex (json, objects,
etc).
I've two scenarios, one is not to send a form but a really complex js
object, how do I send it with jQuery.ajax?
The second is, also not sending a form but a single/simple value or
set of simple values.
For this second I've made some tests:

jQuery.ajax({
type: "POST",
url: '/controller/action',
data: {value:"1,2,3,4,5"},
});

var test = [];
test["data['value']"] = "myvalue"
jQuery.ajax({
type: "POST",
url: '/controller/action',
data: test,
});

Tryied to read on server side with both $this->params["value"] and
$this->data["value"] without succes.
How do one sends nonforms, complex and simple values and how to read
them in controllers (server side)?

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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



A question about configuring your root directory

2009-04-22 Thread Beedge

Hi all,

I have cake installed on my local machine.

The directory is:

http://127.0.0.1/cake

I type this in the URL and get the confirmation page saying everything
is ok with the install.

I am doing the IBM tutorial at:

https://www6.software.ibm.com/developerworks/education/os-php-cake1/section3.html

I am at the stage that I have set up a simple users view and model and
controller with register.ctp. I go to this page and it works fine:

http://127.0.0.1/cake/users/register/

however when I submit a new user the page tries to go to
http://127.0.0.1/cake/users/register/users/register/

when in the tutorial it goes to http://127.0.0.1/cake/users/register/

I know its not a typo/spelling mistake or anything, so I wonder do I
need to configure the root directory ?

Im sorry if this is vague or rambling but would really appreciate any
help

Thanks

Kevin
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Console not working - open_basedir restriction errors

2009-04-22 Thread Cepheus

Hrmm I've tried messing around with it, safe mode is turned off but it
still will not include the file. I've tried messing around with the
htaccess but no success. I guess I'll find another approach. Thanks,
though.

On Apr 22, 12:56 pm, Martin Westin  wrote:
> You have installed Cake in a directory that is not allowed by your php
> configuration.
>
> http://www.php.net/manual/en/features.safe-mode.php
>
> Look in your php.ini (possibly in /etc/) for the directive to change
> the allowed directories. (But I am not sure Cake works that well under
> "safe mode" even in an allowed directory.)
>
> I guess your path is a symlink at some point?
> ~/workspace/www/blog/cake/console would normally be
> /home/usename/workspace/www/blog... but according to php it is
> /opt/lampp/htdocs/blog...
>
> /Martin
>
> On Apr 22, 12:10 pm, Cepheus  wrote:
>
> > Hey everyone,
>
> > I've installed cakephp by checking out the SVN repository. When I try
> > to run the cake console, I receive the following output:
>
> > [cep...@cephah-laptop ~/workspace/www/blog/cake/console]$ ./cake
>
> > Warning: require_once(): open_basedir restriction in effect. File(/opt/
> > lampp/htdocs/blog/cake/basics.php) is not within the allowed path(s):
> > (/srv/http/:/home/:/tmp/:/usr/share/pear/) in /opt/lampp/htdocs/blog/
> > cake/console/cake.php on line 155
>
> > Warning: require_once(/opt/lampp/htdocs/blog/cake/basics.php): failed
> > to open stream: Operation not permitted in /opt/lampp/htdocs/blog/cake/
> > console/cake.php on line 155
>
> > Fatal error: require_once(): Failed opening required '/opt/lampp/
> > htdocs/blog/cake/basics.php' (include_path='.:/usr/share/pear') in /
> > opt/lampp/htdocs/blog/cake/console/cake.php on line 155
> > [cep...@cephah-laptop ~/workspace/www/blog/cake/console]$
>
> > I've tried looking around the web but I haven't found anything that
> > worked. Does anyone know what I need to do to rectify this problem?
>
> > Thanks in advance,
> > Michael.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Auth performing logout Without Requesting It

2009-04-22 Thread rartavia

Hello, In my app, the user is able to upload images. I'm trying that,
when the user leaves my page without "saving" (to dababase), if images
were uploaded delete them. With javascript event window.onbeforeunload
i'm doing an ajax call just before user leaves.

function onWindowLeave(){
if(uploadedImgs.length > 0){
var ids = [], tmp;
jQuery.each(uploadedImgs, function(index, obj){
tmp = obj.dbURL;
tmp = tmp.substr(tmp.lastIndexOf("/") + 1);
ids[index] = tmp;
});
var _url = upload_url.replace("images/upload", "images/
delete_files/" + ids.join(","));
jQuery.ajax({
type: "POST",
url: _url
});
}
}window.onbeforeunload = onWindowLeave;

My Controller does the following

function delete_files($fileNames){
if(!empty($fileNames) && $this->RequestHandler->isAjax()){
$filesPath = WWW_ROOT . 'files' . DS . 'user_uploaded_imgs' . 
DS;
$fileNames = explode(",", $fileNames);
foreach($fileNames as $fileName){
unlink($filesPath . $fileName); // Delete each file
}
}
$this->layout = null;
}

I added this line in AppController $this->Auth->allowedActions =
(...,'delete_files'); when I leave the page, it all executes
correctly, but my session ends.
Before adding this line delete_files() was not being executed but my
session is not terminated. After several reloads, delete_files()
executes and again session is terminated.
Someone has any idea?

Thanks a lot

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cakephp auth component password field always empty why ??

2009-04-22 Thread Stu

ok, set your debug to 2 (if it's not already) do an exit(); before
your redirect in your add function then check your INSERT query at the
bottom, see if the password field is empty there.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Search hasMany Associated Model

2009-04-22 Thread brian

It seems to me that your search needs to be on User because that's the
table that has a "name" column. And any Friend will already be
associated with a User, anyhow.

What is the ultimate goal? Are trying to find Friends of this User
whose name is "Tom". You should be able to do something like:

$this->User->find(
'all',
array(
'conditions' => array(
'User.name' => $q
),
'contain' => array('Friend')
)
);

That will fetch all Users whose name = $q, along with their associated
Friend data. Are you looking to narrow that down to just Friends of
this User? If so, you'll need to explain how your models are
associated.

On Wed, Apr 22, 2009 at 2:17 PM, Chez17  wrote:
>
> Stu,
>
> I am trying to search over both Models and paginate the results. So I
> can't just do what you suggested. It needs to be one query. I have
> started working with joins but it's still not working.
>
> On Apr 22, 2:10 pm, Stu  wrote:
>> What code are you trying right now?
>>
>> Seems like you're trying to find data based on an unknown column
>>
>> Usually for hasMany searches I would do this:
>>
>> $this->User->friend->find('foo', $options);
> >
>

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Sanitization Confusion

2009-04-22 Thread Dave Maharaj :: WidePixels.com

I have been reading the cookbook looking for info on cleaning data submitted
by user.
 
$badString = 'HEY...';
echo Sanitize::html($badString); 

Appears to me this is in the view.

But how can I prevent it from being saved to the database?

I have this in a controller my understanding is its cleaning the form
submitted data? 
$this->params['form']['value'] =
Sanitize::clean($this->params['form']['value'], array(' '));

Thanks,

Dave


--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Search hasMany Associated Model

2009-04-22 Thread Chez17

Stu,

I am trying to search over both Models and paginate the results. So I
can't just do what you suggested. It needs to be one query. I have
started working with joins but it's still not working.

On Apr 22, 2:10 pm, Stu  wrote:
> What code are you trying right now?
>
> Seems like you're trying to find data based on an unknown column
>
> Usually for hasMany searches I would do this:
>
> $this->User->friend->find('foo', $options);
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Search hasMany Associated Model

2009-04-22 Thread Stu

What code are you trying right now?

Seems like you're trying to find data based on an unknown column

Usually for hasMany searches I would do this:

$this->User->friend->find('foo', $options);
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Search hasMany Associated Model

2009-04-22 Thread Chez17

Hello all, I am trying to search from a modal and search a model that
is associated to it. I have two models.

User hasMany Friends
Friend belongsTo User

Basically, in the User model, if someone enters the search term 'Tom',
I want to be able to search for Users named Tom and Friends that are
named Tom. Right now I keep getting

"1054: Unknown column 'Friend.name' in 'where clause'"

I looked into containable and tried tons of examples over the web but
couldn't get it working. I am trying to paginate this as well, but
that is an after thought. I can't get this done in a single query.
Anyone know how to search over a hasMany association?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Missing Table

2009-04-22 Thread smithtrev...@googlemail.com

As sod's law goes, after hours of trying, I finally posted on here...
and then I solved it a minute later.
Thanks anyway.

On Apr 22, 5:04 pm, "smithtrev...@googlemail.com"
 wrote:
> I have a table that connects together 3 other tables.
>
> It looks like this,
> teams_managers_seasons
> 
> team_manager_season_id
> team_id
> manager_id
> season_id
> 
>
> When i try the url, /cake/FanteamManagerSeasons
> ..
> Missing Database Table
>
> Error: Database table managers_players_seasons_fanteams for model
> ManagersPlayersSeasonsFanteam was not found.
> ..
>
> This table doesn't exist, shouldn't exist, and there is no reference
> to it anywhere. I think my models & controllers are correct, and I've
> tried changing the naming of the tables.
>
> Any ideas why this occurs?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Missing Table

2009-04-22 Thread smithtrev...@googlemail.com

I have a table that connects together 3 other tables.

It looks like this,
teams_managers_seasons

team_manager_season_id
team_id
manager_id
season_id


When i try the url, /cake/FanteamManagerSeasons
..
Missing Database Table

Error: Database table managers_players_seasons_fanteams for model
ManagersPlayersSeasonsFanteam was not found.
..

This table doesn't exist, shouldn't exist, and there is no reference
to it anywhere. I think my models & controllers are correct, and I've
tried changing the naming of the tables.

Any ideas why this occurs?



--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Sanitize

2009-04-22 Thread brian

Also, there's no need to manually call beforeSave(). In fact, you were
trying to call it *after* the save() had been done.

On Wed, Apr 22, 2009 at 7:06 AM, John Andersen  wrote:
>
> Hi Dave,
>
> In your model, add the Sanitize usage, then in your controller, just
> save as normal. Like:
>
> Model:
> function beforeSave() {
>   App::import('Sanitize');
>   $this->data = Sanitize::paranoid( $this->data );
> }
>
> Controller:
> ...
>   if ( $this->User->save( $this->data ) ) {
>      // All is well with the save, it was validated, sanitized and
> saved.
>   } else {
>      // Woa, failed validattion and thus not saved!
>   }
>
> Enjoy,
>   John
>
>
>
> On Apr 21, 9:37 pm, "Dave Maharaj :: WidePixels.com"
>  wrote:
>> Would something like this work for cleaning data?
>>
>> function beforeSave() {
>>   App::import('Sanitize');
>>   Sanitize::paranoid($this->data);
>>   }
>>
>> and then in the controller
>>
>> if ($this->User->save($this->data)) {
>>
>> $this->beforeSave();
>>
>> }
>>
>> trying to figure out a way to clean the data easier rather than adding to
>> the cotroller
>>
>> $this->params['form']['value'] =
>> Sanitize::clean($this->params['form']['value'], array(' '));
>>
>> Thanks,
>>
>> Dave
> >
>

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Help with random ID function

2009-04-22 Thread mscdex

Why not use a loop instead of recursion? Unless there's something I'm
missing.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Help with random ID function

2009-04-22 Thread brian

On Tue, Apr 21, 2009 at 5:31 PM, Dave Maharaj :: WidePixels.com
 wrote:
> I am trying to generate a 6 character unique id using this in my model:
>
> function generateJobKey()
>   {
>   // creates a 6 digit key
>   $key = substr(md5(uniqid(rand(), true)),0,6);
>     //checkto make sure its not a duplcate
>   $q = $this->find('first', array('conditions', array('Job.key' =>
> $key)));
>     if(!$q){
>  //if founds re-run the function
>  $this->generateJobKey();
>
>     } else {
>    return $key;
>     }
>  }

It should be:
if ($q){
 //if founds re-run the function
  return $this->generateJobKey();

You want to make a new query if $q is not empty. Then, you need to
return properly or the 2nd call will produce nothing.

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Share bootstrap.php across multiple apps

2009-04-22 Thread Brendon Kozlowski

In essence, it's simply a PHP file, it's just contained within a
framework.  I see no reason why you couldn't set up a single bootstrap
file, place it in a directory higher in your folder structure, and
then use include(); in each of your apps.

On Apr 22, 9:17 am, Ernesto  wrote:
> Hello.
>
> here's some "Extreme Cake-multiapp-ing"
>
> is there any way to share the same "bootstrap.php" across multiple
> apps??
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Named Parameters with Arrays

2009-04-22 Thread Dr. Loboto

Read trac carefully: it is not a bug but an enhancement in status
"new" - no one even thought about to implement it. If you want this
functionality, take and apply attached patch yourself.

On Apr 21, 11:29 pm, Jesse  wrote:
> I found a bug track for the exact problem that I'm 
> having:https://trac.cakephp.org/ticket/5449
>
> To me, it looks like this bug should be fixed, but it's still not
> working for me.
>
> If my URL is :www.example.com/controller/search/cat[]:4/cat[]:5
> This is the output.
>
> Array
> (
>     [pass] => Array
>         (
>         )
>
>     [named] => Array
>         (
>             [cat[]] => 5
>         )
>
>     [controller] => onsale_coupons
>     [action] => search
>     [plugin] =>
>     [form] => Array
>         (
>         )
>
>     [url] => Array
>         (
>             [url] => onsale_coupons/search/cat[]:4/cat[]:5
>         )
>
>     [isAjax] =>
> )
>
> My cake version is 1.2.2.8120 (just downloaded today).
>
> Anyone know why?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Pulling data to use in default.ctp menu

2009-04-22 Thread blake

Hello,

I have a menu being generated in my default.ctp file, and I need the
menu options to change depending on a users permissions. I have a
component to handle all the checking and returning an array I can use,
but I am unsure how to properly get that data into the default.ctp
layout.

What controller would I use the component in to pass the data through
to default.ctp?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: PhpED and code completion

2009-04-22 Thread Brendon Kozlowski

Google was my friend.
http://www.nusphere.com/php/cakephp.htm

On Apr 22, 2:36 am, Petr Vytlačil  wrote:
> HI,
> Im tryPhpEdbut i dont know how setting code completion in cotroller.
> For example: I have UsersController and a need call $this->User->find
> ('all');, but thisPhpEDcant auto competing.
> Is any way how write same rule for suggestion methods from models?
>
> THX
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Can't share elements between apps

2009-04-22 Thread Ernesto

Hello.

view sharing works, but not elements sharing

here's a snippet from my bootstrap.php

if (!defined('SHARED_ITEMS_FOLDER')) {
define('SHARED_ITEMS_FOLDER',
CAKE_CORE_INCLUDE_PATH .'\shared_items');
}

$viewPaths = array(SHARED_ITEMS_FOLDER .'\views');

My webroot dir tree is this:

WebRoot
cake
apps
shared_items
helpers
views
elements




--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Google Gears on CakePHP

2009-04-22 Thread Eber Freitas Dias
You can always develop it yourself :)

On Wed, Apr 22, 2009 at 12:14 AM, mixersoft  wrote:

>
> Hi,
>
> I recently saw this on the Gears On Rails project for integrating
> Google Gears into the Rails framework for offline applications.
>
> http://ajaxian.com/archives/interview-with-the-gears-on-rails-team
>
> http://code.google.com/p/gearsonrails/
>
> Is there any work to do something similar in CakePHP? I need to build
> an online/offline photo management app, but I want to stick with
> CakePHP.
>
> Thx.
>
> >
>


-- 
Éber Freitas Dias

www.eberfdias.com
www.dejamps.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Share bootstrap.php across multiple apps

2009-04-22 Thread Ernesto

Hello.

here's some "Extreme Cake-multiapp-ing"

is there any way to share the same "bootstrap.php" across multiple
apps??
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SaveAll to save Parsed Array not working.

2009-04-22 Thread smithtrev...@googlemail.com

Thanks, how would I go about changing the index on the array then?

My array also looks slightly different from yours, and idea how to
change it to the same format as yours.

Cheers,
Ali

On Apr 20, 1:55 pm, schneimi  wrote:
> Hi,
>
> when I use saveAll, my data looks like this:
>
> Array
> (
>     [1] => Array
>         (
>             [Team] => Array
>                 (   [name] => Arsenal
>                     [id] => 7
>                 )
>
>         )
>
>     [2] => Array
>         (
>             [Team] => Array
>                 (
>                     [name] => Aston Villa
>                     [id] => 9
>                 )
>
>         )
> )
>
> Not sure if that's the reason, but this way it definitely works.
>
> I remember that it was important that the index starts with 1 (maybe
> not with the newest cake), so maybe yours work too and you just have
> to increase the index.
>
> Hope this helps,
>
> Michael
>
> smithtrev...@googlemail.com schrieb:
>
> > Hello, I've parsed some XML, and am attempting to save it using the
> > saveAll() method, however it does not save, give me an error message
> > or anything like that. Just nothing happens. I think it thinks it is
> > saving, I've tried test messages to appear if saving occurs, and they
> > always appear.
>
> > Here is the code I'm using to try and save:
> >  $xml =& new XML($file);
> >  $xml = Set::reverse($xml);
> >  $success = $this->Team->saveAll($xml['Teams']);
>
> > Here is an extract from the controller dump of the array that I'm
> > trying to save...
> >             [useDbConfig] => default
> >             [useTable] => teams
> >             [displayField] => name
> >             [id] =>
> >             [data] => Array
> >                 ( [Team] => Array
> >                         (   [0] => Array
> >                                 (   [name] => Arsenal
> >                                     [id] => 7
> >                                 )
>
> >                             [1] => Array
> >                                 (   [name] => Aston Villa
> >                                     [id] => 9
> >                                 )))
>
> > Interestingly it saves if I attempt to save just one record. For
> > example, if I try to remove one of the teams, and the [0] , [1]  or
> > [n] disappears, to make this.
>
> >              ( [Team] => Array
> >                                (   [name] => Arsenal
> >                                    [id] => 7
> >                                 )
>
> > Any ideas why this isn't working?
> > Thanks in advance for any help!
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP and web services support

2009-04-22 Thread Ma'moon
Well, i will build an entertainment portal that includes a lot of stuff like
video galleries, image galleries and a lot of other categories, i am
intending to build it in CakePHP and i need to have it REST enabled because
this channel will be integrated with other channels that forms a whole web
directory, i have already read the link you have sent before you send it and
i have also seen other links like this bakery
articlebut
what i have found is either not being explained enough since it shows
the basic usage or it was out dated and dedicated for 1.1!
The REST API should handle the CRUD operations for viewing, updating,
adding, and deleting actions and that would include more than 1 category
(videos, images ... etc) and it should also handle the returned server
output to support json and XML!

Thanks for your time and help!

On Wed, Apr 22, 2009 at 6:51 AM, Graham Weldon wrote:

>
> I think that if the book page linked doesnt help you to achieve what you
> need, perhaps being a little more specific with what you are trying to
> achieve will allow us to assist you in a more effective manner.
>
> Cheers,
> Graham
>
>
> Ma'moon wrote:
>
> O.K, thats my false for not mentioning that i have already RTFMed & googled
> it and i couldn't find any good examples!
> Any other resources? i appreciate all the help!
>
> On Wed, Apr 22, 2009 at 6:25 AM, Graham Weldon wrote:
>
>>
>> I'm going to say it... RTFM.
>>
>> http://book.cakephp.org/view/476/REST
>>
>> Cheers,
>> Graham
>>
>>
>> Ma'moon wrote:
>> > Hello guys,
>> > Any one knows a good example usage for creating RESTfull web services
>> > in CakePHP 1.2?
>> >
>> > --
>> > http://phpirate.net
>> >
>> > >
>>
>>
>>
>>
>
>
> --
> http://phpirate.net
>
>
>
>
> >
>


-- 
http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How do you add find restrictions to a model?

2009-04-22 Thread Martin Westin

Hi,
I was wondering how to best add some basic restrictions or "filters"
for a Model?
Hint: beforeFind doesn't do it for me.

beforeFind only fires for "primary" finds, not when the model is
pulled as a relation.
The association array's 'conditions' work for related finds using
recursive but not contained finds.

I end up having to copy the simple condition around to every query
that touches on the model. Since it doesn't sound DRY I think I may
have missed some simple yet brilliant.

I have two examples.
- One is a field for a social-security number or phone number. You may
want to make sure any conditions for all queries get a "normalized"
form of the field-value. Not just for straight finds but Contains and
other finds from a related model.
- The other example is a legacy database that stores 5 "types" of
"items" and you only ever want the app to see 3 of those types.

This could even just be an enabled flag or the example of how the
cookbook suggests using beforeFind.
http://book.cakephp.org/view/680/beforeFind
---
You might use this callback to restrict find operations based on a
user’s role, or make caching decisions based on the current load.
---

This sentence and the fact that there are behaviours like
soft_deletable that rely on beforeFind further make me think I have
missed something.

/Martin
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Sanitize

2009-04-22 Thread John Andersen

Hi Dave,

In your model, add the Sanitize usage, then in your controller, just
save as normal. Like:

Model:
function beforeSave() {
   App::import('Sanitize');
   $this->data = Sanitize::paranoid( $this->data );
}

Controller:
...
   if ( $this->User->save( $this->data ) ) {
  // All is well with the save, it was validated, sanitized and
saved.
   } else {
  // Woa, failed validattion and thus not saved!
   }

Enjoy,
   John



On Apr 21, 9:37 pm, "Dave Maharaj :: WidePixels.com"
 wrote:
> Would something like this work for cleaning data?
>
> function beforeSave() {
>   App::import('Sanitize');
>   Sanitize::paranoid($this->data);
>   }
>
> and then in the controller
>
> if ($this->User->save($this->data)) {
>
> $this->beforeSave();
>
> }
>
> trying to figure out a way to clean the data easier rather than adding to
> the cotroller
>
> $this->params['form']['value'] =
> Sanitize::clean($this->params['form']['value'], array(' '));
>
> Thanks,
>
> Dave
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Console not working - open_basedir restriction errors

2009-04-22 Thread Martin Westin


You have installed Cake in a directory that is not allowed by your php
configuration.

http://www.php.net/manual/en/features.safe-mode.php

Look in your php.ini (possibly in /etc/) for the directive to change
the allowed directories. (But I am not sure Cake works that well under
"safe mode" even in an allowed directory.)

I guess your path is a symlink at some point?
~/workspace/www/blog/cake/console would normally be
/home/usename/workspace/www/blog... but according to php it is
/opt/lampp/htdocs/blog...

/Martin


On Apr 22, 12:10 pm, Cepheus  wrote:
> Hey everyone,
>
> I've installed cakephp by checking out the SVN repository. When I try
> to run the cake console, I receive the following output:
>
> [cep...@cephah-laptop ~/workspace/www/blog/cake/console]$ ./cake
>
> Warning: require_once(): open_basedir restriction in effect. File(/opt/
> lampp/htdocs/blog/cake/basics.php) is not within the allowed path(s):
> (/srv/http/:/home/:/tmp/:/usr/share/pear/) in /opt/lampp/htdocs/blog/
> cake/console/cake.php on line 155
>
> Warning: require_once(/opt/lampp/htdocs/blog/cake/basics.php): failed
> to open stream: Operation not permitted in /opt/lampp/htdocs/blog/cake/
> console/cake.php on line 155
>
> Fatal error: require_once(): Failed opening required '/opt/lampp/
> htdocs/blog/cake/basics.php' (include_path='.:/usr/share/pear') in /
> opt/lampp/htdocs/blog/cake/console/cake.php on line 155
> [cep...@cephah-laptop ~/workspace/www/blog/cake/console]$
>
> I've tried looking around the web but I haven't found anything that
> worked. Does anyone know what I need to do to rectify this problem?
>
> Thanks in advance,
> Michael.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP and web services support

2009-04-22 Thread Graham Weldon

I think that if the book page linked doesnt help you to achieve what you 
need, perhaps being a little more specific with what you are trying to 
achieve will allow us to assist you in a more effective manner.

Cheers,
Graham


Ma'moon wrote:
> O.K, thats my false for not mentioning that i have already RTFMed & 
> googled it and i couldn't find any good examples!
> Any other resources? i appreciate all the help!
>
> On Wed, Apr 22, 2009 at 6:25 AM, Graham Weldon 
> mailto:gra...@grahamweldon.com>> wrote:
>
>
> I'm going to say it... RTFM.
>
> http://book.cakephp.org/view/476/REST
>
> Cheers,
> Graham
>
>
> Ma'moon wrote:
> > Hello guys,
> > Any one knows a good example usage for creating RESTfull web
> services
> > in CakePHP 1.2?
> >
> > --
> > http://phpirate.net
> >
> > >
>
>
>
>
>
>
> -- 
> http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Model source code not refreshing

2009-04-22 Thread grigri

> Well there's several hours of my life I'll never get back.  It would
> have been nice if CakePHP logged where it tried to look for a model
> and that it was defaulting to an auto-generated MyModel class in its
> absence.

That's easy enough to do:

class AppModel extends Model {
function __construct($id = false, $table = null, $ds = null) {
  parent::__construct($id, $table, $ds);
  if (strtolower(get_class($this)) == 'appmodel') {
$this->log("Auto-creating model. I really wish I had called
debug_backtrace in order to tell which line called this but I didn't.
Haha.");
  }
}
}

hth
grigri

On Apr 22, 4:18 am, Temujin  wrote:
> > If your model named MyModel, its file should be named my_model.php
> > Most of such problems with models are in wrong model file name.
>
> Sweet mother of mercy, that was it. Renaming app/model/MyModel.php to
> app/model/my_model.php worked. This has got to go down as one of the
> most bone-headed mistakes I've done in a long time.  I guess this is
> what I get for going to-from Java/Spring and PHP/Cake on a daily
> basis.
>
> Well there's several hours of my life I'll never get back.  It would
> have been nice if CakePHP logged where it tried to look for a model
> and that it was defaulting to an auto-generated MyModel class in its
> absence.
>
> Thanks Dr. Loboto!
>
> On Apr 21, 7:19 pm, "Dr. Loboto"  wrote:
>
> > You should restore original folders structure inside app/tmp - cake do
> > not create subdirs itself in runtime and heavily depends on own cache.
> > To check consistency in all other app parts is also very good idea.
>
> > Check your log message - is model class MyModel? I think it should be
> > AppModel that indicates your model was not loaded, but generic one is
> > created.
>
> > If your model named MyModel, its file should be named my_model.php
> > Most of such problems with models are in wrong model file name.
>
> > On Apr 22, 7:11 am, Temujin  wrote:
>
> > > Any thoughts on this one?  This project is pretty much halted until I
> > > can figure out what's going on.
>
> > > One though I've had is perhaps some CakePHP file is corrupt or
> > > missing, so I'm going to do a diff between a fresh CakePHP app and
> > > mine to see if anything seems out of the ordinary.
>
> > > On Apr 21, 10:42 am, Temujin  wrote:
>
> > > > Here's another thought.
>
> > > > I noticed that in my efforts to remedy this, I completely deleted the
> > > > contents of the app/tmp directory (should be harmless, no?).
>
> > > > Looking at that delete, i noticed the file app/tmp/cache/persistent/
> > > > cake_core_core_paths which has a serialized array in it with what
> > > > appears to be paths to all of the folders cake uses to load things
> > > > from.  This file no longer exists, and has not been regenerated.  Is
> > > > it possible that you need this tmp file in order for cake to load
> > > > models?
>
> > > > Of course, the big hole in this theory is that it seems to be able to
> > > > load my controllers/helpers/etc. just fine without it.
>
> > > > On Apr 21, 10:21 am, Temujin  wrote:
>
> > > > > > Google won't show you your own posts until someone replies to them.
> > > > > > It's very irritating.
>
> > > > > Yes, that is annoying.
>
> > > > > I would make sense if CakePHP was generating a model from just the
> > > > > database table since
> > > > > I've followed naming convensions.  I have validation rules in my PHP
> > > > > model class, and when
> > > > > I do $this->log(print_r($this->MyModel, true), LOG_DEBUG) in my
> > > > > controller I essentially see
> > > > > a stubbed model with the columns derived from the table in the DB.
>
> > > > > What would cause CakePHP to ignore my model though?
>
> > > > > Here's my setup (using cake_1.2.2.8120):
>
> > > > > === app/models/MyModel.php ===
> > > > >  > > > > class MyModel extends AppModel {
> > > > >   var $name = 'MyModel';
> > > > >   var $validate = array(... validation here ...);}
>
> > > > > ?>
> > > > > =
>
> > > > > === app/controllers/my_controller.php ===
> > > > >  > > > > class MyController extends AppController {
> > > > >   var $uses = array('MyModel');
> > > > >   var $helpers = array('Html', 'Javascript');
> > > > >   var $components = array('Session');
>
> > > > >   function index() {
> > > > >         // this is what logs the empty stubbed model CakePHP appears
> > > > > to have generated
> > > > >         $this->log("\$this->MyModel: ".print_r($this->MyModel, true),
> > > > > LOG_DEBUG);
> > > > >         $result = $this->MyModel->save($this->data);
> > > > >         if ($result) {
> > > > >             $this->log("valid result");
>
> > > > >             $this->Session->setFlash("Sucess",
> > > > >                                          'default',
> > > > >                                          array('class' => 'success'));
> > > > >         }
> > > > >         else {
> > > > >             $this->log("invalid result");
>
> > > > >             $this->Session->se

Re: "TERM environment variable not set" in cron/shell

2009-04-22 Thread Matt Curry

I'm pretty sure this came up before and I suggested this solution:

Wrap the cron job in a shell script with this at the top
TERM=linux
export TERM

but then someone suggested a better solution...I don't remember the
better one though :(

-Matt
http://www.pseudocoder.com


On Apr 21, 6:07 pm, Miles J  wrote:
> So I got a shell working when a cron is run, but this error is at the
> top. Anyone know how to fix it?
>
> TERM environment variable not set.
>
> Welcome to CakePHP v1.2.2.8120 Console
> ---
> App : app
> Path: /path/here/
> ---
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP and web services support

2009-04-22 Thread Ma'moon
O.K, thats my false for not mentioning that i have already RTFMed & googled
it and i couldn't find any good examples!
Any other resources? i appreciate all the help!

On Wed, Apr 22, 2009 at 6:25 AM, Graham Weldon wrote:

>
> I'm going to say it... RTFM.
>
> http://book.cakephp.org/view/476/REST
>
> Cheers,
> Graham
>
>
> Ma'moon wrote:
> > Hello guys,
> > Any one knows a good example usage for creating RESTfull web services
> > in CakePHP 1.2?
> >
> > --
> > http://phpirate.net
> >
> > >
>
>
> >
>


-- 
http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP and web services support

2009-04-22 Thread Graham Weldon

I'm going to say it... RTFM.

http://book.cakephp.org/view/476/REST

Cheers,
Graham


Ma'moon wrote:
> Hello guys,
> Any one knows a good example usage for creating RESTfull web services 
> in CakePHP 1.2?
>
> -- 
> http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CakePHP and web services support

2009-04-22 Thread Ma'moon
Hello guys,
Any one knows a good example usage for creating RESTfull web services in
CakePHP 1.2?

-- 
http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Console not working - open_basedir restriction errors

2009-04-22 Thread Cepheus

Hey everyone,

I've installed cakephp by checking out the SVN repository. When I try
to run the cake console, I receive the following output:

[cep...@cephah-laptop ~/workspace/www/blog/cake/console]$ ./cake

Warning: require_once(): open_basedir restriction in effect. File(/opt/
lampp/htdocs/blog/cake/basics.php) is not within the allowed path(s):
(/srv/http/:/home/:/tmp/:/usr/share/pear/) in /opt/lampp/htdocs/blog/
cake/console/cake.php on line 155

Warning: require_once(/opt/lampp/htdocs/blog/cake/basics.php): failed
to open stream: Operation not permitted in /opt/lampp/htdocs/blog/cake/
console/cake.php on line 155

Fatal error: require_once(): Failed opening required '/opt/lampp/
htdocs/blog/cake/basics.php' (include_path='.:/usr/share/pear') in /
opt/lampp/htdocs/blog/cake/console/cake.php on line 155
[cep...@cephah-laptop ~/workspace/www/blog/cake/console]$

I've tried looking around the web but I haven't found anything that
worked. Does anyone know what I need to do to rectify this problem?

Thanks in advance,
Michael.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: finderQuery help

2009-04-22 Thread John Andersen

If you have specified correctly in each of your models, that:
City hasMany Neighborhood hasMany Location

and specified correctly the name of the table associated with each
model (if not the plural form of the model name), in this case,
Location model assumes locations table.

So in order to tell CakePHP that your Location models table is
"alllocations", add the useTable variable as specified in the
documentation at http://book.cakephp.org/view/436/useTable.

Then you should be able to use:
$myCityLocations = $this->City->find('all', array('conditions' => array
('City.id' => $myCityId), 'recursive' => 2));

!!! Correct me if I am wrong :) !!!

Best wishes,
   John

On Apr 22, 12:02 am, magicseth  wrote:
> Hello, I am new to Cake from Rails,
>
> I currently have a City Model, a Neighborhood Model, and a Location Modle.
>
> Location belongs to a neighborhood, and a neighborhood belongs to a city.  I
> am trying to get all of the locations for a city using something like this:
>
> var $hasMany = array(
>     'Location' => array(
>         'className' => 'Location',
>         'finderQuery' => 'SELECT allLocations.*, FROM neighborhoods,
> allLocations WHERE {$__cakeID__$} = neighborhoods.city_id AND
> allLocations.neighborhood_id = neighborhoods.id '
>     )
> );
>
> Is this the right path?  I am running into an error:
>
> Missing Database Table
>
> Error: Database table locations for model Location was not found.
>
> How can I specify that the table is called allLocations?
>
> Thanks,
> -Seth
> --
> View this message in 
> context:http://www.nabble.com/finderQuery-help-tp23162894p23162894.html
> Sent from the CakePHP mailing list archive at Nabble.com.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: APC not actually caching

2009-04-22 Thread Miles J

Make sure these settings are as follows:

Configure::write('Cache.disable', false);
Configure::write('Cache.check', true);
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: log fatal php errors

2009-04-22 Thread Miles J

Well if its not working on dev server, why would you try it on prod?
Try putting the () in the class call, new Memcache().

- Does your prod server have the same ini settings and debug as dev?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: APC not actually caching

2009-04-22 Thread Martin Westin

I haven't used APC myself but one simple check is to make sure you
have debug set to 0. I think that with debug active you won't get much
caching.

You can try the same app locally using one of the AMPs (WAMP, MAMP,
XAMPP) with APC enabled too see if the problem is your Cake app or the
server installation. I know MAMP has APC, eAccelerator and XCache
ready to rock. I used that to see which one I should go for and then
did the server install (or eAccelerator which seemed best to me)



On Apr 21, 11:33 pm, Daniel  wrote:
> Hi all!
>
> I installed APC on my custom PHP installed on Dreamhost.  The phpinfo
> () page says that the APC extension has been installed, but I didn't
> notice any actual increase in performance on my CakePHP-based site.  I
> copied the apc.php file to the root, and it says that only one page is
> actually being cached, the apc.php page itself.
>
> I of course added the following line to core.php: Cache::config
> ('default', array('engine'=>'Apc'));
>
> Nevertheless, APC doesn't seem to actually be caching anything on my
> site.
>
> Thoughts?  Did I miss a step?  I've tried it with both FastCGI and
> without.  Thanks for your help.
>
> Regards,
>
> Daniel
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



log fatal php errors

2009-04-22 Thread Henrik Gemal

On my production server I have:
In core.php in Cakephp:
Configure::write('debug', 0);
In PHP.ini:
error_reporting  =  E_ALL
display_errors = Off
log_errors = On
error_log = "\phperror.log"

Consider the following PHP code and memcache ISN'T installed:


On my Development server which is running with debug=3 I get:
Fatal Error: Class "Memcache" not found...
The error in shown to the user and logged in my phperror.log. Which is
correct!

BUT...
if I copy that file to my production server I'm just presented with a
blank page (which is correct) but the error isn't recorded in
phperror.log

Am I or CakePHP doing something wrong?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with cake website.

2009-04-22 Thread nastya

recently i had the same problem and it took some hours for me to
discover a special place in the host's admin panel where i had to turn
on the .htaccess. by default it ignored all .htaccess.

On Apr 22, 9:32 am, deepesh gairola  wrote:
> Sorry for the private reply i didnt noticed that  by mistake i clicked
> on reply to author :D
>
> I will surely try using debug mode on
>
> Thankx & Regards
>
> On Apr 22, 12:28 pm, John Andersen  wrote:
>
> > Hi Deepesh,
>
> > Please reply to the group, not directly to me :)
>
> > Going to your site I get the list of categories and the login form
> > without any styling!
>
> > Are there any differences in our directory structure - comparing your
> > site directory structure to the local machines directory structure?
>
> > Turn on debug, so you can see any warnings on your site! Then write
> > back again!
> >    John
>
> > On Apr 22,10:10 am, deepesh gairola  wrote:
>
> > > Hi John,
> > >                  Thankx for your reply.
> > > I am using it inside  http://indianwebcompany.com/blog_site
> > > blog_site is the cake folder
> > > Regards
>
> > On Apr 22, 10:01 am, John Andersen  wrote:
>
> > > What is the directory structure at your local machine and at your
> > > host?
>
> > > In which directories are CakePHP and your application located in both
> > > of the above structures?
>
> > > What is the address (url) you are trying to invoke?
>
> > > Enjoy,
> > >    John
>
> > > On Apr 22, 9:18 am, deepesh gairola  wrote:
>
> > > > Hi friends,
> > > >                   I have recently uploaded a cake php application on
> > > > my host.
>
> > > > What i am stuck up with is that .
>
> > > > Cake Application works fine with local machine.
>
> > > > But when i uploaded it on my host with a separate folder like
>
> > > > mywebsite.com / cakefolder
>
> > > > its not running .
>
> > > > No css detection , the links are redirecting to 404 .
>
> > > > Want to know whether it need some config tweaks or routing settings .
>
> > > > Please help me i am screwed  up with this .
>
> > > > Thankx & Regards
> > > > Deepesh
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: find fields to exclude?

2009-04-22 Thread John Andersen

Just looked through the code :) and no, it accepts a positive list of
fields to include!

But maybe this will lighten your job of specifying the fields to
include. You can specify the fields parameter as a string with comma
separated field names, like:
'fields' =>
'id,name,created,modified,user_id,data1,data2,data3,data4,data5,data6'

Hope it helps, just a little :)
   John

On Apr 22, 7:32 am, "Dave Maharaj :: WidePixels.com"
 wrote:
> I know you can select what fields to return data from a find querybut is
> there a way to exclude fields rather than typing out all the ones you want?
>
> thanks
>
> Dave
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with cake website.

2009-04-22 Thread deepesh gairola

Sorry for the private reply i didnt noticed that  by mistake i clicked
on reply to author :D

I will surely try using debug mode on

Thankx & Regards

On Apr 22, 12:28 pm, John Andersen  wrote:
> Hi Deepesh,
>
> Please reply to the group, not directly to me :)
>
> Going to your site I get the list of categories and the login form
> without any styling!
>
> Are there any differences in our directory structure - comparing your
> site directory structure to the local machines directory structure?
>
> Turn on debug, so you can see any warnings on your site! Then write
> back again!
>    John
>
> On Apr 22,10:10 am, deepesh gairola  wrote:
>
> > Hi John,
> >                  Thankx for your reply.
> > I am using it inside  http://indianwebcompany.com/blog_site
> > blog_site is the cake folder
> > Regards
>
> On Apr 22, 10:01 am, John Andersen  wrote:
>
> > What is the directory structure at your local machine and at your
> > host?
>
> > In which directories are CakePHP and your application located in both
> > of the above structures?
>
> > What is the address (url) you are trying to invoke?
>
> > Enjoy,
> >    John
>
> > On Apr 22, 9:18 am, deepesh gairola  wrote:
>
> > > Hi friends,
> > >                   I have recently uploaded a cake php application on
> > > my host.
>
> > > What i am stuck up with is that .
>
> > > Cake Application works fine with local machine.
>
> > > But when i uploaded it on my host with a separate folder like
>
> > > mywebsite.com / cakefolder
>
> > > its not running .
>
> > > No css detection , the links are redirecting to 404 .
>
> > > Want to know whether it need some config tweaks or routing settings .
>
> > > Please help me i am screwed  up with this .
>
> > > Thankx & Regards
> > > Deepesh
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with cake website.

2009-04-22 Thread John Andersen

Hi Deepesh,

Please reply to the group, not directly to me :)

Going to your site I get the list of categories and the login form
without any styling!

Are there any differences in our directory structure - comparing your
site directory structure to the local machines directory structure?

Turn on debug, so you can see any warnings on your site! Then write
back again!
   John


On Apr 22,10:10 am, deepesh gairola  wrote:
> Hi John,
>  Thankx for your reply.
> I am using it inside  http://indianwebcompany.com/blog_site
> blog_site is the cake folder
> Regards

On Apr 22, 10:01 am, John Andersen  wrote:
> What is the directory structure at your local machine and at your
> host?
>
> In which directories are CakePHP and your application located in both
> of the above structures?
>
> What is the address (url) you are trying to invoke?
>
> Enjoy,
>    John
>
> On Apr 22, 9:18 am, deepesh gairola  wrote:
>
> > Hi friends,
> >                   I have recently uploaded a cake php application on
> > my host.
>
> > What i am stuck up with is that .
>
> > Cake Application works fine with local machine.
>
> > But when i uploaded it on my host with a separate folder like
>
> > mywebsite.com / cakefolder
>
> > its not running .
>
> > No css detection , the links are redirecting to 404 .
>
> > Want to know whether it need some config tweaks or routing settings .
>
> > Please help me i am screwed  up with this .
>
> > Thankx & Regards
> > Deepesh
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creationdate column in database is filled null

2009-04-22 Thread gaurav.v.sharma

Thanks a lot.  It solved my problem. :-)

On Apr 15, 10:56 pm, Brendon Kozlowski  wrote:
> In your /app/config/bootstrap.php file, before the ending ?> (if the
> file contains one), use the following PHP code:
>
> date_default_timezone_set('America/New_York');
>
> You can find your OWN area's timezone by checking the examples 
> fromhttp://php.net/timezones- just switch the string in the function call
> with your own timezone.  It *should* fix the inserted datetime to be
> what you expect.
>
> On Apr 13, 12:56 pm, brian  wrote:
>
> > Perhaps your server is running in a different timezone than you are.
>
> > On Mon, Apr 13, 2009 at 2:45 AM, gaurav.v.sharma
>
> >  wrote:
>
> > > Thanks a lot, it worked perfectly fine :-)  But the "time part" in
> > > the created field is not having the correct value for current time ...
> > > what should be done in that case...
>
> > > On Apr 12, 9:23 pm, brian  wrote:
> > >> Change the field name to "created" and add another named, "modified".
> > >> Both of them should be defined like so:
>
> > >> DATETIME DEFAULT NULL
>
> > >> Cake will then set the value when/where appropriate.
>
> > >> On Sun, Apr 12, 2009 at 2:05 AM, gaurav.v.sharma
>
> > >>  wrote:
>
> > >> > Hi all :-),
>
> > >> > I have created a small application using the bake command. While
> > >> > designing the database for the application I created a column named
> > >> > "creationdate" in every table so as to record the date and time of
> > >> > that operation.
>
> > >> > I donot allow user to enter this "creationdate" value infact I have
> > >> > created the column attribute as "on Update set current timestamp" and
> > >> > the datatype as timestamp. This is handled by mysql itself and the
> > >> >creationdateis automatically filled with current date and time
> > >> > whenever an insert operation is performed on the table.
>
> > >> > Earlier (when I was not using cakephp framework) these values were
> > >> > updated automatically but now that I have started using cakephp these
> > >> > values are going as null in the database.
>
> > >> > What should I do when I want to update the "creationdate" column
> > >> > automatically whenever an insert/update operation is performed.
>
> > >> > I am using XAMPP v 1.7.0 which is having following version of
> > >> > apache,mysql and php
> > >> >    * Apache HTTPD 2.2.11
> > >> >    * MySQL 5.1.30
> > >> >    * PHP 5.2.8- 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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with cake website.

2009-04-22 Thread deepesh gairola

Hi,
 http://indianwebcompany.com/blog_site

this is the url

regards


On Apr 22, 12:01 pm, John Andersen  wrote:
> What is the directory structure at your local machine and at your
> host?
>
> In which directories are CakePHP and your application located in both
> of the above structures?
>
> What is the address (url) you are trying to invoke?
>
> Enjoy,
>    John
>
> On Apr 22, 9:18 am, deepesh gairola  wrote:
>
> > Hi friends,
> >                   I have recently uploaded a cake php application on
> > my host.
>
> > What i am stuck up with is that .
>
> > Cake Application works fine with local machine.
>
> > But when i uploaded it on my host with a separate folder like
>
> > mywebsite.com / cakefolder
>
> > its not running .
>
> > No css detection , the links are redirecting to 404 .
>
> > Want to know whether it need some config tweaks or routing settings .
>
> > Please help me i am screwed  up with this .
>
> > Thankx & Regards
> > Deepesh
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with cake website.

2009-04-22 Thread John Andersen

What is the directory structure at your local machine and at your
host?

In which directories are CakePHP and your application located in both
of the above structures?

What is the address (url) you are trying to invoke?

Enjoy,
   John

On Apr 22, 9:18 am, deepesh gairola  wrote:
> Hi friends,
>                   I have recently uploaded a cake php application on
> my host.
>
> What i am stuck up with is that .
>
> Cake Application works fine with local machine.
>
> But when i uploaded it on my host with a separate folder like
>
> mywebsite.com / cakefolder
>
> its not running .
>
> No css detection , the links are redirecting to 404 .
>
> Want to know whether it need some config tweaks or routing settings .
>
> Please help me i am screwed  up with this .
>
> Thankx & Regards
> Deepesh
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---