Re: Excel to mysql

2008-12-04 Thread deepesh
Hi All, Sorry for not not giving any updates on my Excel to mysql problem . Finally successfully implemented Excel to mysql import after a bit tweaks in http://sourceforge.net/projects/phpexcelreader/ nice app but there are a few bugs there which have to be solved . Best regards Dee

Re: How to use Core Helpers in a console/shell script

2008-12-04 Thread RyOnLife
Thanks Adam, but whether I instantiate or not, I get an error: Fatal error: Class 'Helper' not found in /path/to/app/cake/libs/view/helpers/app_helper.php on line 40 Adam Royle wrote: > > > You're halfway there, that includes the class file. Now you just have > to instantiate it: > > $xml

Re: How to use Core Helpers in a console/shell script

2008-12-04 Thread Adam Royle
You're halfway there, that includes the class file. Now you just have to instantiate it: $xml = new XmlHelper(); On Dec 5, 1:45 pm, RyOnLife <[EMAIL PROTECTED]> wrote: > Hello, I am trying to use the Xml Helper in a shell script that will be run > from the console. > > Per thehttp://book.cakeph

How to use Core Helpers in a console/shell script

2008-12-04 Thread RyOnLife
Hello, I am trying to use the Xml Helper in a shell script that will be run from the console. Per the http://book.cakephp.org/view/499/The-App-Class I tried App::import('Helper', 'Xml') without any luck. Without success I also gave the suggestions in http://n2.nabble.com/Load-Helper-in-Console

Re: Behavior can create new records but fails to update.

2008-12-04 Thread Smelly_Eddie
Got it! I discovered that loading the existing values to overwrite was causing the issue. If I just set the ID and only had the 2 fields I change it worked. That points to... Validation! By turning off the validation I am able to save all fields after loading. This works but I dont know the na

Re: Behavior can create new records but fails to update.

2008-12-04 Thread Smelly_Eddie
Thanks, but unfortunately the results are the same. No update query is run. $model->id=$userID; $data=$model->read(); debug($data); //overwrite their password $data['User']['password']='ThisUserViolatedTerms'.date('dm

Re: Problem with Phpcake

2008-12-04 Thread ridwan arifandi
hmmm... i think i had the problem same as with you. i tried by uploading new cakephp engine (zip version) into server, then in cpanel i extracted the file. dont forget to delete old cakephp engine before you upload a new one. sorry for not smart advice :p --~--~-~--~~~--

Re: Behavior can create new records but fails to update.

2008-12-04 Thread ridwan arifandi
try $model->id = $foo['User']['id'] $data = $model->Read(); $data['User']['...'] = ; then save --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@goog

Behavior can create new records but fails to update.

2008-12-04 Thread Smelly_Eddie
I have been going straight with this one for a few hours now and I'm stumped. Usually from a controller you can just call $this->Model->read, and then $this->Model->save to update any values changed inbetween. When I try the same from my Behavior it fails to update the record. If I eliminate th

Custom queries/sql in models/behaviors

2008-12-04 Thread gearvOsh
Ok in my current system (its a gaming league) I have packages. I will use a Team package as an example. In this Team package I have a method getTeamInfo() which calls out to external queries. I do this so I only have to write a query once and can access its results through a method call. I prefer

Re: Blank screen with errors set to 2

2008-12-04 Thread Marcelo Andrade
On Thu, Dec 4, 2008 at 7:38 AM, bartez <[EMAIL PROTECTED]> wrote: > > Hey all, > I am having issues with blank screens even with debug set to 2. > localhost/admin works but / does not. > Before I post any code, has anyone come across this problem before? If you're uploading your files to a server

Re: Sanitize::html replacing newlines with literal \n

2008-12-04 Thread RyOnLife
Thanks. Strange that your newlines were double backslashed. Your post put me on the right track. I am using pre tags in my markup and didn't want to have to go through all of my controllers looking for each instance of Sanitize::clean, so I now have this as line 236 in sanitize.php: $data = str_

