|Revisted| Validation of a related Model

2007-11-06 Thread R. Rajesh Jeba Anbiah

Previous discussions:
1.  
http://groups.google.com/group/cake-php/browse_thread/thread/856cda8e27da925f
2. https://trac.cakephp.org/ticket/2473

Summary:
I still don't get it working.

Case:
1. add.ctp
$form->create('model1')
...
$form->input('a');
$form->input('b');
$form->input('model2.x');

2. controller1::add()
$this->model1->save($this->data);
$this->model1->model2->save($this->data['model2']);

Problem:
1. $form->input('model2.x'); doesn't render input field with required
class. Note, model2->validate['x'] is set with proper rules.
2. From controller1::add()
$this->model1->model2->save($this->data['model2']) correctly shows the
validation error message in 'model2.x'
3. *But*, from controller1::add()
$this->model1->model2->validates() doesn't show validation error
message in 'model2.x'--it always get validated.

Side notes:
1. Invalidating from controller1::add() seems to work. But,
$this->model1->model2->invalidate('x'); shows "1" next to the
'model2.x'


Does anyone know how to get it working?

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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?hl=en
-~--~~~~--~~--~--~---



Re: How to get value from method post (calendar)

2007-11-06 Thread Grant Cox

Should be in $this->params['form']['t0']


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: I want gData

2007-11-06 Thread keymaster

Not sure how much mileage you're going to get out of a blunt "I want".


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: I want gData

2007-11-06 Thread Gaurav Sharma
I second that. I think having wrappers for gData API will help spread cake
as well.

On Nov 6, 2007 7:11 PM, Mr-Yellow <[EMAIL PROTECTED]> wrote:

>
> https://trac.cakephp.org/ticket/723
>
> I don't think it matters that gData is proprietry as it is now
> becoming a foundation for more open standards
>
> For example OpenSocial.
>
> For a CakePHP developer to create an AtomPub backend for OpenSocial
> they will likely need a gData generator/wrapper.
>
> -Ben
>
>
> >
>

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread seacloud9

Ritesh, thanks for the recipe it will help out my bakery.  Thanks:)

On Nov 6, 9:53 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> On 11/6/07, bingo <[EMAIL PROTECTED]> wrote:
>
>
>
> > or you can ready my blog :)
> >http://ragrawal.wordpress.com/2007/11/07/script-for-removing-blank-sp...
>
> So as a side note this would also be useful for all the people that
> have problems with jpGraph, imagemagik, using gd to make images and
> such as these issues can trip you up there as well
>
> Sam D
>
> --
> (the old fart) the advice is free, the lack of crankiness will cost you
>
> - its a fine line between a real question and an idiot
>
> http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread seacloud9

Ritesh, thanks for the script it will help out my bakery.  Thanks:)

On Nov 6, 9:53 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> On 11/6/07, bingo <[EMAIL PROTECTED]> wrote:
>
>
>
> > or you can ready my blog :)
> >http://ragrawal.wordpress.com/2007/11/07/script-for-removing-blank-sp...
>
> So as a side note this would also be useful for all the people that
> have problems with jpGraph, imagemagik, using gd to make images and
> such as these issues can trip you up there as well
>
> Sam D
>
> --
> (the old fart) the advice is free, the lack of crankiness will cost you
>
> - its a fine line between a real question and an idiot
>
> http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread Samuel DeVore

On 11/6/07, bingo <[EMAIL PROTECTED]> wrote:
>
> or you can ready my blog :)
> http://ragrawal.wordpress.com/2007/11/07/script-for-removing-blank-spaces-before-and-after-php-tags/
>

So as a side note this would also be useful for all the people that
have problems with jpGraph, imagemagik, using gd to make images and
such as these issues can trip you up there as well

Sam D

-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



I want gData

2007-11-06 Thread Mr-Yellow

https://trac.cakephp.org/ticket/723

I don't think it matters that gData is proprietry as it is now
becoming a foundation for more open standards

For example OpenSocial.

For a CakePHP developer to create an AtomPub backend for OpenSocial
they will likely need a gData generator/wrapper.

-Ben


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



How to get value from method post (calendar)

2007-11-06 Thread birumerah

Dear all,

i'm using jscalendar for my cake apps,

but found some problem to get value from view like this:



Dari tanggal

image('cal.gif', array('id' => 
'cal1')); ?>






how can i get value from that calendar (on controller).

thanx for any response.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread bingo

or you can ready my blog :)
http://ragrawal.wordpress.com/2007/11/07/script-for-removing-blank-spaces-before-and-after-php-tags/

On Nov 6, 10:09 pm, bingo <[EMAIL PROTECTED]> wrote:
> hi AD7six, seacloud9, Jon, Mike, francky,
>
> Thanks to all. Finally I was able to get rid of all my spaces. As many
> of you expected, there were many leading and trailing spaces in my
> code and once I removed all of them, everything worked like a charm.
> The good news for other is that I wrote a small script that will
> identify any trailing or leading spaces or new line in your PHP code
> and will inform you about that file. Below is the script that does
> this. Just provide the source location ($sourcepath) of your cakephp
> application and it will recursively go through each file, checking if
> there is any leading or trailing blank spaces.
>
>  /***
> [EMAIL PROTECTED]: Ritesh Agrawal
> [EMAIL PROTECTED]: Identifies php files that contain leading or trailing
> spaces before or after PHP opening or closings tags
> ***/
> //Set Source Path
> $sourcepath = "D:/xampp/xampp/htdocs/memento";
>
> //Regex Express to test leading and trailing spaces
> define("PRE", "#^[\n\r|\n\r|\n|\r|\s]+<\?php#");
> define("POST", "#\?>[\n\r|\n\r|\n|\r|\s]+$#");
>
> //Clear the file Status Cache
> clearstatcache();
>
> // Code borrowed from php.net ===
> // Replace \ by / and remove the final / if any
> $root = ereg_replace( "/$", "", ereg_replace( "[\\]", "/",
> $sourcepath ));
> // Touch all the files from the $root directory
> if( false === m_walk_dir( $root, "check", true )) {
> echo "'{$root}' is not a valid directory\n";
>
> }
>
> // Walk a directory recursivelly, and apply a callback on each file
> function m_walk_dir( $root, $callback, $recursive = true ) {
> $dh = @opendir( $root );
> if( false === $dh ) {
> return false;
> }
> while( $file = readdir( $dh )) {
> if( "." == $file || ".." == $file ){
> continue;
> }
> call_user_func( $callback, "{$root}/{$file}" );
> if( false !== $recursive && is_dir( "{$root}/{$file}" )) {
> m_walk_dir( "{$root}/{$file}", $callback, $recursive );
> }
> }
> closedir( $dh );
> return true;}
>
> //== end ==
>
> //If file, checks whether there is any leading spaces before opening
> PHP tag or
> // trailing spaces after closing PHP tag
> function check( $path ) {
>
> if( !is_dir( $path )) {
> $fh = file_get_contents($path);
>  if(preg_match(PRE, $fh))
>echo $path. " -- contains leading spaces \n";
>  if(preg_match(POST, $fh))
>echo $path . " -- contains trailing spaces \n";
> }
>
> }
>
> ?>
>
> On Nov 6, 6:21 pm, francky06l <[EMAIL PROTECTED]> wrote:
>
>
>
> > BOMS, mean UTF-8 without BOM (byte order marker), this used under
> > windows to mark UTF-8 files (also UCS-2 etc...). Use an hexadecimal
> > editor and you will notice the 3 bytes marking the UTF-8 at the
> > beginning ..
> > Do not know if it's your problem, but quite classical under windows.
> > You can editor such as Notepad++ to check you file in hexa.
> > Hope this helps
>
> > On Nov 7, 12:14 am, seacloud9 <[EMAIL PROTECTED]> wrote:
>
> > > I don't know in eclipse my guess is it would be associated with your
> > > overall preferences listed under encoding (google that) but you most
> > > likely have space before and after your ""  but do
> > > check your model view controllers all of them.  It is a drag and it
> > > did take me several days to do this myself but it was worth it.
>
> > > On Nov 6, 3:52 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > > > hi Seacloud9
>
> > > > I am not sure if I understand what do you mean by UTF-8 "BOMS". How
> > > > can verify that. I am using eclipse as my PHP Editor.
>
> > > > Regards,
> > > > Ritesh
>
> > > > On Nov 6, 4:00 pm, seacloud9 <[EMAIL PROTECTED]> wrote:
>
> > > > > I have had this exact same problem it can hold you up for days..
>
> > > > > Make sure you are using UTF-8 "BOMS".
>
> > > > > Make sure tags in Model, Controller, and Views " > > > > php" "?>"
> > > > > Have no spaces after or before them NONE.  I found one in the cake
> > > > > folder in the app model.  You have six spaces this is literally the
> > > > > cause of your frustrations.  You should check every model, view, and
> > > > > controller..  It does suck but it is what is causing your problem.
>
> > > > > On Nov 6, 1:54 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > > > > > hi AD7six,
>
> > > > > > I tried putting header in default layout for RSS, but didn't work. I
> > > > > > didn't recieve that output buffer already started at XYZ. The only
> > > > > > error that I am getting is "Invalid XML Declaration -  Line: 1
> > > > > > Character: 6". I also tried putting header command in controller
> > > > > > class, but that also didn't work. :-(
>
> > >

Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread bingo

hi AD7six, seacloud9, Jon, Mike, francky,

Thanks to all. Finally I was able to get rid of all my spaces. As many
of you expected, there were many leading and trailing spaces in my
code and once I removed all of them, everything worked like a charm.
The good news for other is that I wrote a small script that will
identify any trailing or leading spaces or new line in your PHP code
and will inform you about that file. Below is the script that does
this. Just provide the source location ($sourcepath) of your cakephp
application and it will recursively go through each file, checking if
there is any leading or trailing blank spaces.

[\n\r|\n\r|\n|\r|\s]+$#");

//Clear the file Status Cache
clearstatcache();

// Code borrowed from php.net ===
// Replace \ by / and remove the final / if any
$root = ereg_replace( "/$", "", ereg_replace( "[\\]", "/",
$sourcepath ));
// Touch all the files from the $root directory
if( false === m_walk_dir( $root, "check", true )) {
echo "'{$root}' is not a valid directory\n";
}

// Walk a directory recursivelly, and apply a callback on each file
function m_walk_dir( $root, $callback, $recursive = true ) {
$dh = @opendir( $root );
if( false === $dh ) {
return false;
}
while( $file = readdir( $dh )) {
if( "." == $file || ".." == $file ){
continue;
}
call_user_func( $callback, "{$root}/{$file}" );
if( false !== $recursive && is_dir( "{$root}/{$file}" )) {
m_walk_dir( "{$root}/{$file}", $callback, $recursive );
}
}
closedir( $dh );
return true;
}
//== end ==


//If file, checks whether there is any leading spaces before opening
PHP tag or
// trailing spaces after closing PHP tag
function check( $path ) {

if( !is_dir( $path )) {
$fh = file_get_contents($path);
 if(preg_match(PRE, $fh))
   echo $path. " -- contains leading spaces \n";
 if(preg_match(POST, $fh))
   echo $path . " -- contains trailing spaces \n";
}
}

?>

