Re: cakephp on kubuntu...no way

2008-03-08 Thread Marcos Hernández





Hi!

I think your problem is the .htaccess file. Read here
http://manual.cakephp.org/chapter/installing, in section 5. I'm using
CakePHP in Ubuntu for 5 months now and works fine.

Good luck!!

Kchopein.

mcphisto escribi:

  Hi,
I'm using cakeph since 1 year and never had problems with windows xp
and easy php 2.0.1.
Now I installed kubuntu and I can't get my applications working. I
only see the home page without any style css and when i try a link it
says "page not found". The only doubt I've is my httpd.conf file.
I post here the configuration. I want my applications run under /var/
www. Is there something wrong.

DocumentRoot /var/www/



LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

Directory "/var/www/"
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI
MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options
All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please
see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed
in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

/Directory



  


--~--~-~--~~~---~--~~
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: 404 for simplest setup.

2008-03-08 Thread Marcos Hernández





Hi!!

Cake gives always a 404 error, whatever the real problem was. To change
this you should set DEBUG to 1 in the app/config/core.php file. Maybe
you problem has to do with the Apaches rewrite module:
http://manual.cakephp.org/chapter/installing, section 5.

Goos luck!!

Kchopein.

sooonism escribi:

  hi guys,

I just setting up for my windows xp using WAMP as my server locally
and having a 404 error.

i tried "localhost/cake/app" and i get what i wanted. but after the
blog tutorial that after i created model, controller and views, i
tried "localhost/cake/app/posts/index", i get an 404 error. but i
check all the folder and files it's all there. any idea of the setting
side that i missed out?? i mean i practically follow all the setting
from the main blog tutorial.

by the way, i installed it to my mac running on XAMP and it works.

thanks!

sooon



  


--~--~-~--~~~---~--~~
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: HABTM Recursive on itself?

2008-02-24 Thread Marcos Hernández





Hi!!

Y have the same problem here. I works fine if you don't set any
conditions, but there's no way if you try to filter (WHERE). The best
solution I've found googling was to change the relationship from HABTM
to a HasMany/BelongsTo combination. Well, I don't know what you think
but for me is a disappoiting one, so I decided to solve it with a
custom SQL query. 

Sorry mate, Cake is not perfect!!

Best regards!!

Mech7 escribi:

  I am doing a find on a Tag model.. and this finds all the articles on
the Article model, but is there a way to retrieve the articles with
the related tags inside the article array? Setting the recursive
higher does not work? :(


  


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





Re: Cake and JSON.

2007-12-10 Thread Marcos Hernández





Oh, man, you're my savior!!!
It works great without touching anything!! Thanks a lot!!

hydra12 escribi:

  Try this (works in 1.2):

First, put all of your data into a variable, for instance if your
model is called items:

$items = $this-Item-findAll();
$timestamp = 1193692111; // put your timestamp here
$itemArray = Set::extract($items, '{n}.Item');
$this-set('items','{"timestamp":'.
$timestamp.',"items":'.json_encode($itemArray).'}');

Note - I haven't tested this, but it's modified from code I use for
ExtJS.  I blogged about it here: http://www.ntatd.org/mark/?p=29
(shameless plug).  Make sure to check the value of items as sent to
your view to make sure all the [ and ] are in the right place.

hydra12

On Dec 10, 3:41 am, kchopein [EMAIL PROTECTED] wrote:
  
  
Hi!!

First of all, thanks for the work!

I'm trying to use the JSON component with the Dojo Toolkit but I'm
having a problem: the generated json code includes the model level,
and I only need the data. I mean, I'm getting this:

{"timestamp":1193692111, "items":[
{"Post":{"id":"1","title":"The title","body":"This is the post
body.","created":"2007-11-07 00:44:54"}},
{"Post":{"id":"2","title":"A title once again","body":"And the post
body follows.","created":"2007-11-07 00:45:15"}},
{"Post":{"id":"3","title":"Title strikes back","body":"This is really
exciting! Not.","created":"2007-11-07 00:45:44"}},
{"Post":
{"id":"4","title":"aa","body":"aadadasdas","created":"2007-11-12
10:00:45"}}
]}

but I need something like this:

{"timestamp":1193692111, "items":[
{"id":"1","title":"The title","body":"This
is ...","created":"2007-11-07 00:44:54"},
{"id":"2","title":"A title once
again","body":"And ...","created":"2007-11-07 00:45:15"}
]}

Since I'm a Cake newbe I don't know if there's a way to do this or if
I have to do it myself. How do you solve this?

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