Re: Sanitize::html replacing newlines with literal \n

2008-12-04 Thread Mathew
If you read my post further up from today. I already posted the source code that resolves your problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@go

Re: Sanitize::html replacing newlines with literal \n

2008-12-04 Thread RyOnLife
My bad. You're right. I just realized that I while I thought commenting that line out in sanitize.php did the trick, it actually worked because I'd commented out the call to Sanitize::clean() in my controller. So it's not Sanitize::html() that's the problem. Looks like I am back to square one...

Re: Sanitize::html replacing newlines with literal \n

2008-12-04 Thread Mathew
That function is not called from Sanitize::html() --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send e

Re: Sanitize::html replacing newlines with literal \n

2008-12-04 Thread RyOnLife
1.2 RC3 cake/libs/sanitize.php line 147 mathew-2 wrote: > > > What version of Cake are you using? > > > > -- View this message in context: http://n2.nabble.com/Sanitize%3A%3Ahtml-replacing-newlines-with-literal-%5Cn-tp1608411p1614961.html Sent from the CakePHP mailing list archive at Na

Re: Sanitize::html replacing newlines with literal \n

2008-12-04 Thread Mathew
What version of Cake are you using? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL

Re: Sanitize::html replacing newlines with literal \n

2008-12-04 Thread RyOnLife
@Matthew: Yes it does. I commented it out and it fixed the problem. -- View this message in context: http://n2.nabble.com/Sanitize%3A%3Ahtml-replacing-newlines-with-literal-%5Cn-tp1608411p1614924.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~--

Re: Sqlite3

2008-12-04 Thread lightglitch
The driver can't handle queries with '*'. Like "SELECT * FROM users AS User" OR "SELECT User.* FROM users AS User". I found this when I was using the translate behavior. I still couldn't find the best way solve it. If some one have some ideas they are welcome. --~--~-~--~~-

Re: How should I associate these tables?

2008-12-04 Thread Antônio Marco
No, I can't move all my tables to same schema. But thanks anyway. On 25 nov, 13:35, teknoid <[EMAIL PROTECTED]> wrote: > I assume in that case you'll need to create a model for your join > table (which is otherwise created for you)... > and specify which schema (db) it uses. > Otherwise, if you

Re: Problem with Phpcake

2008-12-04 Thread Stuart
Nevermind. I wasn't paying attention to the error message. In my case it seems that the CakeErrorController class is throwing the error because it can't extend AppController. I don't think it has anything to do with the AppController class in the application. It might have to do with the App::impo

Re: Problem with Phpcake

2008-12-04 Thread Stuart
I'm afraid I can't help you because I'm having the same problem. It appears to me that cake is looking for the AppController class in the cake core and ignoring the app_controller.php file I have in app/ (Fatal error: Class 'AppController' not found in /usr5/local/lib/ cake_core/cake/libs/error.ph

Re: Blank screen with errors set to 2

2008-12-04 Thread brian
Have you looked at the server's error log? On Thu, Dec 4, 2008 at 5:38 AM, bartez <[EMAIL PROTECTED]> wrote: > > Hey all, > > I am having issues with blank screens even with debug set to 2. > > localhost/admin works but / does not. > > Before I post any code, has anyone come across this problem b

Issue with delete function.

2008-12-04 Thread olamma
Hi all, im new to cakephp and built a basic content manage system with it. Now for some reason i seem to have a weird bug with my delete function in the administration. I can manage products with the system i have. And the products have galleries attached to them that hold images. Now what happen

Re: session lost when switching from http to https, vice versa, in cakephp rc3

2008-12-04 Thread Mathew
Hi Robert, I've never done what you have done, but I'm sure it's possible because most people do shopping carts this way. The problem might be that Cake is switching to secure cookies when it finds the current URL is using HTTPS. The cookie is used to store the session ID and when the switch to