On Nov 6, 6:21 pm, francky06l <[EMAIL PROTECTED]> wrote:
> BOMS, mean UTF-8 without BOM (byte order marker), this used under
> windows to mark UTF-8 files (also UCS-2 etc...). Use an hexadecimal
> editor and you will notice the 3 bytes marking the UTF-8 at the
> beginning ..
> Do not know if it's your problem, but quite classical under windows.
> You can editor such as Notepad++ to check you file in hexa.
> Hope this helps
>
> On Nov 7, 12:14 am, seacloud9 <[EMAIL PROTECTED]> wrote:
>
>
>
> > I don't know in eclipse my guess is it would be associated with your
> > overall preferences listed under encoding (google that) but you most
> > likely have space before and after your ""  but do
> > check your model view controllers all of them.  It is a drag and it
> > did take me several days to do this myself but it was worth it.
>
> > On Nov 6, 3:52 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > > hi Seacloud9
>
> > > I am not sure if I understand what do you mean by UTF-8 "BOMS". How
> > > can verify that. I am using eclipse as my PHP Editor.
>
> > > Regards,
> > > Ritesh
>
> > > On Nov 6, 4:00 pm, seacloud9 <[EMAIL PROTECTED]> wrote:
>
> > > > I have had this exact same problem it can hold you up for days..
>
> > > > Make sure you are using UTF-8 "BOMS".
>
> > > > Make sure tags in Model, Controller, and Views " > > > php" "?>"
> > > > Have no spaces after or before them NONE.  I found one in the cake
> > > > folder in the app model.  You have six spaces this is literally the
> > > > cause of your frustrations.  You should check every model, view, and
> > > > controller..  It does suck but it is what is causing your problem.
>
> > > > On Nov 6, 1:54 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > > > > hi AD7six,
>
> > > > > I tried putting header in default layout for RSS, but didn't work. I
> > > > > didn't recieve that output buffer already started at XYZ. The only
> > > > > error that I am getting is "Invalid XML Declaration -  Line: 1
> > > > > Character: 6". I also tried putting header command in controller
> > > > > class, but that also didn't work. :-(
>
> > > > > //views/layouts/rss/default.ctp
> > > > > 
> > > > >  > > > > echo $rss->header();
> > > > > echo '';
> > > > > echo '', Router::url('/', true), '';
> > > > > echo 'en-us';
> > > > > echo '', date("D, j M Y H:i:s", gmmktime()) . ' GMT', ' > > > > pubDate>';
> > > > > echo 'Memento';
> > > > > echo '[EMAIL PROTECTED]';
> > > > > echo '[EMAIL PROTECTED]';
> > > > > echo 'http://blogs.law.harvard.edu/tech/rss';
> > > > > echo $content_for_layout;
> > > > > echo '';
> > > > > ?>
>
> > > > > This is frustrating :-(
> > > > > isn't there any magic command that will automatically remove all the
> > > > > trailing and leading spaces ?
>
> > > > > Regards,
> > > > > Ritesh
>
> > > > > On Nov 6, 10:07 am, AD7six <[EMAIL PROTECTED]> wrote:
>
> > > > > > On Nov 6, 2:01 pm, bingo <[EMAIL

Re: Multiple validation on a single field - CakePHP 1.1.17

2007-11-06 Thread Rajesh

Right now this is what i have in the model,
var $validate = array( 'uemail'  => VALID_EMAIL);

and this is what i have in the view
$html->tagErrorMsg('User/uemail', 'Email not valid.') ?>

The above works fine.

Now, how do i include the rule VALID_NOT_EMPTY along with VALID_EMAIL
and display an error if email field is left empty.



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Multiple validation on a single field - CakePHP 1.1.17

2007-11-06 Thread Sergei

Set it too VALID_EMAIL

As for other cases, you have to do custom multiple validations in your
controller.



On 7 нояб, 09:22, Rajesh <[EMAIL PROTECTED]> wrote:
> I am using CakePHP 1.1.17 and how do i perform multiple validation on
> a single field. For example, an email field should not be empty and
> should be a vaild email format. How do i set the rule in model and how
> do i display the error on the html page.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Multiple validation on a single field - CakePHP 1.1.17

2007-11-06 Thread Rajesh

I am using CakePHP 1.1.17 and how do i perform multiple validation on
a single field. For example, an email field should not be empty and
should be a vaild email format. How do i set the rule in model and how
do i display the error on the html page.

Thanks.
Rajesh


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Help me with paginate, please ; )

2007-11-06 Thread Mikee Freedom

Hey puatki,

First thing I ever do when trying out the new functions is have a look
at the core code. The paginate function doesn't accept the same
arguments as the findAll. There is no way to define fields directly in
that function.

What you have to do instead is use the `paginate` attribute of your
controller. Now, apparently you can define conditions on a per model
basis, but I haven't figure that out just yet. I have successfully
created a count field and passed it to paginate via the following
method.

Within your action, in your controller, prior to calling paginate add
the following :

$this->paginate['fields'] = array('id','username','code','SUM(cash) as
suma', 'COUNT(User.id) AS click');

You also have to define your order in this way. So for you it would be :

$this->paginate['order'] = $order;

Similarly for limit and page. Although, I usually define these in my
app_controller in the attribute definitions up the top (near the
components and helpers and stuff) :

// pagination
var $paginate = array('limit' => 5, 'page' => 1);

Now, when you call the paginate method you only need to pass it the
conditions. The function definition is as follows :

function paginate($object = null, $scope = array(), $whitelist = array()) {
if (is_array($object)) {
$whitelist = $scope;
$scope = $object;
$object = null;
}

...
}

Note the first snippet of code that allows you to pass a model just in
case the model you will be paginating is not the modelClass of the
controller your in.

Hope this helps.

Cheers,
freedom

On 07/11/2007, puatki <[EMAIL PROTECTED]> wrote:
>
> Thanks for answer ;)
>
> I have cake 1.2. I know how to paginate something "simple". Here I
> have some count() and sum() fields, group by etc and I do not know how
> to do this with paginate.
> $this->paginate( $conditions ) did not work for me.
>
>
>
> >
>

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Help me with paginate, please ; )

2007-11-06 Thread puatki

Thanks for answer ;)

I have cake 1.2. I know how to paginate something "simple". Here I
have some count() and sum() fields, group by etc and I do not know how
to do this with paginate.
$this->paginate( $conditions ) did not work for me.



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread francky06l

BOMS, mean UTF-8 without BOM (byte order marker), this used under
windows to mark UTF-8 files (also UCS-2 etc...). Use an hexadecimal
editor and you will notice the 3 bytes marking the UTF-8 at the
beginning ..
Do not know if it's your problem, but quite classical under windows.
You can editor such as Notepad++ to check you file in hexa.
Hope this helps

