Re: [Cakephp 2.8.1] Multiple assosication to one model with habtm throws a notice

2016-03-14 Thread John Andersen
Check your model names in the HABTM relationships. Looks like you have a mix of singular and plural. Enjoy, John On Monday, 14 March 2016 05:33:36 UTC+2, Steffen Reinig wrote: > > Hello Cakephp Fans, > > today i receive these error: > > Notice (8): Undefined index: User [CORE\Cake\Model\Datasour

Re: Remove first from collections

2016-02-29 Thread John Andersen
I deletion is not possible, would the skip method work for you? *http://book.cakephp.org/3.0/en/core-libraries/collections.html#Cake\Collection\Collection::skip* Enjoy, John On Thursday, 25 February 2016 16:56:27 UTC+2, Rafael Santos wrote: > > Hi, > i'm using CakePHP's Collections >

Re: $this->render('index');

2016-02-08 Thread John Andersen
Is that the whole search method in your controller? If yes, then the render call is inside the if statement at the beginning and will thus not be invoked due to the return statement just after the if statement. Enjoy, John On Saturday, 30 January 2016 06:32:22 UTC+2, Maxwell Ochieng wrote: > >

Re: Error in Database Connection BUT dabase.php is correct

2016-02-08 Thread John Andersen
Check that your user "user" has permissions to use the databases. Enjoy, John On Sunday, 7 February 2016 18:48:33 UTC+2, Douglas Diniz Landim wrote: > > It was a site that was running on a host. > > This accommodation accidentally got deleted the domain for the site. > > After restoring the area,

Re: CAKE PHP TUTORIAL FOR BEGINNERS

2016-02-08 Thread John Andersen
Hi Priyatam Saha Which version of CakePHP have you downloaded and installed? Which tutorial have you followed? Enjoy, John On Sunday, 7 February 2016 18:48:33 UTC+2, priyatam saha wrote: > > Dear sir, >I am a new commer to cakephp.I have download and installed cakephp.Now > I create a app

Re: CakehasM 3 hasMany -> always empty

2016-01-07 Thread John Andersen
Hi Bogdan Is the below correct? To me it does not seem correct :) $this->belongsTo('Contract', [ 'className' => 'Tranquillity.Contract', Enjoy, John On Thursday, 7 January 2016 13:01:30 UTC+2, Bogdan Soos wrote: > > Hi there, > > I am having a problem with hasMany. > Here is my ca

Re: Route is overwriting routes of same controller

2016-01-03 Thread John Andersen
Your route definition will direct all URL starting with /catalogs/ to be directed to your catalog_groups controller. Thus if you also have a catalogs controller, then no URL will reach that controller. Note that the URL you are redirecting to the catalog_groups controller, does not need to star

Re: Help with Cakephp 2.x pagination

2015-12-28 Thread John Andersen
As Matthew wrote, use the Neighbor function. See the CakePHP book in this page: http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#find-neighbors Enjoy, John On Tuesday, 29 December 2015 00:54:37 UTC+2, Clement Crownrise wrote: > > Thanks for your response, but please what is the ne

Re: Access development server from another (local) computer

2015-12-22 Thread John Andersen
That question is not really related to CakePHP. Depending on your setup, you will have to open the firewall on the computer, where you have your site running. You will probably also have to configure your webserver (apache, nginx, etc.) to accept connections from other IP addresses than localho

Re: Adding a non incremental primary key

2015-11-20 Thread John Andersen
Does your product code contain meanings, ie. part of the product code symbolized something specific? If so, I would just go with a normal auto-incrementing primary key and just make the product code a unique column in the table. Enjoy, John On Friday, 20 November 2015 13:53:12 UTC+2, Jireh Pad

Re: can you help me how to create highcharts in cakephp

2015-11-20 Thread John Andersen
What have you done yourself? How far have you gone? What errors are you having? Enjoy, John On Friday, 20 November 2015 13:53:41 UTC+2, Deepak Mishra wrote: > > can you help me how to create highcharts in cakephp plz help me > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on

Re: CakePHP is NOT able to connect to the database.

2015-11-20 Thread John Andersen
Have you verified your credentials? Do they work for connecting to the database outside of CakePHP? Is your database configuration setup correctly? Kindly enlighten us :) John On Friday, 20 November 2015 13:53:12 UTC+2, pavan ganvani wrote: > > > -- Like Us on FaceBook https://www.facebook.com/

Re: belongsToMany issue

2015-10-26 Thread John Andersen
Is your Achievements class an extension of the Table class? I did not see that in your original post. Enjoy, John On Monday, 26 October 2015 19:39:21 UTC+2, lorenzoshake wrote: > > > > Il giorno lunedì 26 ottobre 2015 18:19:01 UTC+1, John Andersen ha scritto: >> >> Check

Re: belongsToMany issue

2015-10-26 Thread John Andersen
Check your model associations - is any of them relying on CakePHP identifying the keys? Check your queries - is any of them specifying the offending column? Enjoy, John On Monday, 26 October 2015 18:44:29 UTC+2, lorenzoshake wrote: > > i 've a strange assoc problem: > > class Achievements > { >

Re: Cakephp Inline Editing

2015-10-23 Thread John Andersen
In your code you are already using $stop as an array: $this->set('stop',$stop['Leave']['event_stop_time']); so when you try to calculate the $hours, then you have an array - a value :) Try and fix that! Enjoy, John On Friday, 23 October 2015 12:43:47 UTC+3, Para K wrote: > > I'm working