Re: Database table/column naming scheme

2008-12-04 Thread Rob
I haven't tried it, but Cake does let you override everything, so it should be possible by setting the right vars. In your model, you should be able to do: $useTable('blogEntries'); See: http://book.cakephp.org/view/436/useTable I've personally used the primaryKey to change my ID column from '

Re: Adding https in $html->url

2008-12-04 Thread Mathew
Hi Jipson, I'm not sure exactly but I think you can define the protocol to the router in cake like this. url(array('base'=>'https://','url'=>'/carts/authorize'));?> You can also do this with cake controllers. url(array ('base'=>'https://','controller'=>'carts','action'=>authorize'))?> I think

Re: Login function redirecting users even though they supplied invalid credentials

2008-12-04 Thread Rob
I'm not following how somebody would ever log in again without logging out first. My login code looks like: /** * Login function - this is where we do the login ... */ function login() { if ($this->Auth->user()) { $auth_user = $this->Auth->user();

Re: Sanitize::html replacing newlines with literal \n

2008-12-04 Thread Mathew
Sanitize::html does not call stripWhitespace(). Sanitize::html replaces special characters with html escaped characters, but I believe it leaves \n alone since the backslash does not need escaping in html. I am able to sanitize my data while retaining the new line character. The only problem I'v

Re: Change database and host from the Controller

