Re: Countries, States and Cities: Which relations i'm dealing with?

2010-08-24 Thread Mateo San Román
Hi Maybe you can do this Country hasMany State State hasMany City Country.city_id (the capital) State.city_id (the capital) I would rather go for Tree behavior. Best regards On 5 ago, 10:43, DerBjörn wrote: > Hi, > > i have three tables: countries, states and cities. > > Every coun

Re: sudo apt-get install cakephp-scripts php5-mysql

2010-08-24 Thread Daniel Samani
It says I already have it installed and is on latest version. On 25 Aug, 03:37, Steve Love wrote: > > sudo apt-get install cakephp-scripts php5-mysql > > Haven't I already installed php? Any ideas? > > Not necessarily. When you installed php5-mysql, you only installed the > MySQL package for PHP.

Re: Relationships

2010-08-24 Thread Philip Thompson
On Aug 24, 2010, at 6:03 PM, cricket wrote: > On Tue, Aug 24, 2010 at 2:31 PM, Philip Thompson > wrote: >> Hi all. >> >> Sorry for all these newb questions... trying to learn this stuff. Here's the >> relationships and tables I have: >> >> Relationships: >> Hardware HABTM Configuration >> Con

Re: sudo apt-get install cakephp-scripts php5-mysql

2010-08-24 Thread Daniel Samani
ogoinfo(); works. I don't really understand what you mean by php mod. I run sudo a2enmod php5 and get 'Module php5 already enabled' as feedback. So i guess it's enabled. Thanks for helping me out. On 25 Aug, 03:09, cricket wrote: > On Tue, Aug 24, 2010 at 8:19 PM, Daniel Samani > wrote: > > So

Re: sudo apt-get install cakephp-scripts php5-mysql

2010-08-24 Thread Steve Love
> sudo apt-get install cakephp-scripts php5-mysql > Haven't I already installed php? Any ideas? Not necessarily. When you installed php5-mysql, you only installed the MySQL package for PHP. What happens when you run the following command? sudo apt-get install php5 libapache2-mod-php5 Steve On A

Online Documentation

2010-08-24 Thread Michael Gaiser
Hey guys, I know that Cake has a great online set of documentation, but the only time I really have to work on my project is on the train which unfortunately does not have internet access. Is there a copy of the online docs anywhere or do you know of a program that can crawl the cakephp.orgsite and

Re: Landing Page Optimization

2010-08-24 Thread Dr. Loboto
Check what you need in controller (cookies?) and render different view/ layout instead of default auto-render. On Aug 24, 8:45 am, EMR wrote: > Hi Guys, > > I am completely new to CakePHP and am looking to do some landing page > optimization (A/B Testing) using Google's Landing Page optimizer. I

Re: sudo apt-get install cakephp-scripts php5-mysql

2010-08-24 Thread cricket
On Tue, Aug 24, 2010 at 8:19 PM, Daniel Samani wrote: > So i do the following > > sudo apt-get install cakephp-scripts php5-mysql > > mysql (make databases and tables i want) > > sudo cake bake -app /var/www/weblog (and bake the app) > > Now when i visit 127.0.0.1/weblog i download a file instead

Re: Countries, States and Cities: Which relations i'm dealing with?

2010-08-24 Thread cricket
On Tue, Aug 24, 2010 at 7:57 PM, DerBjörn wrote: > Thanks j, > > for your example and your suggestions. > I think I will go with the tinyint. What about the idea to use > is_state_capital and is_capital? Wouldnt this solve the problem? This looks like it's getting really complicated for nothing.

sudo apt-get install cakephp-scripts php5-mysql

2010-08-24 Thread Daniel Samani
So i do the following sudo apt-get install cakephp-scripts php5-mysql mysql (make databases and tables i want) sudo cake bake -app /var/www/weblog (and bake the app) Now when i visit 127.0.0.1/weblog i download a file instead of showing it Haven't I already installed php? Any ideas? Check out

Re: Countries, States and Cities: Which relations i'm dealing with?