Re: Inserting different data into each row using Hash (or some other way to do what I need!) [CakePHP 2.7.X]

2015-10-12 Thread John Andersen
> Definitely a case of RTFM, though I think I had looked at that very early > on in the learning process and not got my head round it. Whereas now it > seems really rather simple and straightforward. > > Thank you John! > > > On Tuesday, 6 October 2015 19:02:25 UTC+1, John

Re: CakePHP 3 Auth with two tables (models)

2015-10-07 Thread John Andersen
Make both your admins and applicants users, ie. in the users table. Use an additional table to keep information about users (applicants). Assign roles to your users, to indicate whether they are admins or applications. This can be done by having the role defined as a field in the users table or

Re: Inserting different data into each row using Hash (or some other way to do what I need!) [CakePHP 2.7.X]

2015-10-06 Thread John Andersen
You have not provided any information on how the Request and User are related in your models. Request belongsTo Provider(User) Request belongsTo School(User) Provider(User) hasMany Request School(User) hasMany Request Those two relationships can be defined in the models. Have you done so? See M

Re: Query showing all data

2015-10-02 Thread John Andersen
Do you still have this issue? What have you tried to do to solve it? - try the SQL statement in phpMyAdmin directly using a know value for "eireceiver"! - try replacing '$matriid' with a known value, ie. that you know is in the database! Kindly inform us of the result :) Enjoy, John On Thursda

Re: CakePHP 3.1: Login with Username or Email?

2015-09-25 Thread John Andersen
Goodle it: http://stackoverflow.com/questions/30648852/login-with-username-or-email-with-cakephp-3 On Friday, 25 September 2015 22:07:19 UTC+3, Salines wrote: > > Can any of the core CakePHP developers explain to us in what manner we can > perform user authentication with username or email plus p

Re: Não estou conseguindo usar o plugin CakePtbr para pluralização

2015-09-23 Thread John Andersen
Check the name of the plugin everywhere!! CakePrbr or CakePtbr or ??? Enjoy, John On Wednesday, 23 September 2015 14:06:20 UTC+3, Andre Luis Sa wrote: > > Estou usando o cakephp 3.0 e venho tentando utilizar o plugin CakePtbr > para corrigir a pluralização e fazer a tradução. > > Segui a instru

Re: get Data from db in index.php

2015-09-22 Thread John Andersen
Hi Lakshmana What version of CakePHP are you using? Have you looked in the CakePHP book? Kind regards John On Tuesday, 22 September 2015 10:23:50 UTC+3, Lakshmana Katragadda wrote: > > hi guys > > i am new to CakePHP.how to get data from db to select box in index.php . > and where should

Re: Check user status fails

2015-08-24 Thread John Andersen
Did you find a solution to your status problem? If not, please provide more information - like when are you testing for the status value? During login or? Are you testing with a user that you know has the expected status in the database? Does the website show the same value? Enjoy, John On Thu

Re: CakePHP 1.3 Shell can't find AppModel class

2015-07-29 Thread John Andersen
This was solved in Stack Overflow. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from

Re: Check tax code (fiscal code) when insert a user