On Nov 7, 12:14 am, seacloud9 <[EMAIL PROTECTED]> wrote:
> I don't know in eclipse my guess is it would be associated with your
> overall preferences listed under encoding (google that) but you most
> likely have space before and after your ""  but do
> check your model view controllers all of them.  It is a drag and it
> did take me several days to do this myself but it was worth it.
>
> On Nov 6, 3:52 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > hi Seacloud9
>
> > I am not sure if I understand what do you mean by UTF-8 "BOMS". How
> > can verify that. I am using eclipse as my PHP Editor.
>
> > Regards,
> > Ritesh
>
> > On Nov 6, 4:00 pm, seacloud9 <[EMAIL PROTECTED]> wrote:
>
> > > I have had this exact same problem it can hold you up for days..
>
> > > Make sure you are using UTF-8 "BOMS".
>
> > > Make sure tags in Model, Controller, and Views " > > php" "?>"
> > > Have no spaces after or before them NONE.  I found one in the cake
> > > folder in the app model.  You have six spaces this is literally the
> > > cause of your frustrations.  You should check every model, view, and
> > > controller..  It does suck but it is what is causing your problem.
>
> > > On Nov 6, 1:54 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > > > hi AD7six,
>
> > > > I tried putting header in default layout for RSS, but didn't work. I
> > > > didn't recieve that output buffer already started at XYZ. The only
> > > > error that I am getting is "Invalid XML Declaration -  Line: 1
> > > > Character: 6". I also tried putting header command in controller
> > > > class, but that also didn't work. :-(
>
> > > > //views/layouts/rss/default.ctp
> > > > 
> > > >  > > > echo $rss->header();
> > > > echo '';
> > > > echo '', Router::url('/', true), '';
> > > > echo 'en-us';
> > > > echo '', date("D, j M Y H:i:s", gmmktime()) . ' GMT', ' > > > pubDate>';
> > > > echo 'Memento';
> > > > echo '[EMAIL PROTECTED]';
> > > > echo '[EMAIL PROTECTED]';
> > > > echo 'http://blogs.law.harvard.edu/tech/rss';
> > > > echo $content_for_layout;
> > > > echo '';
> > > > ?>
>
> > > > This is frustrating :-(
> > > > isn't there any magic command that will automatically remove all the
> > > > trailing and leading spaces ?
>
> > > > Regards,
> > > > Ritesh
>
> > > > On Nov 6, 10:07 am, AD7six <[EMAIL PROTECTED]> wrote:
>
> > > > > On Nov 6, 2:01 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > > > > > hi all,
>
> > > > > > I tried what Jon suggested. But still getting space before my xml
> > > > > > declaration :-( ...this is killing me...isn't there a good way to
> > > > > > debug this problem. Searching on the forum, I have realized that 
> > > > > > many
> > > > > > people struggle with this.
>
> > > > > "you could try issuing a header as the first line of your layout and
> > > > > see where it complains output already
> > > > > started. "
>
> > > > > there are many threads because it's a common problem (or a common
> > > > > mistake).
>
> > > > > You'll find it in the end ;).
>
> > > > > AD- Hide quoted text -
>
> > > - Show quoted text -


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: usedbconfig doesn't work

2007-11-06 Thread francky06l

Strange problem. I think that you NEED to have a 'default' config in
the database.php, even if you use you $mydb. Maybe you "removed" the
default ?

On Nov 6, 11:29 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
> You must have some configuration / setup problem.  As a sanity check,
> just rename the whole /app/config/database.php file, and check that
> Cake does throw errors about not being able to connect - otherwise
> perhaps you are editing the wrong file altogether.  Then try setting
> your new connection properties as $default in database.php, see if
> that works.
>
> To get multiple/alternative databases working you just need to do
> those two things - define the connection in /app/config/database.php,
> and set the appropriate $useDbConfig in your model.
>
> On Nov 7, 8:00 am, alessio <[EMAIL PROTECTED]> wrote:
>
> > Hi All,
>
> > I have write a file database.php in my apllication folder"/cake/myapp/
> > config"
>
> > var $mydb = array(
> > 'driver' => 'mysql',
> > 'persistent' => false,
> > 'host' => 'localhost',
> > 'port' => '',
> > 'login' => 'root',
> > 'password' => '',
> > 'database' => 'mydb',
> > 'schema' => '',
> > 'prefix' => '',
> > 'encoding' => ''
> > );
>
> > in my model I have write var $useDbConfig = 'mydb';
>
> > but cakephp use always the dbconfig present in dbo_mssql.php and not
> > the application configuration
>
> > cakephp version is 1.2.0.5875 pre-beta
>
> > somebody can help me?
> > 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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread seacloud9

I don't know in eclipse my guess is it would be associated with your
overall preferences listed under encoding (google that) but you most
likely have space before and after your ""  but do
check your model view controllers all of them.  It is a drag and it
did take me several days to do this myself but it was worth it.

On Nov 6, 3:52 pm, bingo <[EMAIL PROTECTED]> wrote:
> hi Seacloud9
>
> I am not sure if I understand what do you mean by UTF-8 "BOMS". How
> can verify that. I am using eclipse as my PHP Editor.
>
> Regards,
> Ritesh
>
> On Nov 6, 4:00 pm, seacloud9 <[EMAIL PROTECTED]> wrote:
>
> > I have had this exact same problem it can hold you up for days..
>
> > Make sure you are using UTF-8 "BOMS".
>
> > Make sure tags in Model, Controller, and Views " > php" "?>"
> > Have no spaces after or before them NONE.  I found one in the cake
> > folder in the app model.  You have six spaces this is literally the
> > cause of your frustrations.  You should check every model, view, and
> > controller..  It does suck but it is what is causing your problem.
>
> > On Nov 6, 1:54 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > > hi AD7six,
>
> > > I tried putting header in default layout for RSS, but didn't work. I
> > > didn't recieve that output buffer already started at XYZ. The only
> > > error that I am getting is "Invalid XML Declaration -  Line: 1
> > > Character: 6". I also tried putting header command in controller
> > > class, but that also didn't work. :-(
>
> > > //views/layouts/rss/default.ctp
> > > 
> > >  > > echo $rss->header();
> > > echo '';
> > > echo '', Router::url('/', true), '';
> > > echo 'en-us';
> > > echo '', date("D, j M Y H:i:s", gmmktime()) . ' GMT', ' > > pubDate>';
> > > echo 'Memento';
> > > echo '[EMAIL PROTECTED]';
> > > echo '[EMAIL PROTECTED]';
> > > echo 'http://blogs.law.harvard.edu/tech/rss';
> > > echo $content_for_layout;
> > > echo '';
> > > ?>
>
> > > This is frustrating :-(
> > > isn't there any magic command that will automatically remove all the
> > > trailing and leading spaces ?
>
> > > Regards,
> > > Ritesh
>
> > > On Nov 6, 10:07 am, AD7six <[EMAIL PROTECTED]> wrote:
>
> > > > On Nov 6, 2:01 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > > > > hi all,
>
> > > > > I tried what Jon suggested. But still getting space before my xml
> > > > > declaration :-( ...this is killing me...isn't there a good way to
> > > > > debug this problem. Searching on the forum, I have realized that many
> > > > > people struggle with this.
>
> > > > "you could try issuing a header as the first line of your layout and
> > > > see where it complains output already
> > > > started. "
>
> > > > there are many threads because it's a common problem (or a common
> > > > mistake).
>
> > > > You'll find it in the end ;).
>
> > > > AD- Hide quoted text -
>
> > - Show quoted text -


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: General site sturcture

2007-11-06 Thread francky06l

You can use an Element for your side column. If you use the method of
Scheneimi, you can set the value in beforeRender from app_controller.

On Nov 6, 7:23 pm, schneimi <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I think you have to create the two columns in the view that builds the
> $content_for_layout and echo the $content_for_layout into the body. So
> you have to set the vars for the columns in the action of the view.
>
> Greets,
> Michael
>
> On 6 Nov., 17:45, jimmyxx <[EMAIL PROTECTED]> wrote:
>
> > Hey,
> > I'm new to cakephp and need some advise on how to structure my application.
> > I have a two column layout, in the main column i echo $content_for_layout.
> > This all works fine but now I want to start working on the other column
> > which i'll use for a menu, a skyscraper banner, and little modules like
> > 'whos online'. It would be ideal if in the layout.thtml I could echo
> > $content_for_side_column and then manage that column through cakephp. I've
> > into /cake/libs/view.php and I thought hacking something in there is not a
> > good solution and there must be a better way of doing it. Any suggestions
> > how I should this in a well structured way?
>
> > cheers
> > --
> > View this message in 
> > context:http://www.nabble.com/General-site-sturcture-tf4759413.html#a13610742
> > Sent from the CakePHP mailing list archive at Nabble.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?hl=en
-~--~~~~--~~--~--~---



Re: Help me with paginate, please ; )

2007-11-06 Thread Grant Cox

In Cake 1.2, instead of using
$this->User->findAll( $conditions );
you can just use
$this->paginate( $conditions );

Bake a sample app to see how the default setup works - it uses the
paginator helper in the views for the links etc.

If you are using Cake 1.1, then you just need to manage the $page
parameter of findAll yourself.  I can't even remember if you can have
named url arguments in Cake 1.1, but if so that would be the way to do
it (just have the appropriate "page:X" in each of the pagination links
in your view, and look for this value in your controller action).



On Nov 7, 4:57 am, puatki <[EMAIL PROTECTED]> wrote:
> Hello ( and sorry for my english ).
>
> I have working findAll rule :
>
> $this->User->bindModel(array('hasOne'=>array('Dummy'=>array('className'=>'Stat','foreignKey'=>'user_id'))),false);
>
> $this->data = $this->User->findAll('Dummy.code = User.code AND Dummy.s
> = 1 GROUP BY User`.`id`',array('id','username','code','SUM(cash) as
> suma, COUNT(User.id) AS click'),$order, $limit, $page,0);
>
> How can I paginate this data set ?
> Help me, please ;)


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: usedbconfig doesn't work

2007-11-06 Thread Grant Cox

You must have some configuration / setup problem.  As a sanity check,
just rename the whole /app/config/database.php file, and check that
Cake does throw errors about not being able to connect - otherwise
perhaps you are editing the wrong file altogether.  Then try setting
your new connection properties as $default in database.php, see if
that works.

To get multiple/alternative databases working you just need to do
those two things - define the connection in /app/config/database.php,
and set the appropriate $useDbConfig in your model.


On Nov 7, 8:00 am, alessio <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have write a file database.php in my apllication folder"/cake/myapp/
> config"
>
> var $mydb = array(
> 'driver' => 'mysql',
> 'persistent' => false,
> 'host' => 'localhost',
> 'port' => '',
> 'login' => 'root',
> 'password' => '',
> 'database' => 'mydb',
> 'schema' => '',
> 'prefix' => '',
> 'encoding' => ''
> );
>
> in my model I have write var $useDbConfig = 'mydb';
>
> but cakephp use always the dbconfig present in dbo_mssql.php and not
> the application configuration
>
> cakephp version is 1.2.0.5875 pre-beta
>
> somebody can help me?
> 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?hl=en
-~--~~~~--~~--~--~---



Re: block save?

2007-11-06 Thread Grant Cox

Just return false from the beforeSave.

On Nov 7, 5:22 am, Cristian Vrabie <[EMAIL PROTECTED]> wrote:
> hello everybody,
> i wanted to extend the beforeSave() function of a behavior in order to
> do some checks. in a certain sittuation, i would like to block the
> following save from executing. can i do that?
> thanks,
> cristian


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



usedbconfig doesn't work

2007-11-06 Thread alessio

Hi All,

I have write a file database.php in my apllication folder"/cake/myapp/
config"

var $mydb = array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localhost',
'port' => '',
'login' => 'root',
'password' => '',
'database' => 'mydb',
'schema' => '',
'prefix' => '',
'encoding' => ''
);

in my model I have write var $useDbConfig = 'mydb';

but cakephp use always the dbconfig present in dbo_mssql.php and not
the application configuration

cakephp version is 1.2.0.5875 pre-beta

somebody can help me?
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?hl=en
-~--~~~~--~~--~--~---



Re: YAMMY!: feed your migrations faster

2007-11-06 Thread cakeFreak

Well...

YAMMY does not sort out the problem you mentioned yet.

But the functionality you are looking for can be implemented in next
versions ;o)

YAMMY! adds a touch of "speed" and usability to the excellent shell
written by joel Moss.

Dan

On 6 Nov, 22:17, "Sonic Baker" <[EMAIL PROTECTED]> wrote:
> Now things are really falling into place. I haven't used YAMMY yet but I
> can't wait. Been meaning to use migrations for a long time but have been put
> off by the fact that there isn't any way to actually migrate the data once a
> structural change is made. E.g. What if I decide I want to further notmalise
> my database buy moving a field to another table and replace this with a
> primary key?
> Perhaps this is more of an SQL issue though. Can't wait to use this with
> Migrations and Capistrano. However, this'll have to wait till I'm ready to
> upgrade to CakePHP 1.2
>
> Good work!! Thanks
>
> Sonic


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread bingo

hi Seacloud9

I am not sure if I understand what do you mean by UTF-8 "BOMS". How
can verify that. I am using eclipse as my PHP Editor.

Regards,
Ritesh

On Nov 6, 4:00 pm, seacloud9 <[EMAIL PROTECTED]> wrote:
> I have had this exact same problem it can hold you up for days..
>
> Make sure you are using UTF-8 "BOMS".
>
> Make sure tags in Model, Controller, and Views " php" "?>"
> Have no spaces after or before them NONE.  I found one in the cake
> folder in the app model.  You have six spaces this is literally the
> cause of your frustrations.  You should check every model, view, and
> controller..  It does suck but it is what is causing your problem.
>
> On Nov 6, 1:54 pm, bingo <[EMAIL PROTECTED]> wrote:
>
>
>
> > hi AD7six,
>
> > I tried putting header in default layout for RSS, but didn't work. I
> > didn't recieve that output buffer already started at XYZ. The only
> > error that I am getting is "Invalid XML Declaration -  Line: 1
> > Character: 6". I also tried putting header command in controller
> > class, but that also didn't work. :-(
>
> > //views/layouts/rss/default.ctp
> > 
> >  > echo $rss->header();
> > echo '';
> > echo '', Router::url('/', true), '';
> > echo 'en-us';
> > echo '', date("D, j M Y H:i:s", gmmktime()) . ' GMT', ' > pubDate>';
> > echo 'Memento';
> > echo '[EMAIL PROTECTED]';
> > echo '[EMAIL PROTECTED]';
> > echo 'http://blogs.law.harvard.edu/tech/rss';
> > echo $content_for_layout;
> > echo '';
> > ?>
>
> > This is frustrating :-(
> > isn't there any magic command that will automatically remove all the
> > trailing and leading spaces ?
>
> > Regards,
> > Ritesh
>
> > On Nov 6, 10:07 am, AD7six <[EMAIL PROTECTED]> wrote:
>
> > > On Nov 6, 2:01 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > > > hi all,
>
> > > > I tried what Jon suggested. But still getting space before my xml
> > > > declaration :-( ...this is killing me...isn't there a good way to
> > > > debug this problem. Searching on the forum, I have realized that many
> > > > people struggle with this.
>
> > > "you could try issuing a header as the first line of your layout and
> > > see where it complains output already
> > > started. "
>
> > > there are many threads because it's a common problem (or a common
> > > mistake).
>
> > > You'll find it in the end ;).
>
> > > AD- Hide quoted text -
>
> - Show quoted text -


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: ACL Aro multiple parents Cake 1.2

2007-11-06 Thread BravoFoxtrot

I'm just taking a stab in the dark here but is the following
possible?  Hopefully someone can help me out..

Create three tables:

create table users(
id,
firstname,
lastname,
username,
email );

create table groups(
id,
name,
description,
parent_id);

create table groups_users(
id,
users_id,
groups_id,
default ); --default is a boolean

Now if we have the user "user1" with an id of 1 and groups "group1"
and "group2", is there anyway you can have alias' such as
"group1_user1" and "group2_user1"?  These alias' would have an ID of 1
the same as "user1".

$aro->create( 1, null, 'user1' );
$aro->create( 0, null, 'group1' );
$aro->create( 0, null, 'group2' );

$aro->setParent('group1', 'group1_user1');
$aro->setParent('group2', 'group2_user1');


I'm just learning this but can you not look up the permissions based
on the alias or the id.  Some extra logic is needed in the
users_controller.php (or somewhere else?) to handle this.  The extra
logic would need to look up the default group's permission first and
then the remaining group permissions if the default group is denied.

Now as I'm reviewing this post I'm wondering how the $aro-
>setParent('group1', 'group1_user1'); knows that "group1_user1" is
actually user1?  Do I have to do something like this:

$aro->create( 1, null, 'user1' );
$aro->create( 1, null, 'group1_user1' );
$aro->create( 1, null, 'group2_user1' );

This looks clunky.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Unknown internal server error

2007-11-06 Thread Andreas

Well the "Zend Optimizer" section is gone in the directory where i did
the "trick" but I'm not sure if that's a 100% sign.

Recieved another mail from the support and they're saying that this
"trick" doesn't work recursively (I've confirmed this by trying php
info, the Zend Optimizer section is there) and currently I've only
done the "trick" in the cake root. Is any php files executed anywhere
else than the root?

On Nov 6, 9:46 pm, francky06l <[EMAIL PROTECTED]> wrote:
> Are you sure the zend is deactivated with the trick ? Do a phpinfo()
> on it ... I have tried version 3.3 but it's still buggy..
>
> On Nov 6, 8:57 pm, Andreas <[EMAIL PROTECTED]> wrote:
>
> > I know mod_rewrite is working, I'm using it for another thing.
>
> > Just left the mod_rewrite off on purpose until I recieve any other
> > tips :)
>
> > On Nov 6, 6:16 pm, grigri <[EMAIL PROTECTED]> wrote:
>
> > > If you can see the page, but not the css, then mod_rewrite isn't
> > > working properly.
>
> > > If you've deactivated the mod_rewrite stuff then there is a line you
> > > need to uncomment in app/config/core.php :
>
> > > /**
> > >  * To configure CakePHP *not* to use mod_rewrite and to
> > >  * use CakePHP pretty URLs, remove these .htaccess
> > >  * files:
> > >  *
> > >  * /.htaccess
> > >  * /app/.htaccess
> > >  * /app/webroot/.htaccess
> > >  *
> > >  * And uncomment the App.baseUrl below:
> > >  */
> > > //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
>
> > > This will generate urls that will work without mod_rewrite. They won't
> > > be as pretty though.
>
> > > On Nov 6, 5:06 pm, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > > I've been mailing back and forth with my host the entire day and they
> > > > upgraded zend optimizer to 3.3 and also showed me a way to deactivate
> > > > the zend stuff but that didn't make it work.
>
> > > > The support guy told me that it looked like it was something with
> > > > mod_rewrite which messed things up and therefor he commented out the
> > > > mod_rewrite things in my .htaccess files. But have the .htaccess files
> > > > changed any between 1.1.x and 1.2.x?
>
> > > > Some good stuff though is that I can see the "welcome" page (without
> > > > css though...) ;)http://thelucifer.net/tmp/cake_not_working.png
>
> > > > I'm not so sure it's the zend optimizer anymore since it's both
> > > > upgraded and deactivated...
>
> > > > On Nov 5, 2:16 pm, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > > > Ah, ok thanks. I'll talk with my host!
>
> > > > > On 5 Nov, 11:39, AD7six <[EMAIL PROTECTED]> wrote:
>
> > > > > > On Nov 5, 8:23 am, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Hmm, yea, I'll try that. But shouldn't cakephp work even if the 
> > > > > > > zend
> > > > > > > optimizer is enabled?
>
> > > > > > Not if the zend optimizer has a bug in it.
>
> > > > > >http://groups.google.com/group/cake-php/search?group=cake-php&q=+inte...
>
> > > > > > hth,
>
> > > > > > AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: YAMMY!: feed your migrations faster

2007-11-06 Thread Sonic Baker
Now things are really falling into place. I haven't used YAMMY yet but I
can't wait. Been meaning to use migrations for a long time but have been put
off by the fact that there isn't any way to actually migrate the data once a
structural change is made. E.g. What if I decide I want to further notmalise
my database buy moving a field to another table and replace this with a
primary key?
Perhaps this is more of an SQL issue though. Can't wait to use this with
Migrations and Capistrano. However, this'll have to wait till I'm ready to
upgrade to CakePHP 1.2

Good work!! Thanks

Sonic

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Unknown internal server error

2007-11-06 Thread schneimi

I remember I had a similar problem on my webspace, mod_rewrite was
working but somehow the .htaccess caused an error. So I searched for a
solution on the web and somewhere found the following code to put in
the first .htaccess file. It really worked, but I have no clue what it
does. Maybe this helps you too.


   RewriteEngine on
   RewriteRule^$ app/webroot/[L]
   RewriteCond  %{REQUEST_FILENAME} !-d
   RewriteCond  %{REQUEST_FILENAME} !-f
   RewriteRule(.*)  app/webroot/$1 [L]


On 6 Nov., 20:57, Andreas <[EMAIL PROTECTED]> wrote:
> I know mod_rewrite is working, I'm using it for another thing.
>
> Just left the mod_rewrite off on purpose until I recieve any other
> tips :)
>
> On Nov 6, 6:16 pm, grigri <[EMAIL PROTECTED]> wrote:
>
> > If you can see the page, but not the css, then mod_rewrite isn't
> > working properly.
>
> > If you've deactivated the mod_rewrite stuff then there is a line you
> > need to uncomment in app/config/core.php :
>
> > /**
> >  * To configure CakePHP *not* to use mod_rewrite and to
> >  * use CakePHP pretty URLs, remove these .htaccess
> >  * files:
> >  *
> >  * /.htaccess
> >  * /app/.htaccess
> >  * /app/webroot/.htaccess
> >  *
> >  * And uncomment the App.baseUrl below:
> >  */
> > //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
>
> > This will generate urls that will work without mod_rewrite. They won't
> > be as pretty though.
>
> > On Nov 6, 5:06 pm, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > I've been mailing back and forth with my host the entire day and they
> > > upgraded zend optimizer to 3.3 and also showed me a way to deactivate
> > > the zend stuff but that didn't make it work.
>
> > > The support guy told me that it looked like it was something with
> > > mod_rewrite which messed things up and therefor he commented out the
> > > mod_rewrite things in my .htaccess files. But have the .htaccess files
> > > changed any between 1.1.x and 1.2.x?
>
> > > Some good stuff though is that I can see the "welcome" page (without
> > > css though...) ;)http://thelucifer.net/tmp/cake_not_working.png
>
> > > I'm not so sure it's the zend optimizer anymore since it's both
> > > upgraded and deactivated...
>
> > > On Nov 5, 2:16 pm, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > > Ah, ok thanks. I'll talk with my host!
>
> > > > On 5 Nov, 11:39, AD7six <[EMAIL PROTECTED]> wrote:
>
> > > > > On Nov 5, 8:23 am, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hmm, yea, I'll try that. But shouldn't cakephp work even if the zend
> > > > > > optimizer is enabled?
>
> > > > > Not if the zend optimizer has a bug in it.
>
> > > > >http://groups.google.com/group/cake-php/search?group=cake-php&q=+inte...
>
> > > > > hth,
>
> > > > > AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread seacloud9

I have had this exact same problem it can hold you up for days..

Make sure you are using UTF-8 "BOMS".

Make sure tags in Model, Controller, and Views ""
Have no spaces after or before them NONE.  I found one in the cake
folder in the app model.  You have six spaces this is literally the
cause of your frustrations.  You should check every model, view, and
controller..  It does suck but it is what is causing your problem.

On Nov 6, 1:54 pm, bingo <[EMAIL PROTECTED]> wrote:
> hi AD7six,
>
> I tried putting header in default layout for RSS, but didn't work. I
> didn't recieve that output buffer already started at XYZ. The only
> error that I am getting is "Invalid XML Declaration -  Line: 1
> Character: 6". I also tried putting header command in controller
> class, but that also didn't work. :-(
>
> //views/layouts/rss/default.ctp
> 
>  echo $rss->header();
> echo '';
> echo '', Router::url('/', true), '';
> echo 'en-us';
> echo '', date("D, j M Y H:i:s", gmmktime()) . ' GMT', ' pubDate>';
> echo 'Memento';
> echo '[EMAIL PROTECTED]';
> echo '[EMAIL PROTECTED]';
> echo 'http://blogs.law.harvard.edu/tech/rss';
> echo $content_for_layout;
> echo '';
> ?>
>
> This is frustrating :-(
> isn't there any magic command that will automatically remove all the
> trailing and leading spaces ?
>
> Regards,
> Ritesh
>
> On Nov 6, 10:07 am, AD7six <[EMAIL PROTECTED]> wrote:
>
> > On Nov 6, 2:01 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > > hi all,
>
> > > I tried what Jon suggested. But still getting space before my xml
> > > declaration :-( ...this is killing me...isn't there a good way to
> > > debug this problem. Searching on the forum, I have realized that many
> > > people struggle with this.
>
> > "you could try issuing a header as the first line of your layout and
> > see where it complains output already
> > started. "
>
> > there are many threads because it's a common problem (or a common
> > mistake).
>
> > You'll find it in the end ;).
>
> > AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: New to Cakephp: Design question

2007-11-06 Thread francky06l

I think,  you should use Element within your layout to render the
navigation according to user log or not.
Alternatively you can use 2 different layouts

On Nov 6, 8:20 pm, thathu <[EMAIL PROTECTED]> wrote:
> Hello Cakephp developers
>
> I am trying to design a website for my friend using cakephp, but I am
> not sure how to organize the webpages. Here is my design.
>
> User -> Generic page layout -> Generic navigation tabs ->click -> Each
> tab has Generic content for all users
> User - > login -> Generic Page layout -> Generic Navigation Tabs ->
> Each tab with Specific content
>
> I tried using a header.thtml file for the generic tabs and included it
> in the default.thtml in layout folder. How do I design the tabs so
> that I will be going to default page all the time but have different
> data every time? I am having trouble with this design. I tried using
> separate layout thtml for each tab entry, but its very messy and I am
> not sure how to control the flow.
>
> Is there a place to find design examples?


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Unknown internal server error

2007-11-06 Thread francky06l

Are you sure the zend is deactivated with the trick ? Do a phpinfo()
on it ... I have tried version 3.3 but it's still buggy..

On Nov 6, 8:57 pm, Andreas <[EMAIL PROTECTED]> wrote:
> I know mod_rewrite is working, I'm using it for another thing.
>
> Just left the mod_rewrite off on purpose until I recieve any other
> tips :)
>
> On Nov 6, 6:16 pm, grigri <[EMAIL PROTECTED]> wrote:
>
> > If you can see the page, but not the css, then mod_rewrite isn't
> > working properly.
>
> > If you've deactivated the mod_rewrite stuff then there is a line you
> > need to uncomment in app/config/core.php :
>
> > /**
> >  * To configure CakePHP *not* to use mod_rewrite and to
> >  * use CakePHP pretty URLs, remove these .htaccess
> >  * files:
> >  *
> >  * /.htaccess
> >  * /app/.htaccess
> >  * /app/webroot/.htaccess
> >  *
> >  * And uncomment the App.baseUrl below:
> >  */
> > //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
>
> > This will generate urls that will work without mod_rewrite. They won't
> > be as pretty though.
>
> > On Nov 6, 5:06 pm, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > I've been mailing back and forth with my host the entire day and they
> > > upgraded zend optimizer to 3.3 and also showed me a way to deactivate
> > > the zend stuff but that didn't make it work.
>
> > > The support guy told me that it looked like it was something with
> > > mod_rewrite which messed things up and therefor he commented out the
> > > mod_rewrite things in my .htaccess files. But have the .htaccess files
> > > changed any between 1.1.x and 1.2.x?
>
> > > Some good stuff though is that I can see the "welcome" page (without
> > > css though...) ;)http://thelucifer.net/tmp/cake_not_working.png
>
> > > I'm not so sure it's the zend optimizer anymore since it's both
> > > upgraded and deactivated...
>
> > > On Nov 5, 2:16 pm, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > > Ah, ok thanks. I'll talk with my host!
>
> > > > On 5 Nov, 11:39, AD7six <[EMAIL PROTECTED]> wrote:
>
> > > > > On Nov 5, 8:23 am, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hmm, yea, I'll try that. But shouldn't cakephp work even if the zend
> > > > > > optimizer is enabled?
>
> > > > > Not if the zend optimizer has a bug in it.
>
> > > > >http://groups.google.com/group/cake-php/search?group=cake-php&q=+inte...
>
> > > > > hth,
>
> > > > > AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Unknown internal server error

2007-11-06 Thread Andreas

I know mod_rewrite is working, I'm using it for another thing.

Just left the mod_rewrite off on purpose until I recieve any other
tips :)

On Nov 6, 6:16 pm, grigri <[EMAIL PROTECTED]> wrote:
> If you can see the page, but not the css, then mod_rewrite isn't
> working properly.
>
> If you've deactivated the mod_rewrite stuff then there is a line you
> need to uncomment in app/config/core.php :
>
> /**
>  * To configure CakePHP *not* to use mod_rewrite and to
>  * use CakePHP pretty URLs, remove these .htaccess
>  * files:
>  *
>  * /.htaccess
>  * /app/.htaccess
>  * /app/webroot/.htaccess
>  *
>  * And uncomment the App.baseUrl below:
>  */
> //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
>
> This will generate urls that will work without mod_rewrite. They won't
> be as pretty though.
>
> On Nov 6, 5:06 pm, Andreas <[EMAIL PROTECTED]> wrote:
>
> > I've been mailing back and forth with my host the entire day and they
> > upgraded zend optimizer to 3.3 and also showed me a way to deactivate
> > the zend stuff but that didn't make it work.
>
> > The support guy told me that it looked like it was something with
> > mod_rewrite which messed things up and therefor he commented out the
> > mod_rewrite things in my .htaccess files. But have the .htaccess files
> > changed any between 1.1.x and 1.2.x?
>
> > Some good stuff though is that I can see the "welcome" page (without
> > css though...) ;)http://thelucifer.net/tmp/cake_not_working.png
>
> > I'm not so sure it's the zend optimizer anymore since it's both
> > upgraded and deactivated...
>
> > On Nov 5, 2:16 pm, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > Ah, ok thanks. I'll talk with my host!
>
> > > On 5 Nov, 11:39, AD7six <[EMAIL PROTECTED]> wrote:
>
> > > > On Nov 5, 8:23 am, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > > > Hmm, yea, I'll try that. But shouldn't cakephp work even if the zend
> > > > > optimizer is enabled?
>
> > > > Not if the zend optimizer has a bug in it.
>
> > > >http://groups.google.com/group/cake-php/search?group=cake-php&q=+inte...
>
> > > > hth,
>
> > > > AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread bingo

hi AD7six,

I tried putting header in default layout for RSS, but didn't work. I
didn't recieve that output buffer already started at XYZ. The only
error that I am getting is "Invalid XML Declaration -  Line: 1
Character: 6". I also tried putting header command in controller
class, but that also didn't work. :-(

//views/layouts/rss/default.ctp

header();
echo '';
echo '', Router::url('/', true), '';
echo 'en-us';
echo '', date("D, j M Y H:i:s", gmmktime()) . ' GMT', '';
echo 'Memento';
echo '[EMAIL PROTECTED]';
echo '[EMAIL PROTECTED]';
echo 'http://blogs.law.harvard.edu/tech/rss';
echo $content_for_layout;
echo '';
?>


This is frustrating :-(
isn't there any magic command that will automatically remove all the
trailing and leading spaces ?

Regards,
Ritesh

On Nov 6, 10:07 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Nov 6, 2:01 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > hi all,
>
> > I tried what Jon suggested. But still getting space before my xml
> > declaration :-( ...this is killing me...isn't there a good way to
> > debug this problem. Searching on the forum, I have realized that many
> > people struggle with this.
>
> "you could try issuing a header as the first line of your layout and
> see where it complains output already
> started. "
>
> there are many threads because it's a common problem (or a common
> mistake).
>
> You'll find it in the end ;).
>
> AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: SimplePie View

2007-11-06 Thread Samuel DeVore

It is interesting to note that this is a common problem that people
have with JPEG generation with things like imageMagic, jpGraph and
other tool to generate non-html output.

Sam D

On 11/6/07, seacloud9 <[EMAIL PROTECTED]> wrote:
>
> Fixed:)  Thanks to excellent advice from Siegfried Hirsch!
>
> >Ok, good so far. I guess, your problem is, that the $feeddata, that
> >you get back from Simplepie is not a simple array, but there are
> >object in it.
> >Take a look at the output of debug($feeddata) and you will see, that
> >there are objects in it. The is the main problem I guess.
> >If I remember right, Simplepie has more than once changed the format
> >of its output and used more and more objects instead of simple arrays
> >of arrays.
>
> Was able to trace it back view now looks like:
>
>  ['channel']['0']['child']['']['item']  as $feed): ?>
> 
> 
> 
> 
> 
>
> works for me thanks:)
>
>
> On Nov 5, 7:50 am, seacloud9 <[EMAIL PROTECTED]> wrote:
> > Has anyone else run into the same problem?
> >
> > On Nov 4, 9:24 pm, seacloud9 <[EMAIL PROTECTED]> wrote:
> >
> > > I am having issues with mysimplepieview.  I can get a feed but I can
> > > not display the feed.
> >
> > > I am trying to follow this 
> > > example:http://cakeforge.org/snippet/download.php?type=snippet&id=341
> >
> > > Please let me know what is wrong with this view...
> >
> > > View Index.thtml
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> >
> > > Controller:
> > >  > > class FeedController extends AppController
> > > {
> > > var $name = 'Feed';
> > > var $uses = null;
> > > var $components = array('Simplepie');
> >
> > > function index()
> > > {
> > > /**
>
> > >  * Pass 2 variables to theSimplePiecomponent, the feed 
> > > URL and the
> > > location of the cache directory
> > >  */
> > > $this->Simplepie->feedurl = 
> > > 'http://www.abc.net.au/news/syndicate/
> > > breakingrss.xml';
> > > $this->Simplepie->cachelocation = CACHE . 'simplepie' . 
> > > DS;
> >
> > > /**
> > >  * Set a variable with the returned data from the 
> > > component
> > >  */
> > > $feeddata = $this->Simplepie->feed();
> >
> > > /**
> > >  * Pass the data to the view
> > >  */
> > > $this->set('feeddata',$feeddata);
> >
> > > }}
> >
> > > ?>
>
>
> >
>


-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



New to Cakephp: Design question

2007-11-06 Thread thathu

Hello Cakephp developers

I am trying to design a website for my friend using cakephp, but I am
not sure how to organize the webpages. Here is my design.

User -> Generic page layout -> Generic navigation tabs ->click -> Each
tab has Generic content for all users
User - > login -> Generic Page layout -> Generic Navigation Tabs ->
Each tab with Specific content

I tried using a header.thtml file for the generic tabs and included it
in the default.thtml in layout folder. How do I design the tabs so
that I will be going to default page all the time but have different
data every time? I am having trouble with this design. I tried using
separate layout thtml for each tab entry, but its very messy and I am
not sure how to control the flow.

Is there a place to find design examples?


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Help me with paginate, please ; )

2007-11-06 Thread puatki

Hello ( and sorry for my english ).

I have working findAll rule :

$this->User-
>bindModel(array('hasOne'=>array('Dummy'=>array('className'=>'Stat','foreignKey'=>'user_id'))),false);
$this->data = $this->User->findAll('Dummy.code = User.code AND Dummy.s
= 1 GROUP BY User`.`id`',array('id','username','code','SUM(cash) as
suma, COUNT(User.id) AS click'),$order, $limit, $page,0);

How can I paginate this data set ?
Help me, please ;)


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Cakephp newbie design question

2007-11-06 Thread thathu


Hello Cakephp developers

I am trying to design a website for my friend using cakephp, but I am not
sure how to organize the webpages. Here is my design.

User -> Generic page layout -> Generic navigation tabs ->click -> Each tab
has Generic content for all users
User - > login -> Generic Page layout -> Generic Navigation Tabs -> Each tab
with Specific content

I tried using a header.thtml file for the generic tabs and included it in
the default.thtml in layout folder. How do I design the tabs so that I will
be going to default page all the time but have different data every time?
I am having trouble with this design. I tried using separate layout thtml
for each tab entry, but its very messy. 

please help.
-- 
View this message in context: 
http://www.nabble.com/Cakephp-newbie-design-question-tf4759847.html#a13612103
Sent from the CakePHP mailing list archive at Nabble.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?hl=en
-~--~~~~--~~--~--~---



block save?

2007-11-06 Thread Cristian Vrabie

hello everybody,
i wanted to extend the beforeSave() function of a behavior in order to 
do some checks. in a certain sittuation, i would like to block the 
following save from executing. can i do that?
thanks,
cristian

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Javascript Error

2007-11-06 Thread thathu


I temporarily solved it by adding var $helpers =
array('Html','Form','Javascript');  to cake's appController.pho

Rahul-26 wrote:
> 
> 
> Javascript error..
> 
> I have included my js files that resides in webroot/js folder in the
> default layout (default.thtml) as
> 
> link('projrct.basic'); ?>
> 
> The name of my javascript file is project.basic.js
> 
> Then I found the error message like-
> 
> Notice: Undefined variable: javascript in H:\www\webroot\cake\app\views
> \layouts\default.thtml on line 14
> 
> Fatal error: Call to a member function link() on a non-object in H:\www
> \webroot\cake\app\views\layouts\default.thtml on line 14
> 
> Then I search cakephp googole groups for solution and finally got the
> answer as to create app_Controller.php under my app folder and declare
> all the needed helper in that file.
> 
> I have coded this file as-
> 
> class AppController extends Controller {
> 
> var $helpers = array('Html','Form','Javascript');
> var $components  = array('Session');
> var $othAuthRestrictions = "*";
> }
> 
> But still I have found the same error message...
> 
> Can anybody guide me through the rest...!!
> 
> It will be a great help...
> 
> Regards
> Raul.
> 
> 
> > 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Javascript-Error-tf4750069.html#a13612813
Sent from the CakePHP mailing list archive at Nabble.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?hl=en
-~--~~~~--~~--~--~---



Re: General site sturcture

2007-11-06 Thread schneimi

Hi,

I think you have to create the two columns in the view that builds the
$content_for_layout and echo the $content_for_layout into the body. So
you have to set the vars for the columns in the action of the view.

Greets,
Michael

On 6 Nov., 17:45, jimmyxx <[EMAIL PROTECTED]> wrote:
> Hey,
> I'm new to cakephp and need some advise on how to structure my application.
> I have a two column layout, in the main column i echo $content_for_layout.
> This all works fine but now I want to start working on the other column
> which i'll use for a menu, a skyscraper banner, and little modules like
> 'whos online'. It would be ideal if in the layout.thtml I could echo
> $content_for_side_column and then manage that column through cakephp. I've
> into /cake/libs/view.php and I thought hacking something in there is not a
> good solution and there must be a better way of doing it. Any suggestions
> how I should this in a well structured way?
>
> cheers
> --
> View this message in 
> context:http://www.nabble.com/General-site-sturcture-tf4759413.html#a13610742
> Sent from the CakePHP mailing list archive at Nabble.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?hl=en
-~--~~~~--~~--~--~---



Re: layout control with default pages controller.

2007-11-06 Thread thathu


I am new to cake as well, but this is what I did to create a new layout
called profile.

pageTitle = 'User Profile';
}
} 