2010-08-24 Thread DerBjörn
Thanks j, for your example and your suggestions. I think I will go with the tinyint. What about the idea to use is_state_capital and is_capital? Wouldnt this solve the problem? I am still thinking how to work in my database with an unique key to get sure that duplicate capitals for one state or co

Re: Intercept each request

2010-08-24 Thread cricket
On Tue, Aug 24, 2010 at 6:40 PM, sanedevil wrote: > hi all, > > Is there a way in cake to intercept every request, check if the > request is from a  logged in user and then direct him/her accordingly? That's precisely what the AuthComponent does. Check out the new CakePHP Questions site http://c

Re: Cake Translate Behavior

2010-08-24 Thread cricket
On Tue, Aug 24, 2010 at 9:48 AM, sujandhakal wrote: > I'm implementing a cms with multilingual content. i wan to implement > Translate behavior to the model. Actually I've implemented some of the > code but its not what i want. > > This is my Post Model > > class Post extends AppModel { >        

Re: Relationships

2010-08-24 Thread cricket
On Tue, Aug 24, 2010 at 2:31 PM, Philip Thompson wrote: > Hi all. > > Sorry for all these newb questions... trying to learn this stuff. Here's the > relationships and tables I have: > > Relationships: > Hardware HABTM Configuration > Configuration belongsTo ConfigurationType > > Tables: > configu

Re: CakeNewb: Models joint where one has 2 Foreign Keys

2010-08-24 Thread jamie_chong
Anthony, Thanks a lot! That's what I needed and now I've got it all figured out :) On Aug 22, 10:52 am, Anthony wrote: > You'll probably want to use containable. > > Check out:http://book.cakephp.org/view/474/Containable -Specifically > the section on deeper associations. > > On Aug 21, 12:41 am,

Intercept each request

2010-08-24 Thread sanedevil
hi all, Is there a way in cake to intercept every request, check if the request is from a logged in user and then direct him/her accordingly? Thanks! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message beca

Re: Full support for PHP 5.3

2010-08-24 Thread Miles J
I run my Cake 1.3 install on a PHP 5.3 machine. There's no reason you cant benefit from the speed/improvements of 5.3. The only difference is Cake is not using namespaces. Cake would require a huge rewrite if namespaces were added. On Aug 24, 2:05 pm, Graham Weldon wrote: > You can take advantag

Re: Full support for PHP 5.3

2010-08-24 Thread Graham Weldon
You can take advantage of PHP 5.3 features right now. CakePHP supports PHP 4+ at the moment and that includes the current 5.3 and above. The fact that the core is not using 5.3 specific features does not restrict users from using these features in userland code. CakePHP 2.0 is initially bein

Re: CakePHP 1.3 setup on Ubuntu

2010-08-24 Thread Marek Sebera
And once more, some tuts say that, in .htaccess, must be var RewriteBase, to get it work. That's when your .htaccess files are present. On 24 srp, 18:22, david wrote: > First, let me say I have CakePHP up and running perfectly on windows > with a wampserver instance running, so I'm familiar wit

Re: CakePHP 1.3 setup on Ubuntu

2010-08-24 Thread Marek Sebera
Are files .htaccess placed in root,app and app/webroot ? On 24 srp, 18:22, david wrote: > First, let me say I have CakePHP up and running perfectly on windows > with a wampserver instance running, so I'm familiar with the process. > I know how to get mod_rewrite setup, and set the permissions >

Re: Full support for PHP 5.3

2010-08-24 Thread j.blotus
you can always try lithium On Aug 24, 3:31 pm, Zippoxer wrote: > I heard CakePHP 2.0 will support PHP 5.2 and up.. > So it means it won't use the new features I mentioned :\ > > On Aug 24, 10:29 pm, "j.blotus" wrote: > > > > > in cakephp version 2 > > > version 1 will be the last to support php4

Re: Lots of cakephp warnings in the log