2015-07-13 Thread John Andersen
If you are storing the fiscal code in a database, make the column unique and then the database will inform you if you are trying to insert a fiscal code that already exists. Enjoy, John On Tuesday, 30 June 2015 21:27:38 UTC+3, Andrea Manca wrote: > > Hi all, > > i'm new to cakephp and i use the

Re: XML output

2015-07-13 Thread John Andersen
Take a look in the CakePHP book 2.x at this location http://book.cakephp.org/2.0/en/views/json-and-xml-views.html#using-a-data-view-with-view-files The solution is written in the "class XmlView" section :) Enjoy, John On Tuesday, 30 June 2015 16:43:25 UTC+3, Juan Ezquerro LLanes wrote: > > I'm

Re: Assets via IP working but not with domain

2015-07-13 Thread John Andersen
Hi Sven Have you fixed your issue? In case you have, what was the solution? In the case you haven't - when you access it via IP how exactly are you doing that? http://-ip address- or something else? How are you trying to access it using the URL? Enjoy, John On Tuesday, 30 June 2015 12:12:21 U

Re: One Webroot Multiple Apps

2015-05-21 Thread John Andersen
and no, no others will access the shared webroot > > On Wednesday, May 20, 2015 at 1:14:58 PM UTC-5, John Andersen wrote: >> >> Are the customers and administrators being identified before they can >> access their respective sites? >> >> Are there any other acto

Re: One Webroot Multiple Apps

2015-05-20 Thread John Andersen
Are the customers and administrators being identified before they can access their respective sites? Are there any other actors that may access the sites without being identified? Enjoy, John On Wednesday, 20 May 2015 19:23:09 UTC+3, April DeRossett wrote: > > I have found many discussions on

Re: Iimplement ACL plugin in cakephp 3

2015-05-04 Thread John Andersen
Please provide more information on what you have tried and what are the issues you are facing! Do you understand about creating a plugin in CakePHP 3? Have you an understanding of ACL? How far are you with the plugin and where are you stuck? Enjoy, John On Monday, 4 May 2015 10:58:46 UTC+3, Su

Re: Cakephp 3.x Validation Error issue

2015-04-23 Thread John Andersen
Please provide more information and also real life examples of your form code, so that we may better be able to help. Have you studied the CakePHP book? What have you tried? What does not work? Do you get any error messages? Please show the validation code you have tried, the code for the form a

Re: $uses load just the first parameter

2015-04-19 Thread John Andersen
Please provide more information on what you are doing and which CakePHP version you are using. How are you reading the data from the models? Show us the code. Have you studied the CakePHP book for advice? Read up on how the retrieve data from the model. Enjoy, John On Friday, 17 April 2015 20

Re: [Cake 2.6.3] Cake's FileUpload Validation not working; what is wrong?

2015-04-13 Thread John Andersen
The validation in your model points to a field named "image", but the view you have points to a field named "submittedFile" :) Which is the correct one? Enjoy, John On Monday, 13 April 2015 11:17:13 UTC+3, Willem wrote: > > I have a model "Attachment" which Belongs to another model (hasMany > At

Re: Export CSV with CakePHP

2015-04-08 Thread John Andersen
This looks suspicious to me url:webroot('leads/Leads/export'), Should it not be only /leads/export in order to reach your controller method? Enjoy, John On Monday, 6 April 2015 21:08:10 UTC+3, michel martins wrote: > > Hi people! > > Well, recently I started working with cakephp and I have a

Re: Retrieving data from different models on passing different parameters in cakephp for advance search feature

2015-04-04 Thread John Andersen
Please provide more details on what you are trying to do! Guessing - Is this what you are asking about? You have a database with several tables and you want to search any field in any table for the parameters and return the id (or more info) of the rows in which the parameters are found. Enjoy,

Re: How can run cakephp inside a cakephp

2015-03-03 Thread John Andersen
Why would you like to do that? What is the purpose? Place them as: root + Cake1 + Cake2 + App1 using Cake1 + App2 using Cake1 + App3 using Cake2 ... etc. That at least is how I would have them installed if I had two CakePHP versions to use. Any other having different ideas? Enjoy, John On T

Re: OnChange event wont work in cakephp

2015-02-27 Thread John Andersen
The onChange event is happening in the browser, so is not really related to CakePHP. Please show the how code for the page, when it has been rendered in the browser. This may help us and you to understand what may have gone wrong with your code. Enjoy, John On Friday, 27 February 2015 16:06:5

Re: CakePHP 2.0 authentication(login) without ctp files but other types

2015-02-11 Thread John Andersen
Ah, I see your problem :) Please ensure that your users table has at least these columns: id, username, password The id column is just the primary key for the table and CakePHP uses the id to identify records in the table. Auth will use the username and password columns to identify the user who