Now I put my page design in profile.thtml in the layout folder and just make
a forward to to /profile/index. That just worked.






jmw-2 wrote:
> 
> 
> I have a very simple site and am new to cake, but not MVC frameworks.
> I currently use the default Pages controller to render the pages in
> the site, very few of them need their own customer controller /
> logic.  I do however need some of them to switch to a different
> layout. I have defined a default layout, and am trying to find a way
> to specify that a page should be rendered with another layout, via a
> routes call, or some other call at the top of the template page, or a
> request parameter.
> 
> 
> > 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/layout-control-with-default-pages-controller.-tf4749421.html#a13612477
Sent from the CakePHP mailing list archive at Nabble.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?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP 1.2 and Oracle throwing errors

2007-11-06 Thread Chris Thompson

Found a ticket submitted here:

http://groups.google.com/group/tickets-cakephp/msg/25b70f403ce47e23

This is for the reserved words table names.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: SimplePie View

2007-11-06 Thread seacloud9

Fixed:)  Thanks to excellent advice from Siegfried Hirsch!

>Ok, good so far. I guess, your problem is, that the $feeddata, that
>you get back from Simplepie is not a simple array, but there are
>object in it.
>Take a look at the output of debug($feeddata) and you will see, that
>there are objects in it. The is the main problem I guess.
>If I remember right, Simplepie has more than once changed the format
>of its output and used more and more objects instead of simple arrays
>of arrays.