2010-08-24 Thread Jeremy Burns | Class Outfit
I'd guess that model->query is your culprit. If it were me I'd want to find out what's awry because I'd need to know the impact and fix it. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 24 Aug 2010, at 20:49, Thunderstriker wrote: > there are no errors pop

Re: Lots of cakephp warnings in the log

2010-08-24 Thread Thunderstriker
there are no errors poping up when debug set to 2 and everiting is working fine i am only using the model->find() and model->query() functions On 24 aug, 21:26, "j.blotus" wrote: > is there a reason you are running those ms sql functions directly > instead of using model->find() etc? > > On Aug 2

Re: Problem loading intermediate model

2010-08-24 Thread Sam
rename questions_users.php to questions_user.php. On Aug 24, 2:28 pm, "j.blotus" wrote: > please dump the contents of your model file, and the name of the file > for us > > On Aug 24, 2:17 pm, Hugo M wrote: > > > > > No, I don't get missing table error :S. Table exists (questions_users). You > >

Re: Full support for PHP 5.3

2010-08-24 Thread Zippoxer
I heard CakePHP 2.0 will support PHP 5.2 and up.. So it means it won't use the new features I mentioned :\ On Aug 24, 10:29 pm, "j.blotus" wrote: > in cakephp version 2 > > version 1 will be the last to support php4 > > On Aug 24, 2:13 pm, Zippoxer wrote: > > > > > PHP 5.3 has lots of new featur

Re: Full support for PHP 5.3

2010-08-24 Thread j.blotus
in cakephp version 2 version 1 will be the last to support php4 On Aug 24, 2:13 pm, Zippoxer wrote: > PHP 5.3 has lots of new features like namespaces, annonymous > functions... And performance is much better than old versions. > Can you see CakePHP supporting PHP 5.3 in the near future? Check

Re: Problem loading intermediate model

2010-08-24 Thread j.blotus
please dump the contents of your model file, and the name of the file for us On Aug 24, 2:17 pm, Hugo M wrote: > No, I don't get missing table error :S. Table exists (questions_users). You > can work with your model without creating a model file thanks to Cake > automagic. But if the file is crea

Re: Lots of cakephp warnings in the log

2010-08-24 Thread j.blotus
is there a reason you are running those ms sql functions directly instead of using model->find() etc? On Aug 24, 9:41 am, Thunderstriker wrote: > i get a lot of warnings in my logs like: > 2010-08-24 09:34:01 Warning: Warning (2): mssql_num_rows(): supplied > argument is not a valid MS SQL-result

Re: Lots of cakephp warnings in the log

2010-08-24 Thread Jeremy Burns | Class Outfit
Rather than trying to mask them, are you certain there isn't a genuine error going on somewhere? Does having debug set to 2 throw anything up? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 24 Aug 2010, at 14:41, Thunderstriker wrote: > i get a lot of warni

CakePHP 1.3 setup on Ubuntu

2010-08-24 Thread david
First, let me say I have CakePHP up and running perfectly on windows with a wampserver instance running, so I'm familiar with the process. I know how to get mod_rewrite setup, and set the permissions appropriately, etc. So, I just installed Ubuntu server 10.04 / Apache 2 / MySQL / PHP, and I'm now

Cake Translate Behavior

2010-08-24 Thread sujandhakal
I'm implementing a cms with multilingual content. i wan to implement Translate behavior to the model. Actually I've implemented some of the code but its not what i want. This is my Post Model array( 'title','description' )); } ?> I want to make a translate link at index

Relationships

2010-08-24 Thread Philip Thompson
Hi all. Sorry for all these newb questions... trying to learn this stuff. Here's the relationships and tables I have: Relationships: Hardware HABTM Configuration Configuration belongsTo ConfigurationType Tables: configurations - configuration_type_id configurations_hardwares - configura

Lots of cakephp warnings in the log

