Re: Sessions across multiple apps, same domain

2010-07-12 Thread sophy
Me too On Jul 1, 4:14 am, kevenages kevena...@gmail.com wrote: I'm fairly new to cake, but an experienced PHP developer.  I have a production setup of cake.  It looks as follows: /home/keven/cake1.3 - This contains the 'spark_plug' plugin, which handles authentication /home/keven/app1

Re: Sessions across multiple apps, same domain

2010-07-12 Thread Elavazhagan chidambaram
hi how can i help you? On Mon, Jul 12, 2010 at 1:18 PM, sophy sophy.p...@gmail.com wrote: Me too On Jul 1, 4:14 am, kevenages kevena...@gmail.com wrote: I'm fairly new to cake, but an experienced PHP developer. I have a production setup of cake. It looks as follows:

Re: Sessions across multiple apps, same domain

2010-07-12 Thread Elavazhagan chidambaram
hi u check this file core.php compare with ur core file On Mon, Jul 12, 2010 at 1:23 PM, Elavazhagan chidambaram azhagancod...@gmail.com wrote: hi how can i help you? On Mon, Jul 12, 2010 at 1:18 PM, sophy sophy.p...@gmail.com wrote: Me too On Jul 1, 4:14 am, kevenages

Re: Cakephp and XAMPP installation nightmare, Can't get cake to understand root

2010-07-12 Thread nini
Try http://localhost/cake1.3.2/users/registeration and please read manual. On Jul 12, 1:20 am, Dinu464 dineshsu...@gmail.com wrote: 1) XAMPP 1.7.3 setup and workinghttp://localhost/xampp/- success 2) Unpacked cake1.3.2, installed under XAMPP - htdocs - cake1.3.2 (folder) Checked

Re: read REST API

2010-07-12 Thread nini
What about youtube php developer guide? http://code.google.com/apis/youtube/2.0/developers_guide_php.html You can put Zend libraries in your vendor folder and then use it in your functions as shown in this guide. On Jul 11, 11:04 pm, Davor Ilic webfa...@gmail.com wrote: Hi, how i can read like

Re: Saving data in a component class

2010-07-12 Thread nini
Hey, did you initialized your User model in initialize-function of your component? Seems to be not. Btw, for your purposes it already exists a nice thumbnail component: http://github.com/tute/Thumbnail-component-for-CakePHP On Jul 11, 7:20 pm, Tomfox Wiranata tomfox.wiran...@gmail.com wrote:

Re: Saving data in a component class

2010-07-12 Thread Elavazhagan chidambaram
?php class AdminsController extends AppController { var $name = 'Admins';//controller name var $helpers = array('Html','Form','Javascript','Image','Pagination');//helpers used var $layout='admin'; var $uses = array('Admin','Text_setting','MyFile','Picture'); var $components =

Re: php-ids in cakephp - 1.3

2010-07-12 Thread nini
Hey, you could place all libraries in your project vendors folder and then include it in your app_controller.php or even in bootstrap.php as shown here http://php-ids.org/faq/ . What would you like to do exactly with it? On Jul 11, 7:14 pm, hoss7 hoss...@gmail.com wrote: hi i want use PHPIDS

Re: Having Issue when submitting form to plugin controller action

2010-07-12 Thread nini
Hey, did you tried to track $this-data variable value changes using xdebug? Btw. check your debug output level (Configure::read()) in that controller function, maybe it'll be set to null and pr() doesn't output right values. Old good var_dump() would help :) On Jul 11, 6:35 pm, Arvind

Re: page is not be found

2010-07-12 Thread nini
Hey, could you paste your router file content somewhere(http:// pastie.org/)? That could help to understand your problem better. On Jul 10, 8:08 am, sai qi.jier...@gmail.com wrote: i have installed cakephp by Advanced Installation successfull.but wen i access to the page i

Re: Saving data in a component class

2010-07-12 Thread Tomfox Wiranata
nope i didnt...if thats what it takes ill give it a try. thx a lot :) On 12 Jul., 10:52, nini nikiforov.niko...@gmail.com wrote: Hey, did you initialized your User model in initialize-function of your component? Seems to be not. Btw, for your purposes it already exists a nice thumbnail

Re: Having Issue when submitting form to plugin controller action