Was able to trace it back view now looks like:








works for me thanks:)

On Nov 5, 7:50 am, seacloud9 <[EMAIL PROTECTED]> wrote:
> Has anyone else run into the same problem?
>
> On Nov 4, 9:24 pm, seacloud9 <[EMAIL PROTECTED]> wrote:
>
> > I am having issues with mysimplepieview.  I can get a feed but I can
> > not display the feed.
>
> > I am trying to follow this 
> > example:http://cakeforge.org/snippet/download.php?type=snippet&id=341
>
> > Please let me know what is wrong with this view...
>
> > View Index.thtml
> > 
> > 
> > 
> > 
> > 
> > 
>
> > Controller:
> >  > class FeedController extends AppController
> > {
> > var $name = 'Feed';
> > var $uses = null;
> > var $components = array('Simplepie');
>
> > function index()
> > {
> > /**
> >  * Pass 2 variables to theSimplePiecomponent, the feed URL 
> > and the
> > location of the cache directory
> >  */
> > $this->Simplepie->feedurl = 
> > 'http://www.abc.net.au/news/syndicate/
> > breakingrss.xml';
> > $this->Simplepie->cachelocation = CACHE . 'simplepie' . DS;
>
> > /**
> >  * Set a variable with the returned data from the component
> >  */
> > $feeddata = $this->Simplepie->feed();
>
> > /**
> >  * Pass the data to the view
> >  */
> > $this->set('feeddata',$feeddata);
>
> > }}
>
> > ?>


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP 1.2 and Oracle throwing errors

2007-11-06 Thread Chris Thompson

I wanted to add something else to this.

If you have a table Users and you try to select against it, CakePHP
uses the table alias of User, however this is a reserved word in
Oracle.

Any ideas how to get around this?


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread seacloud9

I have run into the same issue.  It is a pain to fix but well worth
the benefits!

http://groups.google.com/group/cake-php/browse_thread/thread/20bc8af252f597bb/e3a9f444819ac344?lnk=gst&q=seacloud9#e3a9f444819ac344
my issue

My fix: http://i-create.org/UTF-8+Madness

Bake On!

On Nov 6, 9:07 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Nov 6, 2:01 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > hi all,
>
> > I tried what Jon suggested. But still getting space before my xml
> > declaration :-( ...this is killing me...isn't there a good way to
> > debug this problem. Searching on the forum, I have realized that many
> > people struggle with this.
>
> "you could try issuing a header as the first line of your layout and
> see where it complains output already
> started. "
>
> there are many threads because it's a common problem (or a common
> mistake).
>
> You'll find it in the end ;).
>
> AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



shopping cart

2007-11-06 Thread carSign

Has anyone been able to integrate a third party shopping cart into
cake?


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Unknown internal server error

2007-11-06 Thread grigri

If you can see the page, but not the css, then mod_rewrite isn't
working properly.

If you've deactivated the mod_rewrite stuff then there is a line you
need to uncomment in app/config/core.php :

/**
 * To configure CakePHP *not* to use mod_rewrite and to
 * use CakePHP pretty URLs, remove these .htaccess
 * files:
 *
 * /.htaccess
 * /app/.htaccess
 * /app/webroot/.htaccess
 *
 * And uncomment the App.baseUrl below:
 */
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));

This will generate urls that will work without mod_rewrite. They won't
be as pretty though.

On Nov 6, 5:06 pm, Andreas <[EMAIL PROTECTED]> wrote:
> I've been mailing back and forth with my host the entire day and they
> upgraded zend optimizer to 3.3 and also showed me a way to deactivate
> the zend stuff but that didn't make it work.
>
> The support guy told me that it looked like it was something with
> mod_rewrite which messed things up and therefor he commented out the
> mod_rewrite things in my .htaccess files. But have the .htaccess files
> changed any between 1.1.x and 1.2.x?
>
> Some good stuff though is that I can see the "welcome" page (without
> css though...) ;)http://thelucifer.net/tmp/cake_not_working.png
>
> I'm not so sure it's the zend optimizer anymore since it's both
> upgraded and deactivated...
>
> On Nov 5, 2:16 pm, Andreas <[EMAIL PROTECTED]> wrote:
>
> > Ah, ok thanks. I'll talk with my host!
>
> > On 5 Nov, 11:39, AD7six <[EMAIL PROTECTED]> wrote:
>
> > > On Nov 5, 8:23 am, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > > Hmm, yea, I'll try that. But shouldn't cakephp work even if the zend
> > > > optimizer is enabled?
>
> > > Not if the zend optimizer has a bug in it.
>
> > >http://groups.google.com/group/cake-php/search?group=cake-php&q=+inte...
>
> > > hth,
>
> > > AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



CakePHP 1.2 and Oracle throwing errors

2007-11-06 Thread Chris Thompson

I am working on getting CakePHP 1.2 to work nicely with our Oracle
db.  After getting it all configured, the index.php page was throwing:

Undefined index:  connect [CORE/cake/libs/model/datasources/dbo/
dbo_oracle.php, line 141]

and

Fatal error: Function name must be a string in /usr/ns-home/docs/prod-
experts/frameworks/demo2/cake/libs/model/datasources/dbo/
dbo_oracle.php on line 145

so on line 141 of dbo_oracle.php I changed

//$connect = $config['connect'];
$connect = 'oci_connect';

I'm sure this isn't the best fix.  Do I have something configured
incorrectly?


my dbo_oracle.php info:

/* SVN FILE: $Id: dbo_oracle.php 5875 2007-10-23 00:25:51Z phpnut $ */
/**
 * Oracle layer for DBO.
 *
 * Long description for file
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) :  Rapid Development Framework 
 * Copyright 2005-2007, Cake Software Foundation, Inc.
 *  1785 E. Sahara 
Avenue, Suite 490-204
 *  Las Vegas, 
Nevada 89104
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @filesource
 * @copyright   Copyright 2005-2007, Cake Software Foundation, Inc.
 * @link
http://www.cakefoundation.org/projects/info/cakephp
CakePHP(tm) Project
 * @package cake
 * @subpackage  cake.cake.libs.model.datasources.dbo
 * @since   CakePHP v 1.2.0.4041
 * @version $Revision: 5875 $
 * @modifiedby  $LastChangedBy: phpnut $
 * @lastmodified$Date: 2007-10-22 19:25:51 -0500 (Mon, 22 Oct 2007) $
 * @license 
http://www.opensource.org/licenses/mit-license.php The
MIT License
 */


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Unknown internal server error

2007-11-06 Thread Andreas

I've been mailing back and forth with my host the entire day and they
upgraded zend optimizer to 3.3 and also showed me a way to deactivate
the zend stuff but that didn't make it work.

The support guy told me that it looked like it was something with
mod_rewrite which messed things up and therefor he commented out the
mod_rewrite things in my .htaccess files. But have the .htaccess files
changed any between 1.1.x and 1.2.x?

Some good stuff though is that I can see the "welcome" page (without
css though...) ;)
http://thelucifer.net/tmp/cake_not_working.png

I'm not so sure it's the zend optimizer anymore since it's both
upgraded and deactivated...

On Nov 5, 2:16 pm, Andreas <[EMAIL PROTECTED]> wrote:
> Ah, ok thanks. I'll talk with my host!
>
> On 5 Nov, 11:39, AD7six <[EMAIL PROTECTED]> wrote:
>
> > On Nov 5, 8:23 am, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > Hmm, yea, I'll try that. But shouldn't cakephp work even if the zend
> > > optimizer is enabled?
>
> > Not if the zend optimizer has a bug in it.
>
> >http://groups.google.com/group/cake-php/search?group=cake-php&q=+inte...
>
> > hth,
>
> > AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Associations Problem

2007-11-06 Thread cronet

Hi,

I have a tricky Associationsproblem:
The Data is retrieved by an XML Request and Stored locally. For that i
wrote a console shell script which works fine at this time.


Following DB Structure:

CREATE TABLE `hotel_types` (
  `id` int(11) NOT NULL auto_increment,
  `hoteltype_id` int(255) NOT NULL default '0',
  `languagecode` varchar(10) NOT NULL default '',
  `name` varchar(255) NOT NULL default '',
  `created` datetime default NULL,
  `modified` datetime default NULL,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM;


CREATE TABLE `hotels` (
  `id` bigint(20) NOT NULL auto_increment,
  `address` varchar(255) NOT NULL default '',
  `hotel_id` bigint(20) NOT NULL default '0',
  `hoteltype_id` int(255) NOT NULL default '0',
  `name` varchar(255) NOT NULL default '',
  `url` varchar(255) NOT NULL default '',
  `zip` varchar(255) NOT NULL default '',
  `created` datetime default NULL,
  `modified` datetime default NULL,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM;




Every Hotel hasOne HotelType: Hotel.hoteltype_id =
HotelType.hoteltype_id

I don't know how to tell Cake the different Naming Convention.

If I change in HotelType Model
var $primaryKey = "hoteltype_id";

my Update Scripts won't work (because the primaryKey for Updates is
still 'id' ).


I see two possible Methods:
1) There is way to tell cake the different associations.
2) I need to use different Models for my UpdateScript.


What Do you think?


Regards,
Alexander


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Add Syntax Coloring to .thtml files with JEdit?

2007-11-06 Thread Wayne Fay

You may need to add/install the PHPParser plugin, if you don't already
have it. Or upgrade to the latest (dev) version of jEdit.

Wayne

On 11/6/07, Robert Sosinski <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I am starting to use JEdit with CakePHP, however .thtml files do not
> show any syntax coloring.  Is there some way I can change this?
>
> 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?hl=en
-~--~~~~--~~--~--~---



General site sturcture

2007-11-06 Thread jimmyxx


Hey, 
I'm new to cakephp and need some advise on how to structure my application.
I have a two column layout, in the main column i echo $content_for_layout.
This all works fine but now I want to start working on the other column
which i'll use for a menu, a skyscraper banner, and little modules like
'whos online'. It would be ideal if in the layout.thtml I could echo
$content_for_side_column and then manage that column through cakephp. I've
into /cake/libs/view.php and I thought hacking something in there is not a
good solution and there must be a better way of doing it. Any suggestions
how I should this in a well structured way?

cheers
-- 
View this message in context: 
http://www.nabble.com/General-site-sturcture-tf4759413.html#a13610742
Sent from the CakePHP mailing list archive at Nabble.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?hl=en
-~--~~~~--~~--~--~---



Add Syntax Coloring to .thtml files with JEdit?

2007-11-06 Thread Robert Sosinski

Hello,

I am starting to use JEdit with CakePHP, however .thtml files do not
show any syntax coloring.  Is there some way I can change this?

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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread AD7six



On Nov 6, 2:01 pm, bingo <[EMAIL PROTECTED]> wrote:
> hi all,
>
> I tried what Jon suggested. But still getting space before my xml
> declaration :-( ...this is killing me...isn't there a good way to
> debug this problem. Searching on the forum, I have realized that many
> people struggle with this.

"you could try issuing a header as the first line of your layout and
see where it complains output already
started. "

there are many threads because it's a common problem (or a common
mistake).

You'll find it in the end ;).

AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: findall on 3 models chained with belongsto

2007-11-06 Thread AD7six



On Nov 6, 4:01 pm, Claudia <[EMAIL PROTECTED]> wrote:
> Hi there
>
> Thanks for your answers.
>
> I am not that worried about the number of queries although the 20 was
> just an example.
> Although on the index page of my website I would have around 200 extra
> queries which (during testing)
> sometimes causes a page delay of about half a second - not a huge
> problem but not very good.

Note that whatever the delay encountered when debug != 0 isn't so
important. There are things that get cached when debug is 0 and
refreshed when not, and also the code to log queries and show them
adds an overhead which is otherwise simply not there. If you have a
lot of fast queries, there will be a notable difference between debug
= 0 and debug = 2 just because of logging and rendering the debug
table.

hth,

AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: findall on 3 models chained with belongsto

2007-11-06 Thread Claudia

Hi there

Thanks for your answers.

I am not that worried about the number of queries although the 20 was
just an example.
Although on the index page of my website I would have around 200 extra
queries which (during testing)
sometimes causes a page delay of about half a second - not a huge
problem but not very good.
The bigger problem is that I cannot have the query conditions that I
want (with some conditions
being in the first model, some in the second and some in the third).
I'll have a look at the dbo-patch
the AD mentioned in the reply as this seems to solve this problem.

Thanks again

Claudia

On Nov 6, 10:09 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Nov 5, 4:33 pm, Claudia <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi there
>
> > I have three models that are chained with belongsTo in one direction
> > and hasMany in the other direction:
> > Model1 belongsTo Model2 belongsTo Model3
> > and
> > Model3 hasMany Model2 hasMany Model1
>
> > Now I need to query model1 and also get the related data from model2
> > and model3 which can be easily achieved by settings model1->recursive
> > = 2 and then use model1->findall.
> > The resulting SQL ( I use postgres but mysql should be similar):
> > Cake makes a join on the model1 and model2, keeps the resulting ids of
> > the entries in model2, then makes a query for each of these ids on
> > model2 and a query for the related model3.
>
> > This causes two problems:
> > a) I cannot restrict the result depending on some columns on model3 as
> > the first query fails with 'missing from-clause entry for table
> > model3'.
>
> Some interesting 
> reading:https://trac.cakephp.org/ticket/633http://lloydhome.com/blog/archives/2007/02/Recursive-Association-Supp...
>
> > b) The query is really inefficient: Example: If the first query
> > returns 10 results we need 21 queries for in total (the join query and
> > then 10 queries each for model2 and model3). We could get the same
> > result by having only one query which uses a left join for joining
> > model1 and model2 and another left join for joining model2 and model3.
>
> > I have found a trac issue regarding this but it was closed as 
> > wontfix:https://trac.cakephp.org/ticket/2931
>
> Reducing the number of queries isn't the be all and end all. as
> clearly stated in that ticket if you attach a patch to it it'll be
> marked as an enhancement and considered.
>
> hth,
>
> AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: ACL Aro multiple parents Cake 1.2

2007-11-06 Thread AD7six



On Nov 6, 2:34 pm, Pravalitera <[EMAIL PROTECTED]> wrote:
> This is for 1.1. The ACL Component from cake 1.2 does not seem to
> handle multi-group users. Maybe dauth is easyly convertible to 1.2...

Maybe, but as dauth is not related to acl (its an authentication not
authorization solution), ifs not relevant to your question. the acl-
admin plugin is exactly that: for administration, the part of it that
applied access control (the ac component) is superseded by cake's own
auth component. It should be fairly easy to adapt it to 1.2, and
that's one of the things I´ll look at in the near future.

I don't know how to attempt users belonging to multiple groups with
the cake acl solution (unless you code it manually) but if you want
that look at phpGACL as you can do so with that. What you really want
if that's the case is perhaps a role based auth system. You might want
to compare the db tables between phpGACL and cake's own acl solution
to see what adding multiple inheritance would require on the db since,
logically, a node in a tree (a user in the aros table, a resorce in
the acos table) can only have one parent.

hth,

AD

>
> On 5 nov, 20:53, seacloud9 <[EMAIL PROTECTED]> wrote:
>
> > Check out dauth but you will want to view the cached google infomation
> > first the page was 
> > moved..http://64.233.167.104/search?q=cache:nO61TuOudjAJ:bakery.cakephp.org/...
>
> >http://www.ad7six.com/Demos
>
> >http://cakeforge.org/projects/acl-admingoodexample but you will need
> > dauth or some sort of authentication working before you start.
>
> > On Nov 5, 8:56 am, BravoFoxtrot <[EMAIL PROTECTED]> wrote:
>
> > > I'd love to see an example of this also.  I've been combing the web
> > > trying to find a good example.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Clean Cake 1.1 sigfaults apache2

2007-11-06 Thread AD7six



On Nov 6, 3:31 pm, MaxDao <[EMAIL PROTECTED]> wrote:
> AD, this example (test class) that IS the code is I'm debuggind, where
> can it be more deep?

The line of code you have stopped on is a call to a method. go into
it.

hth,

AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: ACL Aro multiple parents Cake 1.2

2007-11-06 Thread Pravalitera

This is for 1.1. The ACL Component from cake 1.2 does not seem to
handle multi-group users. Maybe dauth is easyly convertible to 1.2...


On 5 nov, 20:53, seacloud9 <[EMAIL PROTECTED]> wrote:
> Check out dauth but you will want to view the cached google infomation
> first the page was 
> moved..http://64.233.167.104/search?q=cache:nO61TuOudjAJ:bakery.cakephp.org/...
>
> http://www.ad7six.com/Demos
>
> http://cakeforge.org/projects/acl-admingood example but you will need
> dauth or some sort of authentication working before you start.
>
> On Nov 5, 8:56 am, BravoFoxtrot <[EMAIL PROTECTED]> wrote:
>
> > I'd love to see an example of this also.  I've been combing the web
> > trying to find a good example.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Clean Cake 1.1 sigfaults apache2

2007-11-06 Thread MaxDao

AD, this example (test class) that IS the code is I'm debuggind, where
can it be more deep?

On Nov 6, 2:44 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Nov 6, 12:55 pm, MaxDao <[EMAIL PROTECTED]> wrote:
>
> > I came with die(__LINE__ . '-' . __FILE__); thru dispatcher code, and
> > found place where apache segfauls:
>
> >https://trac.cakephp.org/browser/trunk/cake/1.1.x.x/cake/libs/control...
>
> > Very strange.. I have many OPP code and it works just great.
>
> You are not debugging deep enough. $this->modelClass is a string, and
> you are instanciating a model class (named Test in your case, assuming
> your example code is what you are debugging) with that line.
>
> don't stop debugging until you reach a php function call or otherwise
> can't go any deeper
>
> hth
>
> AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Died?

2007-11-06 Thread Mike Green

Looks like the database is hosed..



On Nov 6, 12:50 pm, Baz <[EMAIL PROTECTED]> wrote:
> Now sure who to alert, but I'm sure the right person will see it here.
>
> I think the Bakery died. Can't access any articles.
> --
> Baz L
> Web Development 2.0: Web Design, CakePHP, 
> Javascripthttp://www.WebDevelopment2.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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread bingo

hi all,