2010-08-24 Thread Thunderstriker
i get a lot of warnings in my logs like: 2010-08-24 09:34:01 Warning: Warning (2): mssql_num_rows(): supplied argument is not a valid MS SQL-result resource in [C:\xampp\htdocs\cake \libs\model\datasources\dbo\dbo_mssql.php, line 468] 2010-08-24 09:34:01 Warning: Warning (2): mssql_free_result(): s

Re: Problem loading intermediate model

2010-08-24 Thread Hugo M
No, I don't get missing table error :S. Table exists (questions_users). You can work with your model without creating a model file thanks to Cake automagic. But if the file is created, Cake loads the model from the file. Well... that is not working for me (with this model) :( 2010/8/24 j.blotus

Full support for PHP 5.3

2010-08-24 Thread Zippoxer
PHP 5.3 has lots of new features like namespaces, annonymous functions... And performance is much better than old versions. Can you see CakePHP supporting PHP 5.3 in the near future? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

Re: Password field in 'Edit User' when using Auth

2010-08-24 Thread cricket
On Tue, Aug 24, 2010 at 12:18 PM, WhyNotSmile wrote: > I'm using the Auth component for my site, but having problems when it > comes to editing a user.  I want it so that the user can go to the > page 'Edit My Account', and see their current information, change > whatever they want, and save it. >

Re: Cannot retrieve relational data from bootstrapped models

2010-08-24 Thread j.blotus
do you have 2 seperate apps? why not just use admin prefix routing? On Aug 24, 6:36 am, Steve wrote: > Hi all.  I am new to CakePHP and I am building a CMS with the > following folder structure: > > /public_html/cake/ > /public_html/admin/ > /public_html/frontend/ > index.php > > I have setup the

Cookies

2010-08-24 Thread voocake
Hey, i have a big problem with cookies. i set $this->Cookie->name = 'cookiename'; $this->Cookie->time = '9600'; $this->Cookie->path = '/'; $this->Cookie->domain = '.domain.com'; $this->Cookie->secure = false; $this->Cookie->key = 'sdfsdfsd'; $this->Cookie->write('User.name','Mike'); $this->Cook

Re: Countries, States and Cities: Which relations i'm dealing with?

2010-08-24 Thread j.blotus
I don't use capitals, but as has been said before, you could create a field on cities TINYINT(1) is_capital it would be a simple 0 for not capital, 1 for capital My model works well for USA. EX. North America (Zone) -> United States (Country) -> Florida (State) -> North Florida (Region) -> Tall

Re: Problem loading intermediate model

2010-08-24 Thread j.blotus
Do you get a missing table error? Often these errors can be caused by incorrect file naming or class naming. On Aug 24, 12:03 pm, Hugo M wrote: > I have a model QuestionsUser that has some relationships (belongsTo user, > question and answer). The problem is that is not loading my questions_user

Re: image upload...ajax process only works once

2010-08-24 Thread Tomfox Wiranata
huh...it somehow works with image('link_flyer_path_temp' . "?" . rand());?> but only if there is already a picture in that specific path that gets overwrittenits so freakin weird.in case there is already a pic and i upload a new one, it actually renders the new one...wtf? maybe this whole

Password field in 'Edit User' when using Auth

2010-08-24 Thread WhyNotSmile
I'm using the Auth component for my site, but having problems when it comes to editing a user. I want it so that the user can go to the page 'Edit My Account', and see their current information, change whatever they want, and save it. The problem is with the password field. If it is shown (with

Problem loading intermediate model