2010-07-12 Thread Arvind
Yeah i tried all things, in fact it is not a printing output problem rather the control is not going into the index function at all, when i submit the form. Fyi, in some cases browser gives a (404 page not found) error and sometime it simply outputs the debug dump (all queries run until the end of

Re: read REST API

2010-07-12 Thread red
HttpSocket will be very helpful for making requests: http://book.cakephp.org/view/1517/HttpSocket On 11 Lip, 23:04, Davor Ilic webfa...@gmail.com wrote: Hi, how i can read like youtubes api xml or json with cake is there a method which i can use or i have to write it by my self. Check out

Re: read REST API

2010-07-12 Thread Davor Ilic
2010/7/12 red mbu...@gmail.com HttpSocket will be very helpful for making requests: http://book.cakephp.org/view/1517/HttpSocket yesss this is what i searched for thanks for help! On 11 Lip, 23:04, Davor Ilic webfa...@gmail.com wrote: Hi, how i can read like youtubes api xml or

Re: Another model displayField

2010-07-12 Thread Shaz
class Model extends AppModel { var $name = 'Model'; var $displayField = 'name'; } Change 'name' to whatever you want to be shown (i.e. 'title' etc) On 10 July, 20:58, Samueljslg samuelj...@hotmail.com wrote: Hello friends, I am starting with cakephp, I have a problem, you want

SaveAll weird behavior

2010-07-12 Thread Ernesto
Hello. i have and app with 3 models, associated in this way class Item extends AppModel { var $name = Item; var $belongsTo = array(Category); var $hasMany = array( Fathers = array( className = Relationship,

Re: SaveAll weird behavior

2010-07-12 Thread Jon Bennett
Hi, i have and app with 3 models, associated in this way class Item extends AppModel {        var $name = Item;        var $belongsTo = array(Category);        var $hasMany = array(                Fathers = array(                        className = Relationship,                        

cake 1.3.2 wants to be too smart

2010-07-12 Thread Grzegorz Pawlik
just switching from 1.3.0 to 1.3.2 got me into trouble, when I have field specified as: `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP and don't supply any value for that field in array I try to save , neither a key in 1.3.0 it's working as desired - I get current timestamp in that

Stuck with a validation rule in secondary model

2010-07-12 Thread Ernesto
Hello. i have 2 models - Item hasMany Part my Item::add() view is something like this echo $form-input(code); echo $form-input(description); echo $form-input(require_length); //this is a boolean input echo $form-input(require_width); //this is a boolean input echo $form-input(Part.0.id); echo

Re: Another model displayField

2010-07-12 Thread Samueljslg
Hi Shaz, thanks for your help, but I need to show the field of another Model. To say the field name Model2. On 12 jul, 05:47, Shaz shazam...@gmail.com wrote: class Model extends AppModel {         var $name = 'Model';         var $displayField = 'name'; } Change 'name' to whatever you want

Re: Another model displayField

2010-07-12 Thread Jeremy Burns | Class Outfit
From within model1s_controller: $this-Model1-Model2-find('list'); This assumes that Model1 and Model2 have $hasMany $belongsTo relationships defined within them. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Jul 2010, at 16:10, Samueljslg wrote: Hi

Re: Stuck with a validation rule in secondary model

2010-07-12 Thread Ernesto
i solved using Classregistry::getObject(Item); if there's any clever/lighter method let me know :P On 12 Lug, 17:04, Ernesto e.fanz...@gmail.com wrote: Hello. i have 2 models - Item hasMany Part my Item::add() view is something like this echo $form-input(code); echo

complicated relation

2010-07-12 Thread Tomek Mazur
Hi guys, I could use some help with the complicated relation I am trying to create. I have 2 tables: ingredients and units. One ingredient can have many units(HABTM relation). This creates a `ingredients_units` table with the fields: -ingredient_id -unit_id -ammount But the problem is, that if

Re: page is not be found

2010-07-12 Thread cricket
Set debug to 2 in core.php. Cake throws a 404 not found when debug is set to 0 and there's some kind of error in your code. On Sat, Jul 10, 2010 at 2:08 AM, sai qi.jier...@gmail.com wrote: i have installed cakephp by Advanced Installation successfull.but wen i access to the page i

Re: Sessions across multiple apps, same domain

2010-07-12 Thread Miles J
You should be using database sessions. On Jul 12, 12:57 am, Elavazhagan chidambaram azhagancod...@gmail.com wrote: hi u check this file core.php compare with ur core file On Mon, Jul 12, 2010 at 1:23 PM, Elavazhagan chidambaram azhagancod...@gmail.com wrote: hi how can i help you? On

Re: trouble with models associations

2010-07-12 Thread duderion
*bump* :( On 8 Jul., 22:18, duderion adrian.g...@googlemail.com wrote: hi guys, i have a (noob) question: i have - product model with the primary key id, a unique key Zupid and so on - fav model with  zupid user_id ... - user model id name ... i want to connect the tables fav and

Re: CSV Helper not rendering on web host, but works on localhost

2010-07-12 Thread LunarDraco
I'd make sure your layout you are using for the csv is being copied out to your web host. If it is missing cake is going to use its default layout which is going to have the headers etc set for html/ text. On Jul 9, 12:23 pm, CapeTownGuy cobus.van.aa...@gmail.com wrote: Hi, I'm using the CSV

Validation messages for Ajax calls

2010-07-12 Thread Jonas
Hello, I am using Ajax calls to save/remove entries from a database. When saving I use validation rules from my Model which works fine (they used to be called by a post submit before). Then I used $form- isFieldError to determine which field caused the error in the validation. But how do I do

Re: Problems with blog tutorial Warning (512): SQL Error: 1064:

2010-07-12 Thread Andy H
Hi, The first line of you edit function has a mistake. should be $this-Post-id = $id; Good luck! On Jul 9, 11:13 pm, BlaineRumsey bla...@blainerumsey.com wrote: Hello,  I am new to cake and I am trying to complete the blog tutorial in the manual for 1.3  for getting started.  I am at the

AES_ENCRYPT

2010-07-12 Thread vanishri
HI, am developing an application using cake php ,in which registartion and login are working fine.am using cakephp's default hash methodology for password encryption. but now i want to do with encryption method AES_ENCRYP for password field during registarion and while logging in. how can i

Re: Cakephp and XAMPP installation nightmare, Can't get cake to understand root

2010-07-12 Thread Max Dörfler
And try registration in the url, not registeration cheers Am 12.07.2010 10:30, schrieb nini: Try http://localhost/cake1.3.2/users/registeration and please read manual. On Jul 12, 1:20 am, Dinu464dineshsu...@gmail.com wrote: 1) XAMPP 1.7.3 setup and workinghttp://localhost/xampp/-

Re: Js helper advice needed

2010-07-12 Thread Jeremy Burns | Class Outfit
Perfect - thanks. Here's a summary of my final changes. After the submit button (using the Js helper): echo $this-Js-writeBuffer(array('inline' = true)); This also means I don't have to give the submit button an id. My login action in the users controller is: function login() {

Last.FM API, DataSource

2010-07-12 Thread Linuus
Hi! I found this today: http://github.com/m3nt0r/last.fm-datasource-for-cakephp and wanted to try it out. I'm very new to CakePHP. I just can't get this datasource to work. I keep getting this error: Fatal error: Call to undefined method HttpSocket::buildUri() in /

Deleted Values Reloas clicking upon browser backbutton

2010-07-12 Thread vanishri
hi, i have done an application in which i have given add,delete and update buttons. when i click delete it deletes the corresponding data from data base. but upon clicking on browser back button it reloding it again even though it does not present in database. Please reply me Check out the new

Re: Validation problem

2010-07-12 Thread McBuck DGAF
Instead of: 'rule' = array('custom' = '^[a-zA-Z]+(([\'\,\.\-][a-zA-Z])?[a-zA-Z]*)*$'), Could you try: 'rule' = '^[a-zA-Z]+(([\'\,\.\-][a-zA-Z])?[a-zA-Z]*)* $', If that works, and you use this regular expression more than once, you could consider implementing a

User registeration and at the same time create a record in Account

2010-07-12 Thread Omid
Hi I am new to cake php and as a practice I am working on one simple project. I have tree model user, account and contact as below. (There is only one form for user registration and no form for add action to account). user model : var $name = 'User'; var $useTable = 'users';

Hello World JS Helper example

2010-07-12 Thread sanedevil
Hi all, I have started to experiment with JS Helper and was very hopeful that the Cake framework will help me avoid a lot of javascript learning via its API. so far i have been struggling (spent the entire weekend! ) gettin a simple hello world example to run :( Can someone pls share a simple

Re: AES_ENCRYPT

2010-07-12 Thread Bharadwaj Parthasarathy
Hi, Cake uses MD5, which is still the standard for most web applications. You can see the method call md5 (grep for md5 and password ) in the register and login functions of the user controller. E.g. $this-data['User']['password'] = md5($this-data['User'] ['password']); if ($results substr

Re: Persisting complex model data at once

2010-07-12 Thread Soniya Ahuja
@Jeremy Burns: thanks for the reply. Actually, the fact that saveAll saves only n+1 data is mentioned in the cook book, but I had somehow missed it(though it was put up in a notice... lousy me). So I had to loop through the data and wrapped this in a transaction. As saveAll doesn't revert

Re: Cakephp and XAMPP installation nightmare, Can't get cake to understand root

2010-07-12 Thread Dinu464
Thanx for the response guys.. unfortunately this still does not work When I render http://localhost/cake1.3.2/users/registeration it throws Fatal error: Class 'User' not found in C:\Users\Dinesh \Documents\Server\xampp\htdocs\cake1.3.2\cake\libs\class_registry.php on line 141 I guess it is

question about subqueries

2010-07-12 Thread breakintheweb
I've been working on a subquery for several hours and can't figure it out in cakephp. I've tried mimicking the example in the book under complex find conditions and couldn't seem to make that work. Here is the query that when run manually in mysql works. The inner query is used to take out the

Re: Another model displayField

2010-07-12 Thread Samueljslg
Thanks Jeremy Burns, I needed to know. Thanks again. On 12 jul, 09:23, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: From within model1s_controller: $this-Model1-Model2-find('list'); This assumes that Model1 and Model2 have $hasMany $belongsTo relationships defined within

Re: AES_ENCRYPT

2010-07-12 Thread euromark
i was almost certain that cake already uses sha1 (= cake1.2 anyway) On 12 Jul., 22:01, Bharadwaj Parthasarathy barbi.br...@gmail.com wrote: Hi, Cake uses MD5, which is still the standard for most web applications. You can see the method call md5 (grep for md5 and password ) in the   register

Re: AES_ENCRYPT

2010-07-12 Thread Bharadwaj Parthasarathy
Euromark is correct and I was wrong. Cake uses Sha1 [remember setting the salt]. the md5 thing was something I wrote. Sorry i did not differentiate between my code and the code that was baked. If I create a simple app, for instance users, with a username, email and password field. Is

Re: consulting associations, post comments users commentaries

2010-07-12 Thread Vinicius Núñez
Sorry for the late, Thanks!!! On 8 jul, 11:49, Shaz shazam...@gmail.com wrote: User hasMany Post User hasMany Comment Post hasMany Comment Post belongsTo User Comment belongsTo Post Comment belongsTo User On Jul 6, 4:43 pm, Vinicius Núñez viniciusnu...@gmail.com wrote: How are you?

Re: Deleted Values Reloas clicking upon browser backbutton

2010-07-12 Thread cricket
The page is being cached by the browser. Look into cache-control headers. On Mon, Jul 12, 2010 at 6:50 AM, vanishri vanishr...@gmail.com wrote: hi, i have done an application in which i have given add,delete and update buttons. when i click delete it deletes the corresponding data from data

Re: User registeration and at the same time create a record in Account

2010-07-12 Thread cricket
On Mon, Jul 12, 2010 at 9:49 AM, Omid omid.za...@gmail.com wrote: Hi I am new to cake php and as a practice I am working on one simple project. I have tree model user, account and contact as below. (There is only one form for user registration and no form for add action to account). user

Re: Hello World JS Helper example

2010-07-12 Thread cricket
On Mon, Jul 12, 2010 at 2:42 PM, sanedevil sanede...@gmail.com wrote: Hi all, I have started to experiment with JS Helper and was very hopeful that the Cake framework will help me avoid a lot of javascript learning via its API. so far i have been struggling (spent the entire weekend! ) gettin

Re: question about subqueries

2010-07-12 Thread cricket
On Mon, Jul 12, 2010 at 6:40 PM, breakintheweb jguagli...@gmail.com wrote: I've been working on a subquery for several hours and can't figure it out in cakephp. I've tried mimicking the example in the book under complex find conditions and couldn't seem to make that work. Here is the query

Re: Nick Baker's FileUpload

2010-07-12 Thread bradmaxs
Hi Nick, Sorry for the lapse but was busy with other projects. The issue is that the file is going to a different folder that has nothing to do with this model or controller or form?? The record is being saved to the DB in the correct table but is getting uploaded to the a directory that is

Re: Hello World JS Helper example

2010-07-12 Thread fredfl...@gmail.com
I found this article about CakePHP and AJAX via google: http://www.reversefolds.com/articles/show/ajax I was able to get this running locally following the instructions on the blog. On Jul 12, 2:42 pm, sanedevil sanede...@gmail.com wrote: Hi all, I have started to experiment with JS Helper

Re: Validation problem

2010-07-12 Thread Felix Fennell
Hi, thanks for the reply - I have updated the validation rules in the model with your suggestion, I get the following errors back for data that should be valid (ie. allowed) == Warning (2): preg_match() [function.preg-match]: No ending delimiter '^' found [CORE/cake/libs/model/model.php, line

Re: Validation problem

2010-07-12 Thread Felix
Hi, thanks for the reply - I have updated the validation rules in the model with your suggestion, I get the following errors back for data that should be valid (ie. allowed) == Warning (2): preg_match() [function.preg-match]: No ending delimiter '^' found [CORE/cake/libs/model/model.php, line

Connecting two tables with diffrent/ special key

2010-07-12 Thread brototyp
Hi guys, I'm pretty new in Cake and I have an issue with connecting two tables. I have a product table (product) with: id (auto increment), zupid (a unique product id key), productname, product_id, product price . and an other table (favs) with: id (auto increment), zupid, user_id,

Re: Nick Baker's FileUpload

2010-07-12 Thread nurvzy
Hi Brad, Well in that $this-data it looks like you're not actually uploading the file. Make sure your form tag includes multipart. $form-create('Model', array('type' = 'file')); In regards to the detach and reattach behavior settings, a small example would be like: function add(){

Re: Validation messages for Ajax calls

2010-07-12 Thread Sam
I do it by having jQuery make a post call when each field is changed- In this case it sends it only does it if the form has a class ajax. The post request includes the field id... I do this to make it simpler to perform the .post callback, although it could be done another way. The post response

Re: Connecting two tables with diffrent/ special key

2010-07-12 Thread Jeremy Burns | Class Outfit
Before spending loads of time on this, wouldn't Product.id and Fav.product_id be the same? Why can't you just join on these fields? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Jul 2010, at 01:56, brototyp wrote: Hi guys, I'm pretty new in Cake and I

Re: User registeration and at the same time create a record in Account

2010-07-12 Thread Walther
Cricket's way isn't the best way to do it in cake. What you should do is make use is the afterSave callback in the user model. function afterSave($created) { if($created ==true) { $data = array('Account' = arrray('user_id' = $this-id)); $this-Account-save($data);

Re: Connecting two tables with diffrent/ special key

2010-07-12 Thread Master Ram...!
this is the example code: to join the tables. And read table Joining. http://book.cakephp.org/view/312/Models. var $hasMany = array( 'Store' = array( 'className' = 'Store', 'foreignKey' = 'division_id',

Re: complicated relation

2010-07-12 Thread Sam
Lets call your table that you need to create conversions, with a Conversion model To relate the a model to the same model twice use the following(for your Conversion model) $belongsTo = array( 'Unit1' = array(className = Unit, foreignKey = unit1_id), 'Unit2' = array(className = Unit, foreignKey =

Re: Cakephp and XAMPP installation nightmare, Can't get cake to understand root

2010-07-12 Thread Walther
The ibm tutorial is quite an advanced tutorial for a first time. Plus I don't think it is compatible with 1.3. Maybe do the blog tutorial in the cake book first and if that works then you can tackle they more advanced stuff. Also when you went to that initial page, was the css loaded? On Jul

Re: Connecting two tables with diffrent/ special key

2010-07-12 Thread Sam
Assuming your favs table produces a Fav model(note, I haven't tested this but it *should* work) In your Fav model... var $belongsTo = array( 'Product' = array( 'className' = 'Product', 'foreignKey'= false, 'conditions'= 'Product.zupid =

Re: cake 1.3.2 wants to be too smart

2010-07-12 Thread Walther
I've never seen that problem before... Cake offers the same functionality, it is well documented in every book. Basically you crater a field called created or updated as a datetime, default null and cake will populate it automatically. On Jul 12, 5:02 pm, Grzegorz Pawlik grzegorzpaw...@gmail.com

Re: Something like ActiveMerchant?

2010-07-12 Thread iamcam (Cameron Perry)
How closely are you following the original ruby version? I'd be interested in helping out here and there once you put it on github (so much better than google). ~Cameron On Jul 9, 4:20 pm, Andreas andreas.kolla...@gmail.com wrote: Hi, I am currently developing a port of Active Merchant on

Re: Something like ActiveMerchant?

2010-07-12 Thread Bharadwaj Parthasarathy
+1 for github I am also interested in participating in development. From a quick google search, there seems to be no similar framework in php. You may want to check this - http://stackoverflow.com/questions/2768942/do-any-projects-exist-for-php-that-is-similar-to-activemerchant-for-ruby -