Re: How to default my site to cakephp app

2015-02-10 Thread John Andersen
Pointer - check the Routes section of the CakePHP book - that should help you on the way to find a solution: http://book.cakephp.org/2.0/en/getting-started.html#routes Enjoy, John On Tuesday, 10 February 2015 03:23:36 UTC+2, alfons...@hotmail.com wrote: > > Hello, > I am starting with CakePHP 2.

Re: empty controller/component directory

2015-02-09 Thread John Andersen
Check your CakePHP 2.x for the BlowfishPasswordHasher. It should be located in the path: /lib/Cake/Controller/Component/Auth At least that is where I found it in CakePHP 2.6. Enjoy, John On Sunday, 8 February 2015 21:21:59 UTC+2, vampke wrote: > > Hi, > > I just started with this excellent tool

Re: Correct model associations

2015-02-09 Thread John Andersen
Assuming you are using CakePHP 2.x It is a good idea to define a primary key in your HABTM table - in the books_users table (name should be alphabetic order, but you can deviate). Thus your table definition is: books_users id, book_id, user_id What is your comment table reflecting? 1) comments

Re: CakePHP 2.6 Controllers with New Folder Structure

2015-02-05 Thread John Andersen
roducts' . DS))); and so on. That should set it up with the full path as the book says it needs. Please try and report back :) Enjoy, John On 5 February 2015 at 21:15, Shiv Modi > wrote: Hi John, I tried that one as well but not getting desired results. Regards, Shiv On Thursday, 5

Re: CakePHP 2.6 Controllers with New Folder Structure

2015-02-05 Thread John Andersen
You are trying to create an array that contains two entries with the same index - only the last entry with the same index will be used. Change your array to look like this - showing only the Model entry as an example: 'Model' => array('/Model/', '/Model/Customers/', '/Model/Products/'), Do the

Re: Cakephp 3.0 upgrade from 1.3 where to begin??

2015-02-04 Thread John Andersen
Migrate your 1.3 into a 2.x first, using the migration guides, that you can find in the CakePHP book 2.x under appendices. http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html - as a starting point. When you are there, you can checkout the migration guide for CakePHP 3.x http://boo

Re: How to validate if associated Model exists when saving

2015-01-27 Thread John Andersen
In addition - should the UI not ensure that you choose a Customer or has a customer already chosen before you start an Order? Enjoy, John On Tuesday, 27 January 2015 06:05:26 UTC+2, JP wrote: > > Suppose I have an 'Order' model associated with the 'Customer' model. > > class Order { >var $bel

Re: How to validate if associated Model exists when saving

2015-01-27 Thread John Andersen
In my opinion, that should be caught by the database, so CakePHP just need to catch that and inform you back. Is that actually implemented in CakePHP? Which version of CakePHP are you running? Enjoy, John On Tuesday, 27 January 2015 06:05:26 UTC+2, JP wrote: > > Suppose I have an 'Order' model

Re: cant send email with this provider

2015-01-26 Thread John Andersen
Please ensure that you are using the settings that applies to your mail provider. Enjoy, John On Monday, 26 January 2015 16:01:46 UTC+2, ajt wrote: > > Hi, > > My email code for cakephp worked fine when I used gmail but not for this > provider below. > I am not sure what to do as I have all the

Re: CakePHP 2.0 authentication(login) without ctp files but other types

2015-01-15 Thread John Andersen
> Besides users, lots of tests are able to be tested just by searching but > not creating new record for those purposes. > > Thanks, tech_me > > > On Thursday, January 15, 2015 at 5:15:16 AM UTC+9, John Andersen wrote: >> >> Use the password hasher to hash your

Re: CakePHP 2.0 authentication(login) without ctp files but other types

2015-01-14 Thread John Andersen
Use the password hasher to hash your password, then save it instead of "123" and it should work. See the CakePHP book at this location for the password hasher: http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#hashing-passwords Enjoy, John On Sunday, 11 January 2015 1

Re: Can't seem to get simple HABTM to save...

2015-01-11 Thread John Andersen
Hi Jake Does your events_posts table have a primary key, that is a column named id used for the primary key? If not, then please add such and try again :) Enjoy, John On Sunday, 11 January 2015 16:45:30 UTC+2, Jake Newsom wrote: > > So I have 2 models, Posts and Events. > > Model Post.php looks