2010-08-24 Thread Hugo M
I have a model QuestionsUser that has some relationships (belongsTo user, question and answer). The problem is that is not loading my questions_users model and I haven't the relationships :S. I put a die in questions_users.php and is not loading the file :S. I'm doing a $uses = array(bla bla, 'Qu

Re: Autocomplete

2010-08-24 Thread Philip Thompson
On Aug 23, 2010, at 3:39 PM, Philip Thompson wrote: > Hi all. > > I'm using MooTools 1.2.4 and CakePHP 1.3. I'm attempting to get > Autocompleter.Ajax.Json() working, but I'm not seeing the result list. > Firebug is letting me know that the query is returning the correct results, > but still n

Re: call CakePHP stored Procedure

2010-08-24 Thread Ma'moon
You can simply accomplish that by using the `query` method located in your model, something like $this->Model->query('CALL sp_name()'); also CakePHP doesn't generate automated `Stored Procedures` but rather is generated `SQL Queries` to perform DB interaction between system layers and data storage

Re: Validation of Foreign Keys - Not Automatic ?

2010-08-24 Thread Sam
AFAIK, cake doesn't have this built in, however if you use InnoDB mysql tables you can use Foreign Key Constraints, which should give you what you want. http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html On Aug 23, 8:30 pm, rvandervort wrote: > Sorry that should read   "  

Cannot retrieve relational data from bootstrapped models

2010-08-24 Thread Steve
Hi all. I am new to CakePHP and I am building a CMS with the following folder structure: /public_html/cake/ /public_html/admin/ /public_html/frontend/ index.php I have setup the bootstrap.php file in the frontend to look for models in the admin app. So models for user, content and comment are s

CakePHP AMF

2010-08-24 Thread Fiuza
Good evening, I'm trying to enable the AMF service through an application developed with CakePHP 1.3. I tried to implement the solutions CPAmf, CakeAMFPHP and Zamf, but no success. Does anyone have any suggestions? Thanks, Marcos Fiuza. Check out the new CakePHP Questions site http://cakeqs.org

Landing Page Optimization

2010-08-24 Thread EMR
Hi Guys, I am completely new to CakePHP and am looking to do some landing page optimization (A/B Testing) using Google's Landing Page optimizer. I know this is a complete amateur question but can anyone walk me through how to set up the different landing pages such that google will recognize them?

call CakePHP stored Procedure

2010-08-24 Thread Cruisine
is there anybody know how to call stored procedure in cake?? i'm using cake 1.3 and have got so many efforts to call it in cake but seems not works otherwise got some error.. i wish there were somebody known how to call stored procedure and implement it from model, controller and shows it data into

call CakePHP stored Procedure

2010-08-24 Thread Cruisine
is there anybody know how to call stored procedure in cake?? i'm using cake 1.3 and have got so many efforts to call it in cake but seems not works otherwise got some error.. i wish there were somebody known how to call stored procedure and implement it from model, controller and shows it data into

Re: Countries, States and Cities: Which relations i'm dealing with?

2010-08-24 Thread DerBjörn
Hi J.Blotus, City belongsTo State, cause a state as many cities. Thats right. First i had State/City hasOne City/State to realize a state capital, but i have been told that hasOne doesn't work here and i have to use belongsTo instead... I always was with doubts about it, but i read this suggestion

Re: pdf generation problem

2010-08-24 Thread Miqdad Ali
Sorry My Problem is Not that I am getting Correct Output while echoing $htmlcontent But After Commenting echo in pdf it's not getting please help... Miqdad Ali On Thu, Aug 19, 2010 at 9:30 PM, cricket wrote: > It

Re: Dynamic Menu

2010-08-24 Thread _k10_
Not sure if this answers your query but have a look @ http://book.cakephp.org/view/1023/find-threaded On Aug 23, 10:29 pm, nightshadex101 wrote: > Hi All, > > I'm trying to build a menu system. > I've already created a table in the database, a model (with tree > behavior), and a controller. > >

Re: Windows Authentication

2010-08-24 Thread Louie Miranda
Can LDAP be used? http://bakery.cakephp.org/articles/view/ldap-models-in-cakephp -- Louie Miranda - Email: lmira...@gmail.com - Web: http://www.louiemiranda.com On Mon, Aug 23, 2010 at 9:39 PM, Ian Channing wrote: > Has anyone been crazy enough to try getting the Microsoft sqlsvr > drivers w

Bakery Registration/Login Not Working

2010-08-24 Thread Charles Blackwell
I authenticated my Bakery account and tried to log in, no dice. I reset the password...still, no dice. What do I do now? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Go