I tried what Jon suggested. But still getting space before my xml
declaration :-( ...this is killing me...isn't there a good way to
debug this problem. Searching on the forum, I have realized that many
people struggle with this.

Regards,
Ritesh

On Nov 6, 7:48 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Nov 6, 1:13 pm, Mike Green <[EMAIL PROTECTED]> wrote:
>
> > £50 says you have short_open_tags enabled in your php.ini
>
> If I were a betting man... I wouldn't have taken that bet on :D


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Bakery Died?

2007-11-06 Thread Baz
Now sure who to alert, but I'm sure the right person will see it here.

I think the Bakery died. Can't access any articles.
--
Baz L
Web Development 2.0: Web Design, CakePHP, Javascript
http://www.WebDevelopment2.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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread AD7six



On Nov 6, 1:13 pm, Mike Green <[EMAIL PROTECTED]> wrote:
> £50 says you have short_open_tags enabled in your php.ini

If I were a betting man... I wouldn't have taken that bet on :D


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread AD7six



On Nov 6, 1:37 pm, bingo <[EMAIL PROTECTED]> wrote:
> hi Mike,
>
> you are right..I have short_open_tags on. But how does it matter?

because if you get a parse error, php will stop at that point issue an
error message and dump the buffer it has in memory. have you got as
output a full view with layout or just the view then?

in any event fixing a parseerror should be a no-brainer step forwards
(you can avoid it by doing  if you can't turn
off shorttags..

hth,

AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread Jon Bennett
hi,

change:



to:

'; ?>

hth

jon

On 06/11/2007, bingo <[EMAIL PROTECTED]> wrote:
>
> hi Mike,
>
> you are right..I have short_open_tags on. But how does it matter?
>
> Also I tried to switch it off but the above error still persist.
>
> Regards,
> Ritesh
>
>
> On Nov 6, 7:13 am, Mike Green <[EMAIL PROTECTED]> wrote:
> > �50 says you have short_open_tags enabled in your php.ini
> >
> > php thinks
> >  >
> > is actually
> >
> >  >
> > Mike
> >
> > On Nov 6, 11:56 am, bingo <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > hi AD7six,
> >
> > > I used Chris Lamp's magic command (see below) to get rid of all new
> > > trailing blank lines
> >
> > > $ find -name "*.php" | xargs sed -i -e :a -e '/^\n*$/{$d;N;ba' -e '}'
> >
> > > The above command did help as now I am not getting any blank line
> > > before my xml declaration. But I am still getting some blank spaces
> > > before my xml declaration. I tried what you suggested but still not
> > > able to find any specific problem. Based on your suggestion, I changed
> > > my layout to look like this
> >
> > > //File: views/layouts/rss/default.ctp
> > > 
> > >  > > echo '';
> > > echo '', Router::url('/', true), '';
> > > echo 'en-us';
> > > echo '', date("D, j M Y H:i:s", gmmktime()) . ' GMT', ' > > pubDate>';
> > > echo 'Memento';
> > > echo '[EMAIL PROTECTED]';
> > > echo '[EMAIL PROTECTED]';
> > > echo 'http://blogs.law.harvard.edu/tech/rss';
> > > echo $content_for_layout;
> > > echo '';
> > > ?>
> >
> > > However if I set debug to 2, I am getting this error message
> >
> > > Parse error: parse error, unexpected T_STRING in D:\xampp\xampp\htdocs
> > > \memento\app\views\layouts\rss\default.ctp on line 1
> >
> > > I am still clueless. :-(
> >
> > > Regards,
> > > Ritesh
> >
> > > On Nov 6, 5:49 am, AD7six <[EMAIL PROTECTED]> wrote:
> >
> > > > On Nov 6, 10:15 am, bingo <[EMAIL PROTECTED]> wrote:
> >
> > > > > hi,
> >
> > > > >  I am using cakePHP 1.2 and having trouble getting RSS working. My RSS
> > > > > output contains one blank line before the start of the first tag,
> > > > > breaking my RSS. I have checked all my modules, controllers, views,
> > > > > components, and helpers for blank space but didn't find anywhere. Did
> > > > > anyone experienced similar problem before and would be kind enough to
> > > > > tell me where possibly I am making a mistake or how to find where I
> > > > > might be inserting a blank line
> >
> > > > > Regards,
> > > > > Ritesh
> >
> > > > Have you got any code which contains ... ?>  >
> > > > There really is only one cause. you could try issuing a header as the
> > > > first line of your layout and see where it complains output already
> > > > started.
> >
> > > > hth,
> >
> > > > AD- Hide quoted text -
> >
> > - Show quoted text -
>
>
> >
>


-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Clean Cake 1.1 sigfaults apache2

2007-11-06 Thread AD7six



On Nov 6, 12:55 pm, MaxDao <[EMAIL PROTECTED]> wrote:
> I came with die(__LINE__ . '-' . __FILE__); thru dispatcher code, and
> found place where apache segfauls:
>
> https://trac.cakephp.org/browser/trunk/cake/1.1.x.x/cake/libs/control...
>
> Very strange.. I have many OPP code and it works just great.

You are not debugging deep enough. $this->modelClass is a string, and
you are instanciating a model class (named Test in your case, assuming
your example code is what you are debugging) with that line.

don't stop debugging until you reach a php function call or otherwise
can't go any deeper

hth

AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread bingo

hi Mike,

you are right..I have short_open_tags on. But how does it matter?

Also I tried to switch it off but the above error still persist.

Regards,
Ritesh


On Nov 6, 7:13 am, Mike Green <[EMAIL PROTECTED]> wrote:
> £50 says you have short_open_tags enabled in your php.ini
>
> php thinks
> 
> is actually
>
> 
> Mike
>
> On Nov 6, 11:56 am, bingo <[EMAIL PROTECTED]> wrote:
>
>
>
> > hi AD7six,
>
> > I used Chris Lamp's magic command (see below) to get rid of all new
> > trailing blank lines
>
> > $ find -name "*.php" | xargs sed -i -e :a -e '/^\n*$/{$d;N;ba' -e '}'
>
> > The above command did help as now I am not getting any blank line
> > before my xml declaration. But I am still getting some blank spaces
> > before my xml declaration. I tried what you suggested but still not
> > able to find any specific problem. Based on your suggestion, I changed
> > my layout to look like this
>
> > //File: views/layouts/rss/default.ctp
> > 
> >  > echo '';
> > echo '', Router::url('/', true), '';
> > echo 'en-us';
> > echo '', date("D, j M Y H:i:s", gmmktime()) . ' GMT', ' > pubDate>';
> > echo 'Memento';
> > echo '[EMAIL PROTECTED]';
> > echo '[EMAIL PROTECTED]';
> > echo 'http://blogs.law.harvard.edu/tech/rss';
> > echo $content_for_layout;
> > echo '';
> > ?>
>
> > However if I set debug to 2, I am getting this error message
>
> > Parse error: parse error, unexpected T_STRING in D:\xampp\xampp\htdocs
> > \memento\app\views\layouts\rss\default.ctp on line 1
>
> > I am still clueless. :-(
>
> > Regards,
> > Ritesh
>
> > On Nov 6, 5:49 am, AD7six <[EMAIL PROTECTED]> wrote:
>
> > > On Nov 6, 10:15 am, bingo <[EMAIL PROTECTED]> wrote:
>
> > > > hi,
>
> > > >  I am using cakePHP 1.2 and having trouble getting RSS working. My RSS
> > > > output contains one blank line before the start of the first tag,
> > > > breaking my RSS. I have checked all my modules, controllers, views,
> > > > components, and helpers for blank space but didn't find anywhere. Did
> > > > anyone experienced similar problem before and would be kind enough to
> > > > tell me where possibly I am making a mistake or how to find where I
> > > > might be inserting a blank line
>
> > > > Regards,
> > > > Ritesh
>
> > > Have you got any code which contains ... ?> 
> > > There really is only one cause. you could try issuing a header as the
> > > first line of your layout and see where it complains output already
> > > started.
>
> > > hth,
>
> > > AD- Hide quoted text -
>
> - Show quoted text -


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: select box validation in CakaPHP 1.2

2007-11-06 Thread senser

Even "manual" invalidation doesn't help:
$this->ModelName->invalidate('field_name', 'error_message'); doesn't
display error_message in layout :-/


On Nov 1, 9:30 am, senser <[EMAIL PROTECTED]> wrote:
> Doesn't anybody validate select_boxes?
> How do you render error_messages?
>
> On Oct 22, 8:10 am, senser <[EMAIL PROTECTED]> wrote:
>
> > Hi Japheth,
>
> > The problem is that if I use 'selected'=>'' and when form doesn't
> > validate  because wrong fields the application "doesn't remember" the
> > selected value in listbox. For example if user selects 2001-2002 tax
> > year and submit form with wrong field for tax, form doesn't validate
> > and remember the entered value for tax, but doesn't remember the
> > selected tax year because of using 'selected'=>''
>
> > On Oct 21, 10:46 am, Japheth <[EMAIL PROTECTED]> wrote:
>
> > > Hi Senser,
>
> > > I've managed to use showEmpty => ' ', to provide an option that is
> > > essentially blank.  You could then use trim() if you found that ' '
> > > still was counted as a value?
> > > Also, if you want to make sure that the empty option is selected by
> > > default, you could add 'selected' => ' ' to your options array also.
>
> > > Does that make sense?  If so, did it help?
>
> > > Cheers,
> > > Japheth
>
> > > On Oct 20, 9:00 pm, senser <[EMAIL PROTECTED]> wrote:
>
> > > > I found this link while searching for resolve but it didn't help -
> > > > when I use "array(showEmpty=>'Select...')" it shows inselectboxbut
> > > > it's not selected by default and doesn't help :(
>
> > > > May beselectboxes must be validated in different manner but I don't
> > > > know how 
>
> > > > On Oct 20, 12:22 pm, manuj bansal <[EMAIL PROTECTED]> wrote:
>
> > > > > your problem may be solved by this link
>
> > > > >http://groups.google.com/group/cake-php/browse_thread/thread/8c89ca42...
>
> > > > > On Oct 20, 12:50 pm, senser <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi  manuj.
>
> > > > > > Your proposal didn't solve my problem. I think I did read somewhere 
> > > > > > in
> > > > > > group postings that using fromHelpr->input is the right way for form
> > > > > > fields and using formHelper->select, formHelper->label, ... etc will
> > > > > > be deprecated in next versions of CakePHP. I'm not sure for this and
> > > > > > correct me if I'm wrong.
>
> > > > > > On Oct 19, 8:06 pm, manuj bansalr <[EMAIL PROTECTED]> wrote:
>
> > > > > > > i didnt get your code you wantselectoption then why r you going 
> > > > > > > thru
> > > > > > > input function
>
> > > > > > > try it
>
> > > > > > > *view code
>
> > > > > > > echo $form->label('modelname.name')
> > > > > > > echo $form->select('modelname.name',array('value'=>'text'));
> > > > > > > echo $form->error('it can't be blank');
>
> > > > > > > ***model code*
>
> > > > > > > var
> > > > > > > $validate=array('name'=>VALID_NOT_EMPTY);
>
> > > > > > > IT IS FORSELECTOPTION
>
> > > > > > > On Oct 19, 9:24 pm, senser <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > Hi there!
>
> > > > > > > > I'm trying to write a code for displaying aselectboxwith several
> > > > > > > > options (tax years for example) and I have to validate the data 
> > > > > > > > passed
> > > > > > > > by thatselectbox. I want the user to mustselectan option from 
> > > > > > > > the
> > > > > > > > list.
> > > > > > > > Here is the code from view file where I populate theboxusing
> > > > > > > > formHelper:
>
> > > > > > > > /CODE**/
> > > > > > > > print $form->input('CustomerTaxYear.tax_years_id',
> > > > > > > > array('type'=>'select', 'label'=>'Tax Year', 'options'=>
> > > > > > > > $taxYearsArray,  'size'=>3,'error'=>array('required'=>'Tax Year 
> > > > > > > > is
> > > > > > > > obligatory', 'maxlength'=>'Tax year code max length is 3 
> > > > > > > > symbols',
> > > > > > > > 'number'=>'Tax year code must be a number')));
> > > > > > > > /CODE_END/
>
> > > > > > > > and here is the part ofvalidationarray:
>
> > > > > > > > /CODE**/
> > > > > > > > var
> > > > > > > > $validate=array( 
> > > > > > > > 'tax_years_id'=>array('required'=>VALID_NOT_EMPTY,
> > > > > > > > 
> > > > > > > > 'maxlength'=>array('rule'=>array('between',1,3)),
> > > > > > > > 
> > > > > > > > 'number'=>VALID_NUMBER));
> > > > > > > > /CODE_END/
>
> > > > > > > > The result is that if the user doesn'tselectan element from the
> > > > > > > >selectbox, there is no error message displayed and 
> > > > > > > >thevalidationis
> > > > > > > > passed but the form data is not stored in DB, because the field
> > > > > > > > "tax_years_id" doesn't have default value which is correct 
> > > > > > > > behaviour.
>
> > > > > > > > I've tried with 'show

Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread Mike Green

£50 says you have short_open_tags enabled in your php.ini

php thinks
 wrote:
> hi AD7six,
>
> I used Chris Lamp's magic command (see below) to get rid of all new
> trailing blank lines
>
> $ find -name "*.php" | xargs sed -i -e :a -e '/^\n*$/{$d;N;ba' -e '}'
>
> The above command did help as now I am not getting any blank line
> before my xml declaration. But I am still getting some blank spaces
> before my xml declaration. I tried what you suggested but still not
> able to find any specific problem. Based on your suggestion, I changed
> my layout to look like this
>
> //File: views/layouts/rss/default.ctp
> 
>  echo '';
> echo '', Router::url('/', true), '';
> echo 'en-us';
> echo '', date("D, j M Y H:i:s", gmmktime()) . ' GMT', ' pubDate>';
> echo 'Memento';
> echo '[EMAIL PROTECTED]';
> echo '[EMAIL PROTECTED]';
> echo 'http://blogs.law.harvard.edu/tech/rss';
> echo $content_for_layout;
> echo '';
> ?>
>
> However if I set debug to 2, I am getting this error message
>
> Parse error: parse error, unexpected T_STRING in D:\xampp\xampp\htdocs
> \memento\app\views\layouts\rss\default.ctp on line 1
>
> I am still clueless. :-(
>
> Regards,
> Ritesh
>
> On Nov 6, 5:49 am, AD7six <[EMAIL PROTECTED]> wrote:
>
> > On Nov 6, 10:15 am, bingo <[EMAIL PROTECTED]> wrote:
>
> > > hi,
>
> > >  I am using cakePHP 1.2 and having trouble getting RSS working. My RSS
> > > output contains one blank line before the start of the first tag,
> > > breaking my RSS. I have checked all my modules, controllers, views,
> > > components, and helpers for blank space but didn't find anywhere. Did
> > > anyone experienced similar problem before and would be kind enough to
> > > tell me where possibly I am making a mistake or how to find where I
> > > might be inserting a blank line
>
> > > Regards,
> > > Ritesh
>
> > Have you got any code which contains ... ?> 
> > There really is only one cause. you could try issuing a header as the
> > first line of your layout and see where it complains output already
> > started.
>
> > hth,
>
> > AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread bingo

hi AD7six,

I used Chris Lamp's magic command (see below) to get rid of all new
trailing blank lines

$ find -name "*.php" | xargs sed -i -e :a -e '/^\n*$/{$d;N;ba' -e '}'

The above command did help as now I am not getting any blank line
before my xml declaration. But I am still getting some blank spaces
before my xml declaration. I tried what you suggested but still not
able to find any specific problem. Based on your suggestion, I changed
my layout to look like this

//File: views/layouts/rss/default.ctp

';
echo '', Router::url('/', true), '';
echo 'en-us';
echo '', date("D, j M Y H:i:s", gmmktime()) . ' GMT', '';
echo 'Memento';
echo '[EMAIL PROTECTED]';
echo '[EMAIL PROTECTED]';
echo 'http://blogs.law.harvard.edu/tech/rss';
echo $content_for_layout;
echo '';
?>


However if I set debug to 2, I am getting this error message

Parse error: parse error, unexpected T_STRING in D:\xampp\xampp\htdocs
\memento\app\views\layouts\rss\default.ctp on line 1

I am still clueless. :-(

Regards,
Ritesh



On Nov 6, 5:49 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Nov 6, 10:15 am, bingo <[EMAIL PROTECTED]> wrote:
>
> > hi,
>
> >  I am using cakePHP 1.2 and having trouble getting RSS working. My RSS
> > output contains one blank line before the start of the first tag,
> > breaking my RSS. I have checked all my modules, controllers, views,
> > components, and helpers for blank space but didn't find anywhere. Did
> > anyone experienced similar problem before and would be kind enough to
> > tell me where possibly I am making a mistake or how to find where I
> > might be inserting a blank line
>
> > Regards,
> > Ritesh
>
> Have you got any code which contains ... ?> 
> There really is only one cause. you could try issuing a header as the
> first line of your layout and see where it complains output already
> started.
>
> hth,
>
> AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Clean Cake 1.1 sigfaults apache2

2007-11-06 Thread MaxDao

I came with die(__LINE__ . '-' . __FILE__); thru dispatcher code, and
found place where apache segfauls:

https://trac.cakephp.org/browser/trunk/cake/1.1.x.x/cake/libs/controller/controller.php#L308

Very strange.. I have many OPP code and it works just great.

Here is code of my test model:



And test controller:



Any ideas?


On Nov 6, 12:46 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Nov 6, 10:49 am, MaxDao <[EMAIL PROTECTED]> wrote:
>
> > AD, this happens even in empty controller with just empty index()
> > method inside it.
> > Where should I try to put log code?
>
> How about on any line of code that is executed. Hint: stuff in the
> cake folder (would you believe it!) gets executed.
>
> Who knows, maybe this method is a worthy starting 
> point:https://trac.cakephp.org/browser/trunk/cake/1.1.x.x/cake/dispatcher.p...
>
> hth,
>
> AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Beginner: Why is $_SESSION empty when I access it from a non cakephp php file?

2007-11-06 Thread AD7six



On Nov 5, 8:35 pm, BobDev <[EMAIL PROTECTED]> wrote:
> I have my cakePHP application running it can access the database and
> everything.
>
> I want a simple non-table based login. So I have a simple non-cake
> form to accept a username/password. After I check the u/p for
> validity, I want to add it to the $_SESSION. However, when I do a
> var_dump($_SESSION) on this page the _SESSION is always NULL. I go
> ahead and add it - it now shows up in the _SESSION.
>
> But, when I am in my CakePHP views and I check to see if I am logged
> it, it always fails because the _SESSION value I added to is not the
> _SESSION used by cakePHP.
>
> When I go back to the login page, the _SESSION is null again.
>
> Thanks for your help,
>
> Bob

Why are you writng a login form for a cake application (is that
right?) outside of cake?

That´s likely to bite you in the future.

AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: CRM o CMS in CakePHP

2007-11-06 Thread Thrilller

pagebakery the CMS i think

but i m also looking for a CRM app in CAKEPHP

let me know if you got any
thanks

On Nov 5, 3:21 pm, "Pisinho" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> recently i find a CRM o CMS make with cakephp, is not 'new Drupal' , but i
> don't save a link.
>
> Can I help me ? Do you have a link ?
>
> Thanks in advance.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread AD7six



On Nov 6, 10:15 am, bingo <[EMAIL PROTECTED]> wrote:
> hi,
>
>  I am using cakePHP 1.2 and having trouble getting RSS working. My RSS
> output contains one blank line before the start of the first tag,
> breaking my RSS. I have checked all my modules, controllers, views,
> components, and helpers for blank space but didn't find anywhere. Did
> anyone experienced similar problem before and would be kind enough to
> tell me where possibly I am making a mistake or how to find where I
> might be inserting a blank line
>
> Regards,
> Ritesh

Have you got any code which contains ... ?> http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Clean Cake 1.1 sigfaults apache2

2007-11-06 Thread AD7six



On Nov 6, 10:49 am, MaxDao <[EMAIL PROTECTED]> wrote:
> AD, this happens even in empty controller with just empty index()
> method inside it.
> Where should I try to put log code?

How about on any line of code that is executed. Hint: stuff in the
cake folder (would you believe it!) gets executed.

Who knows, maybe this method is a worthy starting point:
https://trac.cakephp.org/browser/trunk/cake/1.1.x.x/cake/dispatcher.php#L78

hth,

AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Clean Cake 1.1 sigfaults apache2

2007-11-06 Thread MaxDao

AD, this happens even in empty controller with just empty index()
method inside it.
Where should I try to put log code?

Also this is not always happens but its very often. (80% cases)


On Nov 6, 11:18 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Nov 6, 9:55 am, MaxDao <[EMAIL PROTECTED]> wrote:
>
> > I'v tried it on php 4.4.7 (Gentoo) and 4.4.8_pre (Updated from
> > portage) - same thing.
> > Mysql is 5.0.44 (same thing was on 4.1.x mysql branch)
>
> > This code works well on my windows PC with php5, but I badly need it
> > to run on my server.
>
> > I will appreciate any help.
>
> I would suspect that something isn't set up right, and what is
> happening is that cake is trying to send you a missing* message which
> for whatever reason is triggering this problem. Try running the same
> version of php on your windows pc. or add some $this->log("made it
> " .__FILE__. __LINE__); throughout your live install to figure out on
> what line exactly your seg fault occurs.
>
> hth,
>
> AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Clean Cake 1.1 sigfaults apache2

2007-11-06 Thread AD7six



On Nov 6, 9:55 am, MaxDao <[EMAIL PROTECTED]> wrote:
> I'v tried it on php 4.4.7 (Gentoo) and 4.4.8_pre (Updated from
> portage) - same thing.
> Mysql is 5.0.44 (same thing was on 4.1.x mysql branch)
>
> This code works well on my windows PC with php5, but I badly need it
> to run on my server.
>
> I will appreciate any help.

I would suspect that something isn't set up right, and what is
happening is that cake is trying to send you a missing* message which
for whatever reason is triggering this problem. Try running the same
version of php on your windows pc. or add some $this->log("made it
" .__FILE__. __LINE__); throughout your live install to figure out on
what line exactly your seg fault occurs.

hth,

AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



banging my head for last two days to find the blank line in RSS output

2007-11-06 Thread bingo

hi,

 I am using cakePHP 1.2 and having trouble getting RSS working. My RSS
output contains one blank line before the start of the first tag,
breaking my RSS. I have checked all my modules, controllers, views,
components, and helpers for blank space but didn't find anywhere. Did
anyone experienced similar problem before and would be kind enough to
tell me where possibly I am making a mistake or how to find where I
might be inserting a blank line


Regards,
Ritesh


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Clean Cake 1.1 sigfaults apache2

2007-11-06 Thread MaxDao

I'v tried it on php 4.4.7 (Gentoo) and 4.4.8_pre (Updated from
portage) - same thing.
Mysql is 5.0.44 (same thing was on 4.1.x mysql branch)

This code works well on my windows PC with php5, but I badly need it
to run on my server.

I will appreciate any help.

On Nov 5, 2:59 pm, Felix Geisendörfer <[EMAIL PROTECTED]> wrote:
> Hey MaxDao,
>
> what PHP version are you on?
>
> -- Felix
> --
> Blogger:http://www.thinkingphp.org/
> Entrepreneur:http://www.posttask.com//-- currently in private beta,
> ask me for invite / password/
> Freelancer:http://www.fg-webdesign.de/
>
> AIM:theundefined87
> Skype:  TimeFor23
> Other IM:   felixge.de 
> Mobile (USA):   +1 404 3888693
> Mobile (GER):   +49 162 9391612
> Twitter:http://twitter.com/felixge
>
> MaxDao wrote:
> > Hello,
>
> > In my installation of cake I have created model class. And access page
> > cake cases
>
> > "[Mon Nov 05 14:09:10 2007] [notice] child pid 10406 exit signal
> > Segmentation fault (11)"
>
> > If i put $var useTable = false; to my model class it works well.
>
> > Can anyone help me debugging this issue?
>
> > I have to notice that on same server are lots of othe projects on
> > other frameworks\CMS and everything works just great, and server are
> > maintained.
>
> > Let me know what info I can provide that will help investigation this
> > problem.
>
> > Regards, Maxim


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: findall on 3 models chained with belongsto

2007-11-06 Thread AD7six



On Nov 5, 4:33 pm, Claudia <[EMAIL PROTECTED]> wrote:
> Hi there
>
> I have three models that are chained with belongsTo in one direction
> and hasMany in the other direction:
> Model1 belongsTo Model2 belongsTo Model3
> and
> Model3 hasMany Model2 hasMany Model1
>
> Now I need to query model1 and also get the related data from model2
> and model3 which can be easily achieved by settings model1->recursive
> = 2 and then use model1->findall.
> The resulting SQL ( I use postgres but mysql should be similar):
> Cake makes a join on the model1 and model2, keeps the resulting ids of
> the entries in model2, then makes a query for each of these ids on
> model2 and a query for the related model3.
>
> This causes two problems:
> a) I cannot restrict the result depending on some columns on model3 as
> the first query fails with 'missing from-clause entry for table
> model3'.

Some interesting reading:
https://trac.cakephp.org/ticket/633
http://lloydhome.com/blog/archives/2007/02/Recursive-Association-Support-in-CakePHP.html

> b) The query is really inefficient: Example: If the first query
> returns 10 results we need 21 queries for in total (the join query and
> then 10 queries each for model2 and model3). We could get the same
> result by having only one query which uses a left join for joining
> model1 and model2 and another left join for joining model2 and model3.
>
> I have found a trac issue regarding this but it was closed as 
> wontfix:https://trac.cakephp.org/ticket/2931

Reducing the number of queries isn't the be all and end all. as
clearly stated in that ticket if you attach a patch to it it'll be
marked as an enhancement and considered.

hth,

AD


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---