Re: belongsTo custom condition not working

2015-01-08 Thread John Andersen
Hi Matt Before I even consider the complexity that you have designed, I would like to know why you are not just simplifying it. Your person_follows table usage for relationships between people and followers and organizations and followers just makes it so harder to work with it. Do it the CakeP

Re: belongsTo custom condition not working

2015-01-08 Thread John Andersen
Just an addition to my previous post Take a look at the Containable behaviour in the CakePHP book here: http://book.cakephp.org/2.0/en/core-libraries/behaviors/containable.html Understand it and then use it - it will make your life so much simpler when you later need to retrieve data. Enjoy, Joh

Re: belongsTo custom condition not working

2015-01-08 Thread John Andersen
16, 2014 at 9:41 AM, Matt Myers wrote: > > Thanks John! This looks great. I'll give it a try. > > -- > Matt > > > On Wednesday, October 15, 2014 12:35:40 PM UTC-6, John Andersen wrote: > > Hi Matt > > Created a test setup and got the result you wanted by d

Re: CakePHP routes always pointing to same action

2015-01-07 Thread John Andersen
Amendment! If you really have a slug in the second URL, then please amend the routing to: Router::connect('/article/slug-post/:slug', ... rest of your definition...); Enjoy, John On Wednesday, 7 January 2015 21:13:12 UTC+2, John Andersen wrote: > > Both your route configuration

Re: CakePHP routes always pointing to same action

2015-01-07 Thread John Andersen
Both your route configurations points to that the URL "/article" follows by a parameter, so in your case only the first is used. Change them as follows: Router::connect('/article/show_by_day', ...rest of your definition ...); Router::connect('/article/slug-post', ...rest of your definition...);

Re: cakephp-3.0.0-beta3 Fatal error: Class 'Locale' not found in \cakephp-3.0.0-beta3\vendor\cakephp\cakephp\src\I18n\I18n.php on line 229

2015-01-02 Thread John Andersen
I see you got the answer in another thread, so ignore my previous post :) Enjoy, John -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscr

Re: cakephp-3.0.0-beta3 Fatal error: Class 'Locale' not found in \cakephp-3.0.0-beta3\vendor\cakephp\cakephp\src\I18n\I18n.php on line 229

2015-01-02 Thread John Andersen
Please provide more information. How did you install and setup CakePHP 3.0.0-beta3? What does your folder structure look like? Where is the webroot folder located? Did you setup your webserver to point the documentroot at the webroot? The reason I ask, is that I just downloaded CakePHP 3.0.0-b

Re: 1.3 Migration Question re:NULL and Defaults

2014-12-30 Thread John Andersen
You could probably use the BeforeSave method to modify the values, so as to replace 'NULL' with null or remove the field entirely in the array. Enjoy, John [snip] -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message

Re: 1.3 Migration Question re:NULL and Defaults

2014-12-30 Thread John Andersen
I just checked MySQL and it does fail when I try to insert a NULL into a Non-Null column. So it is only when there is no value for the column that MySQL will use the default value instead. So when CakePHP uses NULL for that column, MySQL will fail the insert operation. How does the save stateme

Re: 1.3 Migration Question re:NULL and Defaults

2014-12-30 Thread John Andersen
Can I assume that you are working on a copy of the original database? If so, please verify that a default value is specified for that column. Kindly provide us with the definition of it. It is quite alright for CakePHP to provide a NULL for the column on an insert, MySql should then set the val

Re: CakePHP 2.5.*- Find all posts by current month and day (m-d)

2014-12-29 Thread John Andersen
It does work in MySQL though, so it should work in CakePHP also :) Enjoy, John On Monday, 29 December 2014 14:42:38 UTC+2, John Andersen wrote: > > Assuming I understand it correctly, then you want to query your posts, so > that any event_date having a month = 12 and a day = 29, not ta

Re: CakePHP 2.5.*- Find all posts by current month and day (m-d)