2008-12-04 Thread Smelly_Eddie
Assuming your database.php has the $default connection set, you can just replace the details on the fly DATABASE_CONFIG::default = array(); At least I think that would word since its all static. You might need to import first though I dont think so. On Dec 3, 3:09 pm, Henrik Gemal <[EMAIL PROT

Re: Suggest a better brilliant tutorial for implementing ACL with Auth in Cakephp

2008-12-04 Thread Rob
Same here, what problem are you having with the tutorial ? On Dec 4, 6:12 am, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > >  Can anyone Suggest a better brilliant tutorial for implementing ACL > >  with Auth in Cakephp. > > I followedhttp://book.cakephp.org/view/641/Simple-Acl-controlled-Applicati

Re: HABTM confusion was: How to add item using HABTM relation

2008-12-04 Thread Rob
Because the HABTM relationship causes Cake to do its' magic, you have to build the structure with all of the associated data you want to save. That article is showing you a behavior that will help you do that more easily, by giving you methods to do so. If you set debug to 3, you'll see the SQL

Re: Suggest a better brilliant tutorial for implementing ACL with Auth in Cakephp

2008-12-04 Thread Jon Bennett
> Can anyone Suggest a better brilliant tutorial for implementing ACL > with Auth in Cakephp. I followed http://book.cakephp.org/view/641/Simple-Acl-controlled-Application and now have acl+auth running perfecto. hth jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype:

Re: cakephp with jquery not with prototype

2008-12-04 Thread Josey
No, unfortunately it is written for prototype On Dec 4, 4:59 am, Dérico Filho <[EMAIL PROTECTED]> wrote: > Is Cake's Ajax Helper compatible with JQuery? > > On Dec 3, 6:09 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote: > > > 1) enable the javascript helper > > 2) add $javascript->link('jquery-12.6

Need help with model class extensions + behavior

2008-12-04 Thread Ernesto
Hello app\App_Model.php app\models\behaviors\My.php app\models\Track.php i'm looking for a smart way to - execute the AppModel's beforeSave() then - execute the TrackModel's beforeSave() and last - execute the MyBehavior's beforeSave() i tried with parent::beforeSave() but i can't get it t

Re: deep e-mail and zip code validation seem to be quirky

2008-12-04 Thread Adam Royle
I experienced a similar problem with deep email validation. I sorted my problem out by overriding the email validation and calling checkdnsrr() instead of gethostbynamel() which is what cake uses. The problem was due to the domain only having an MX record and no A record, so gethostbynamel() retu

Re: Adding https in $html->url

2008-12-04 Thread Jipson
Hi I am using $html->url instead of $html->link because, I have to link to an image... On Dec 4, 6:30 pm, Lance Willett <[EMAIL PROTECTED]> wrote: > > i want to get ishttps://mycart/carts/authorize/, what i have to do for it > > Hi Jipson, > Most likely you'll need to include the full path to

Re: Adding https in $html->url

2008-12-04 Thread Lance Willett
> i want to get ishttps://mycart/carts/authorize/, what i have to do for it Hi Jipson, Most likely you'll need to include the full path to the secure URL, like this: url('https://mycart/carts/authorize/); ?> in order to force the HTTPS protocol. Out of curiosity, why are you using $html->url

Re: Self contained css in Cake's default app

2008-12-04 Thread Lance Willett
> I think that with new apps that's not an issue but if you have to merge it > with some kind of legacy code then you will have to override each and every > one of those entities styles. I believe that the generic stylesheet that ships with Cake by default is just that, a generic default styleshe

Re: Form fields after bad submit

2008-12-04 Thread krishna
I think the $this->data is getting null after the submission. Check the $this->data. Regards, Krishnan Nair = Cake Bake --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to

Re: Form manipulation

2008-12-04 Thread krishna
Hi, follow this code, if(!empty($this->data)){ $this->data['User']['user_id'] = $this->Auth->user('id'); $this->data['User']['current_date'] = date('Y-m-d'); $this->User->save($this->data); } === for get the db driven select box, use the find syntax with list attribute. ex: $this->User->find

Custom Query Pagination

2008-12-04 Thread si-mon
Hi all, I have used a custom query with group by in pagination. I got the the grouped output, but the record count is different (i.e. I am getting the record-count as the total number of records without grouping). The format I have used for pagination is: $this->paginate['Model'] = array( 'co

Re: Form fields after bad submit

2008-12-04 Thread Al
Thanks Adam, I forgot to reply back with my success. I ended up rebaking the view and things were fine after that. I can't remember what I had messed up with my coding, but hopefully this will help another noob. al On Nov 2, 3:23 am, Adam Royle <[EMAIL PROTECTED]> wrote: > Make sure you post bac

Re: horizontal checkbox layout

2008-12-04 Thread Al
Thanks for the help Anja, I'll try it out today. On Dec 4, 3:54 am, "Liebermann, Anja Carolin" <[EMAIL PROTECTED]> wrote: > Hi Al, > > Just a wild guess, I haven't tested it: > Cakephp puts form elements in a div which is a block element. So you have to > define a class which you add to the arra

HABTM confusion was: How to add item using HABTM relation

2008-12-04 Thread Zeugme
Hi Rob and thanks, I did already what you show but the issue was on client side, I found the solution : name the HTML element with data[Person][Person][0] on a contract creation form witch is really not intuitive ! Now back the controller I have to delete a contract. I read here http://baker

deep e-mail and zip code validation seem to be quirky

2008-12-04 Thread kai
On my website we have lots of listings, like a directory, and many of them include e-mails. Sometimes the deep e-mail validation will reject an e-mail that we know is legit. I've had it reject an e-mail address and then I went on to send mail to that e-mail address successfully. An example of an e

Re: cakephp with jquery not with prototype

2008-12-04 Thread Dérico Filho
Is Cake's Ajax Helper compatible with JQuery? On Dec 3, 6:09 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote: > 1) enable the javascript helper > 2) add $javascript->link('jquery-12.6') to your layouts/default.ctp  - also > put jquery1.2.6 in webroot/js > > you can pass an array of files to the java

Re: basics.php in CakePHP

2008-12-04 Thread Gonzalo Servat
On Thu, Dec 4, 2008 at 7:48 AM, krishna <[EMAIL PROTECTED]>wrote: > > Hi Cake Bakers, > > I happen to see the basics.php in CakePHP. Found some interesting and > very useful functions. Want to place a small note on it. > > 1. Basic units of time defined. > 2. Functions related to array manipulatio

Blank screen with errors set to 2

2008-12-04 Thread bartez
Hey all, I am having issues with blank screens even with debug set to 2. localhost/admin works but / does not. Before I post any code, has anyone come across this problem before? Many thanks Alex --~--~-~--~~~---~--~~ You received this message because you are s

Form manipulation

2008-12-04 Thread ravi4shek...@gmail.com
Hi All, I am new to cakephp framework I am facing a problem I have some fields in my form and when the data is posted by the user apart from that I also need to store "users id" which is stored in session and the "current date". since these two fields I have not kept in the form controller is n

basics.php in CakePHP

2008-12-04 Thread krishna
Hi Cake Bakers, I happen to see the basics.php in CakePHP. Found some interesting and very useful functions. Want to place a small note on it. 1. Basic units of time defined. 2. Functions related to array manipulations. 3. Functions related to string manipulations. Can u use these functions ins

Re: Shell not working through Cron

2008-12-04 Thread tekomp
Adding: "PATH=$PATH:/usr/local/bin" to /cake/console/cake took care of everything. Thanks for your help :) On Dec 2, 5:57 am, Matt Curry <[EMAIL PROTECTED]> wrote: > To fix the TERM error wrap the cron job in a shell script with: > TERM=linux > export TERM > > I think you can also set the path

Suggest a better brilliant tutorial for implementing ACL with Auth in Cakephp

2008-12-04 Thread krishna
Hi Cake Bakers, Can anyone Suggest a better brilliant tutorial for implementing ACL with Auth in Cakephp. Regards, Krishnan Nair. Cake Bake --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake

Re: Login function redirecting users even though they supplied invalid credentials

2008-12-04 Thread krishna
I got 2 suggestions for this issue. 1. Set the session security level to high, so that the session clears away after some time, even though the user does not logs off. 2. Or else, set a redirect code in login method in users controller to redirect the logged in user(by checking auth user array) t

AW: horizontal checkbox layout

2008-12-04 Thread Liebermann, Anja Carolin
Hi Al, Just a wild guess, I haven't tested it: Cakephp puts form elements in a div which is a block element. So you have to define a class which you add to the array of your $form->input, which defines them as a inline element. echo $form->input('name',array('type'=>'checkbox', 'class' => 'iam

Database table/column naming scheme

2008-12-04 Thread gearvOsh
So I was recently reading the documentation and it said that a database's tables and columns must be separated with underscores instead of camel case. Is there no way to do it camel case? Correct: blog_entries Wrong: blogEntries Thanks again. --~--~-~--~~~---~--~

Login function redirecting users even though they supplied invalid credentials

2008-12-04 Thread Garrett
Please read the "Explanation" below before answering this question Question Using the AuthComponent how can I accurately determine if a login attempt was successful inside of my "login()" function? Explanation The manual (http://book.cakephp.org/view/395/autoRedirect) stat

Re: dbo_oracle.php: $config variable

2008-12-04 Thread Amran
Hi, I've also found this interesting. I think the var $config is overiding the parent config and making config setting empty. If you commented this var $config, the setting exist. I didn't check the details yet. I think you can submit it to bug database. Anyone here have the same problem ?

horizontal checkbox layout

2008-12-04 Thread Al
I hope someone can help, I'm trying to make multiple select checkboxes go horizontal instead of vertical. I use this in my view, which results in a 5-selection set of checkboxes. echo $form->input('Semester', array('type'=> 'checkbox', 'multiple'=>'checkbox')); I can use it just fine, it update

Change database and host from the Controller

2008-12-04 Thread Henrik Gemal
I need to change the host and the database from the controller. The controller will read some config vars in the local database and the then needs to connect to the host and database specified in the config vars. These config vars changes all the time. So how do I dynamically change the database