2014-12-29 Thread John Andersen
Assuming I understand it correctly, then you want to query your posts, so that any event_date having a month = 12 and a day = 29, not taking into account the year, must be found. :) Based on the above I would see if this is possible: $this->Post->find('all', array('conditions' => array( 'MONT

Re: cant send email

2014-12-28 Thread John Andersen
Remove 'Email' from your components list and try again. Kindly inform us of the result. Enjoy, John On Monday, 29 December 2014 09:27:35 UTC+2, ajt wrote: > > > > I cant send an email as I get a generic error > *Error: * An Internal Error Has Occurred. > > In config\email.php I have this for a

Re: CakePHP 2.5.*- Find all posts by current month and day (m-d)

2014-12-28 Thread John Andersen
Please provide more information. What does your find statement look like? What is the definition (column definition in the table) of the datetime/date field that you are querying against? Enjoy, John On Monday, 29 December 2014 00:23:10 UTC+2, Salines wrote: > > I need to select all the posts

Re: cake events

2014-12-28 Thread John Andersen
Thanks mark Looks interesting, will certainly see what else can be done with push. Hope anyway that our previous text helped with finding a solution. Enjoy, John On Saturday, 27 December 2014 22:06:15 UTC+2, euromark wrote: > > For a small community application I also still ajax PULL every x se

Re: cake events

2014-12-27 Thread John Andersen
That would not be possible as A's and B's sessions knows nothing of each other and only are running when a request is processed. What you could do is to have a small ajax script pulling the unread count every so often. Enjoy, John On Saturday, 27 December 2014 10:01:27 UTC+2, . . wrote: > > Hi.

Re: Cakephp: 1 core 1 app many webroot?

2014-12-24 Thread John Andersen
CakePHP uses an constant, APP_DIR, to point to where the App folder is located. My guess is that you just need to ensure that the index.php for each user webroot points to the same App folder. Check the CakePHP book at: http://book.cakephp.org/2.0/en/installation/advanced-installation.html#shar

Re: Is there any proper guide to move cakephp from server to another.

2014-12-23 Thread John Andersen
What version of CakePHP do you have on the server? What kind of database, if any, are your site using? Enjoy, John On Tuesday, 23 December 2014 16:56:55 UTC+2, Bhargav Mehta wrote: > > Hi, > I am new to cakephp and want to move my site from one server to another. > How can this be done? > I have b

Re: How to associate 3 models (or structure a search) to achieve the following structure (Cake 2.x)

2014-12-22 Thread John Andersen
Please describe your Customer and Contact with more words. What are they in relation to each other? For example: We register information on our customers. For each customer, we have registered the employees that we use as contact when we wish to contact the customer on specific subjects. The c

Re: Routing to 2 controllers?

2014-12-21 Thread John Andersen
Hi Can I assume that you have implemented authentication in your CakePHP application using the Auth component? See the CakePHP book here about Authentication: http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html Take specially a look at the section "Identifying users and

Re: CakePHP 2.0 authentication(login) without ctp files but other types

2014-12-18 Thread John Andersen
Please provide more information on the steps leading up to the error that you get. 1. Is the login form showing? 2. Can you submit the form? 3. Do you get the error back from your login method - wrong e-mail or password? 4. Something else? Suggest that you at least create the users table and add

Re: Not allowed use mod_rewrite... Trying to get pretty urls to work... No css or js

2014-12-18 Thread John Andersen
Check the DocumentRoot statement - you have a "t" too much "mydomaint" should "mydomain" The same in your > Thinking... I wanted to add the following info: > > > ServerName mydomain > ServerAlias mydomain.tld > DocumentRoot "E:/mydomaint/app/webroot" > > Options Indexes

Re: Save not escape only field CakePHP 2

2014-12-16 Thread John Andersen
Hi Euromark Actually CakePHP 2.x does modify the data - it escapes and quotes the data during the save - using the DboSource method value() - found here: http://api.cakephp.org/2.5/class-DboSource.html#_value Called by the DboSource method create() - found here: http://api.cakephp.org/2.5/source

Re: Save not escape only field CakePHP 2

2014-12-15 Thread John Andersen
Hi Rafael According to the CakePHP book 2.x, then CakePHP automatically escapes the Model::save and the Model::find methods, so that your data will be escaped and saved in the database, but will be un-escaped when you read it back again. Near this location in the CakePHP book: http://book.cake

Re: moving cakephp to a new server

2014-12-11 Thread John Andersen
Hi Enrique Is your webserver setup so that the root of your site points to the \app\webroot folder? You have to give us more information on how your setup is; what CakePHP version you are using; etc. :) Enjoy, John On Wednesday, 10 December 2014 07:15:25 UTC+2, Enrique Martinez wrote: > > I'm

Re: Auth infinite redirect

2014-12-11 Thread John Andersen
Hi Felipe Turn on debugging and tell us what this $this->Auth->redirectUrl() returns in your login method. Enjoy, John On Thursday, 11 December 2014 19:36:30 UTC+2, Felipe Silveira wrote: > > Hello everybody, > > I have a problem with Auth which is well known, researched enough but > found not

Re: CakePHP 1.3 Multiple checkbox setting div to false not working

2014-12-05 Thread John Andersen
The CakePHP book states: Disabling div output: Form->input('User.name', array('div' => false));?> Please try the above, enjoy, John [snip] -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are sub

Re: how to let the options arrays to be horizontal?

2014-12-05 Thread John Andersen
Use CSS to style your radio buttons into a horizontal layout. Enjoy, John On Friday, 5 December 2014 08:05:33 UTC+2, zhoh...@gmail.com wrote: > > > > > Here is my vie

Re: blog tutorial errors

2014-11-28 Thread John Andersen
Can I understand you correctly, that there are no actual error in the blog tutorial, just that it gives you grief? If I am mistaken, please be so kind and explain to us, how you experience the error? How far have you got in the tutorial? What is not displayed correctly? ... and provide screensh

Re: hasMany and find()

2014-11-22 Thread John Andersen
Congratulations Kento :) [snip] -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it,

Re: hasMany and find()

2014-11-17 Thread John Andersen
Ok, if you cannot modify the database tables, then the other option is to use sub-queries, see the CakePHP book at: http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#sub-queries My understanding of this, is that you first construct the SQL statement for finding all the parent ids i

Re: Looking for a "is form dirty" plugin

2014-11-14 Thread John Andersen
Take a look for a client side check for form data has changed. Google it and you will find a lot of options. Enjoy, John On Friday, 7 November 2014 19:27:24 UTC+2, glk wrote: > > Hello everyone, > > I'm looking for some type of plugin that will let me find out in the > controller (during a post)

Re: hasMany and find()

2014-11-14 Thread John Andersen
Assuming you are using CakePHP 2.x, then please take a look at the counterCache feature. http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#countercache-cache-your-count Implement it and then you can use a condition where the counterCache count = 0. Enjoy, John On

Re: validation criteria at least 3 fileds are not empty

2014-10-26 Thread John Andersen
le/ContactsTable.php*, line *85*] > > What is the proper way to do it? > > The question is how to define an error message what will be flashed to the > user? > > > > > > 2014. október 18., szombat 15:41:28 UTC+2 időpontban John Andersen a > következőt írta:

Re: Unable to retrieve data in browser from the *.ctp files

2014-10-19 Thread John Andersen
Please clarify how you are trying to reach the Posts index view in your browser. I assume that you are reaching it by using an URL similar to this: "http://localhost/posts/index"; Enjoy, John On Saturday, 18 October 2014 01:24:30 UTC+3, shesar wrote: > > I have added the model, controller and

Re: validation criteria at least 3 fileds are not empty

2014-10-18 Thread John Andersen
Assuming you are still using CakePHP 3.0 I have not seen any built-in rules for this kind of validation, so my best guess is to roll your own. See section "Custom Validation Rules" under "Validation" in the CakePHP 3.0 book. That should help you on the way. Enjoy, John On Saturday, 18 October

Re: Problem with creating triggers using query() and rawQuery()

2014-10-16 Thread John Andersen
Please verify that your code will work directly in a console against the database. For examply by using phpMyAdmin and run the code in there. Kindly inform us of the result Enjoy, John On Tuesday, 14 October 2014 13:57:28 UTC+3, Prashant wrote: > > Hi, > > I am writing a installer for an appl

Re: belongsTo custom condition not working

2014-10-15 Thread John Andersen
Hi Matt Created a test setup and got the result you wanted by defining each model as follows: class LinkedinPerson extends AppModel { public $hasMany = array( 'LinkedinRecommendation' => array( 'className' => 'LinkedinRecommendation', 'foreignKey' => 'linkedin

Re: Web service login function to check authenticate user in cakephp

2014-10-14 Thread John Andersen
The error message clearly states that the issue is with the missing Posts controller. But you states that the method is in the Users controller. Check your code. Enjoy, John On Saturday, 11 October 2014 00:33:54 UTC+3, Sam wrote: > > I am writing a web service to authenticate whether a user logi

Re: belongsTo custom condition not working

2014-10-14 Thread John Andersen
How are your tables defined? What is the primary key for the table used by the model "LinkedinPerson"? What is the primary key for the table used by the model "LinkedinRecommendation"? In each of the tables, what is the definition of the column "linkedin_id" - I hear mean the purpose of the col

Re: report dispaly

2014-10-03 Thread John Andersen
Please clarify what you want to do with CakePHP. Are you considering developing a survey site? Enjoy, John On Wednesday, 1 October 2014 12:13:26 UTC+3, Nizeyimana Eugene wrote: > > Am using cakephp to display my report and i want to display without > repetiton (for instance survey may have many q

Re: Acl check not logged in user accessable url

2014-10-03 Thread John Andersen
Please rephrase your question or show us an example of what you can get and describe what you cannot get :) Enjoy, John On Monday, 29 September 2014 06:54:57 UTC+3, kani wrote: > > i can get current controller allowed actions but how get all allowed > actions from any controller. > -- Like Us

Re: Missing Controlller

2014-07-13 Thread John Andersen
Please inform us which version of CakePHP you are using. I assume the latest 2.x version. Check the CakePHP book on setting up CakePHP at this URL: http://book.cakephp.org/2.0/en/installation.html#setup As you are using localhost in your URL, I assume this means a development site, so read also

Re: HABTM table models in alphabetical order required?

2014-07-10 Thread John Andersen
CakePHP allows you to use your own table names. Check that CakePHP book at: http://book.cakephp.org/2.0/en/models/model-attributes.html#usetable Enjoy, John On Monday, 7 July 2014 18:20:19 UTC+3, Jamison Bryant wrote: > > Hi all, > > I'm developing an application that has Photos and Users. I've b

Re: cake 2.5.2 installation ok, but not working

2014-07-02 Thread John Andersen
The error in the red-coloured image clearly states that you have an undefined index "User" - which probably means that your "users" table does not contain any rows. Please check and inform us of the result :) Enjoy, John On Tuesday, 1 July 2014 07:58:24 UTC+3, loucode wrote: > > >

Re: how to show barcode vartically

2014-07-02 Thread John Andersen
I looked at the TCPDF home page, documentation and examples. Seems like that is not possible. One way you may be able to do it, is by creating an image instead and then rotate it for your usage. Enjoy, John On Wednesday, 2 July 2014 15:52:19 UTC+3, sneha kulkarni wrote: > > hi > > i wants to sh

Re: database table locking across supported database

2014-06-29 Thread John Andersen
e: > > Hi, > > On Sun, Jun 29, 2014 at 8:45 PM, John Andersen > wrote: > > > > Put a unique index on your receipt_number column, then when you > > grab the highest receipt_number, increases it and saves it, you will > either > > succeed or get an err

Re: database table locking across supported database

2014-06-29 Thread John Andersen
Put a unique index on your receipt_number column, then when you grab the highest receipt_number, increases it and saves it, you will either succeed or get an error. The error you have to catch, and redo the process, until you successfully have saved your new receipt_number. Just my thoughts :)

Re: CakePHP download function returns 'empty' file

2014-06-26 Thread John Andersen
Do you still have this issue? If yes, please show us how you view looks like. Enjoy, John On Friday, 20 June 2014 21:05:55 UTC+3, Alexandr Pirogov wrote: > > Help me, please, to resolve my small problem! I have next function in my > PostsController: > > public function download() { > if (isse

Re: How change a google places API to Helper

2014-06-26 Thread John Andersen
Show us what you have done yourself and we can try and assist you when it goes wrong :) Enjoy, John On Sunday, 22 June 2014 12:16:20 UTC+3, Lo Lo wrote: > > i want change this simple google places API to a Helper ?would you help me? > > > > > > Place searches > > > >

  1   2   3   4   5   6   7   8   9   10   >