Hey,
What is your php.ini value for "mysql.default_socket" set to?
This will tell PHP where your socket file is for MySQL, and help get you
connected.
You can check this file location by looking in your MySQL my.cnf file
for the line indicating "socket = "
For example, a MAMP install has the
Thanks for asking this, Roman, and thank you, Nancy, for answering!
This saved me a lot of headache.
On May 11, 11:12 pm, Nancy wrote:
> What I do is save my messages to an array then do an join and setFlash
> to the results of that join.
> array_push($messages,'The Rule Exceptio
I want to analyze some forms in the 'before' code execution of my ajax
call, then pass the collected data to my controller action to decide
what to do. How can I do this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
I'm a cake noob, so if this is obvious, I apologize.
I have a form, and when it's submitted, I grab a username out of the
database using this line.
$this->User->find('all', array( 'conditions' => array('User.username'
=> $this->data['User']['username']), 'fields' => array
('User.password') ) );
This is on OS X 10.4.11 with latest XAMPP install.
Having probs getting cake bake to use the correct PHP. When I try to
bake a contoller I'm getting the famous error message(s):
"Warning: mysql_connect(): Can't connect to local MySQL server
through socket '/var/mysql/mysql.sock' (2) in /WebDev/
Is it possible to pass the values of variables obtained in my
javascript code executing before the ajax call to the script i execute
after the ajax call returns?
basically i have a dynamic form that gets new elements based on some
logic depending on what the user clicks. The form has some text i
I have two models, Content and Score. The Score model has a reference
to a User (user_id) the Content model (content_id). Therefore, there
can be many Scores associated with Content. So far, this is sounding
like a cut-and-dry Content -> hasMany -> Score association, right?
Now, when I retrieve C
Hello guys,
I need some help here... I making a contact form using Cakephp 1.2.
The problem upon sending email..The notification was successful but I
couldn't receive the emailIs there something wrong with my code?
Can anyone help me here?
Form view:
create("Guest" array("url"=>"controller/c
Ok, I will try to look at it in between working :) ... Hopefully
someone else may know about this too, and reply to you while I am
looking!
John
On May 13, 5:06 pm, "Dave Maharaj :: WidePixels.com"
wrote:
> Hello John,
>
> This is what I see when I run buildAcl from the browser (x 238 times j
Hi Brian,
I agree that NULL can be used, if you are not specifically tracking/
looking for a "Not answered" value.
If the specification is to have the possibility to know that a field
has the value of either "Not answered", "No", "Yes", then I will
always define all the valid values (the domain)
yes that all makes sense now ... there is one tucked ever so neatly
inside thanks i don't know why i didn't see that ...
Cheers!!!
On May 12, 4:11 am, "rich...@home" wrote:
> It sounds like they have a dev version of the site tucked away in the
> webroot.
>
> Live site ->http://www.example.com/
You should properly escape value before put it in SQL:
'MATCH(SearchIndex.data) AGAINST('.
ConnectionManager::getDataSource($this->ModelName->useDbConfig)->value
($this->params['named']['search']).
') IN BOOLEAN MODE)'
On May 14, 6:50 am, Kyle Decot wrote:
> Awesome! I thought when you used an
@Miles J: No. They serve different cases. "notEmpty" is to have
content in field and "required" is to have field itself.
@cbhan: How is rule "not responding" exactly? Always false or always
true? Output $this->data and check what are you trying to save/
validate.
On May 14, 2:47 am, Miles J wro
Example of this approach:
1. User visit index page and click on some "page1" link. You receive
request for that "page1" - you know service_id (for example it is 5)
and referer points to "index", so you save initial "page1" =>
$service_id to session.
2. On that page user follow next link "page2". Y
I suggest that you consider upgrading to version 5.x as Cake may not
support PHP4.x for much longer. This isn't an official announcement,
only based on the number of people who have been strongly suggesting
that Cake no longer support it.
In any case, PHP4.x itself has been discontinued for a ver
Basically I broke up the HABTM tables into categories where to end user can
only select from the options, no ability to add options. The forms (for each
HABTM )are rendered AJAX in sections (reason why they are separate HABTM
because if a user updated their 'skills' it would delete anything not
se
Thanks for the replay. You just cleared my doubt since cakephp 1.2 web
documentation never mentioned which PHP 4 version supported.
On May 14, 8:52 am, andy wrote:
> Cake requires PHP 4.3.2 or greater
>
> On May 13, 12:22 am, genobee wrote:
>
> > Hi CakePHP Group,
>
> > I'm new to this and usin
Can you post the code you are using to retrieve and display the data?
On May 12, 3:17 pm, Site Reference wrote:
> Hey all,
>
> I apologize if this is a bit of a newbie question, but I am having
> trouble getting my database associations to link up...here is what I
> have:
>
> MySQL Tables
>
> CR
Personally, I would keep the tables separate. I have never tried the
tree behavior, but it sounds like it could harder to maintain as the
table grows than separate tables. Will there ever be a need for the
user to update fields from all tables in one form (your explaination
didn't seem clear to me
Cake requires PHP 4.3.2 or greater
On May 13, 12:22 am, genobee wrote:
> Hi CakePHP Group,
>
> I'm new to this and using CakePHP 1.2 framework. I've trouble for my
> production installation and would like to ask for help from
> CakePHPGroup. The content uploaded from my local which is running ok
Awesome! I thought when you used an array, you had to provide a key.
Thanks Brian!
On May 13, 7:41 pm, brian wrote:
> I meant that you can add it to the array, though as a string (ie. no key).
>
> $conditions[] = 'MATCH(SearchIndex.data) AGAINST(\''
> . $this->params['named']['search']
>
I meant that you can add it to the array, though as a string (ie. no key).
$conditions[] = 'MATCH(SearchIndex.data) AGAINST(\''
. $this->params['named']['search']
. '\') IN BOOLEAN MODE)';
On Wed, May 13, 2009 at 7:24 PM, Kyle Decot wrote:
>
> Oh, my bad. I must have typed it inco
I've also noticed problems with the source view in FF where it's
impossible to scroll (using the scrollbar, mousewheel, or keyboard).
It seems a bit like a Heisenbug, though. I've had it happen when
viewing a particular method, then it won't happen another time.
Anyway, the quick solution is to di
On Wed, May 13, 2009 at 5:32 PM, Dave Maharaj :: WidePixels.com
wrote:
> Quick question about ensuring functions can not be run from the URL. Would
> this be the correct setup?
>
> controller;
> $key = $this->Model->__someFunction($key);
>
> model:
> function __someFunction($key)
> {
> .
Oh, my bad. I must have typed it incorrectly. They should all be
$conditions; I'd rather do it in an array because I have a lot of
different conditions/fields that can go into the array. Is it
possible to do MATCHES in an array?
On May 13, 7:20 pm, brian wrote:
> You mention both $conditions &
You mention both $conditions & $criteria so it's a bit difficult to
say for sure. But that last bit would probably work better as one
complete string.
'MATCH(SearchIndex.data) AGAINST(\''
. $this->params['named']['search']
. '\') IN BOOLEAN MODE)';
On Wed, May 13, 2009 at 6:37 PM
I am attempting to construct my array but am having some problems w/
the $conditions array. I am doing something like:
$conditions = array("Model.approved"=>1);
if($something == $something_else)
$conditions['Model.something'] = 1;
if(!empty($search)) {
$criteria["MATCH(SearchIndex.data
DateTime type on Mysql Table,
it's better using timestamp with datetime format (-00-00 00:00:00)
Seems it doesn't important, but we know that datetime bits is bigger
than timestamps.
That's way, all my created and modified table using timestamp.
On Thu, 2009-05-07 at 15:29 -0700, Nate w
I was unfamiliar with the "Containable" behavior which is documented
here:
http://book.cakephp.org/view/474/Containable
The primary intended use of this behavior seems to be to restrict the
associations that are pulled in, but it can also be used to pull in
additional data.
I set up the Contai
Quick question about ensuring functions can not be run from the URL. Would
this be the correct setup?
controller;
$key = $this->Model->__someFunction($key);
model:
function __someFunction($key)
{
...
return $something;
}
If so basically anything double underscored is for cakes i
Alexandru Ciobanu-4 wrote:
>
>
> On 05/13/2009 06:23 PM, mig_akira wrote:
>>
>>
>> $conditions = array($Model->alias . '.' .
>> $this->__settings[$Model->alias]['slug'] =>' LIKE ' . $slug . '%');
>>
>>
> I can't recall when the change was made but your code won't work with
> any recent c
Auth is a component, therefore, in your controller:
var $components = array('Auth');
And you also need to set the params where necessary. But you've read
the manual, right?
On May 13, 9:54 am, lakers fan wrote:
> it didnt.. should I just use $uses = array('Auth');??
>
> > Date: Wed, 13 May 200
It's a bit weird, especially that calling the same function to edit the
record returns the proper id.
i use the same property with such syntax:
if ($this->Design->saveAll($this->data))
{
$this->notify(2,$this->Design->id);
$this->redirec
Hi Stu,
After your light, I guess to figure out the issue:
Here's the code within the model (I just named Ab)
field1 is author_id and field2 is book_id
var $name = 'Ab';
var $validate = array(
'author_id' => array(
'rule' => array('uniqueValidation', 'Ab', 'author_id',
'book_id'),
James, that's a poor response for IE. However, what should be said
instead would be:
If you have some possible fixes for the CSS and IE, you can try and
submit a ticket at the API Generator's project page on TheChaw(.com).
On May 13, 11:13 am, James K wrote:
> I have no problems viewing the API
Hi Brendon,
Same problem even after modifying the datetime field to Allow Null and
default to Null.
Any ideas?
Thanks.
Lucas
On May 8, 1:57 am, Brendon Kozlowski wrote:
> The `created` field must (1)be a datetime field, (2)NULL must be
> allowed, (3)and default to NULL value. Once that field
Dr. Loboto, you saved my day. Thank you so much, now its working
properly
@MPeg: check your model-filenames, in my situation this was the fault
On 13 Mai, 10:28, MPeg wrote:
> Hi, I have the same problem in my application: "useTable" it seems to
> be ignored.
>
> I use a model's class in his
Are you referring tabs, like in firefox tabs, or tabs within the
website?
--~--~-~--~~~---~--~~
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
You dont need require true if you are using notEmpty. Kinda
conflicting dont you think?
--~--~-~--~~~---~--~~
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
T
You would have to set the belongsTo to the item, and then the item
belongsTo the master. And just use containable.
$results = $this->Request->find('all', array('contain' => array('Item'
=> array('Master';
--~--~-~--~~~---~--~~
You received this message because
+1 for better ACL documentation, offcial docs and the tutorials out
there have been very frustrating for me :(
Juancho
On Thu, May 7, 2009 at 5:29 PM, Nate wrote:
>
> Well, maybe hate's a strong word. Let's say, what do you like the
> least? Kind of an odd question, I know, but since we've ki
My database has "request" table with a foreign key to a "item" table.
The "item" table has a foreign key to a "master" table.
I'd like to define something like an "indirect belongsTo" association
in the "request" model to the "master" table so that I can display
"master" information when I'm disp
hello there
quick question with ajaxHelper
i have a few select boxes on the page and i need one to update based
upon the value of the other. i dont have a problem getting it to call
an action via observeField BUT i can't seem to pass that action the
value of the form field.
here is my code:
ech
Found 2 links which help described what I think I need. I'm still
tinkering, but I thought I'd share the links here in case someone
searches for the same question.
http://nik.chankov.net/2008/04/10/using-more-than-one-database-connection-in-cakephp/
http://savasplace.com/2009/05/multiple-databa
On 05/13/2009 06:23 PM, mig_akira wrote:
>
>
> $conditions = array($Model->alias . '.' .
> $this->__settings[$Model->alias]['slug'] =>' LIKE ' . $slug . '%');
>
>
I can't recall when the change was made but your code won't work with
any recent cakephp releases.
It should be:
$conditions = a
Hello All,
Facing 2 issues
Issue 1
--
Trying to create a simple form validation using the new 1.2 validation
method.
I want simple not_null input validation on a alphanumeric field..but
when i click on the 'submit' but
On Wed, May 13, 2009 at 9:18 AM, John Andersen wrote:
>
> Hi Drake,
>
> You should not use a NULL as a meaningfull value (NULL is exactly - no
> value). If you want your questions to reflect the possibilities of:
> 1) Not answered.
> 2) A Yes answer;
> 3) A No answer;
> you should design your col
Hi Stu,
After your light I think that figure out the question.
In the example below, name and country are the couple fields I was
talked. The model is Author.
here's the code (With more time, should it be optimied?) within the
model author.php
var $validate = array(
'name' => array(
I've used sorttable in the past. But, now that I use jQuery ...
function userSetup()
{
...
$('#users_list .PaginationLinks a, #users_list thead .Actions
a').click(function()
{
showIndicator('#content');
var href = $(this).attr('href');
Hi, thanks for answering.
It was supposed to increment a number at the end, but it seems that there's
a bug in the code. Changing line 121 to
$conditions = array($Model->alias . '.' .
$this->__settings[$Model->alias]['slug'] =>' LIKE ' . $slug . '%');
And line 125 to
$conditions[$Model->alia
I have no problems viewing the API in Firefox 3.5 or Firefox 2.x,
Chrome, or Opera 9.x under Windows.
As for IE stop using IE?
- James
On May 13, 12:54 am, Mr-Yellow wrote:
> For months now the API documentation site has not been accessible to
> IE.
>
> The search button is stretched over
Hello
i have an array,returned from a view, similar to this:
Array(
[Customer] => Array(
[Name] => XXX
[Surname] => YYY
)
[Orders_Customer] => Array(
[0] => Array(
[Code] =>
)
@Miles J: That's why a toggle would be nice in the core to use
associative or full fledged model objects.
It would be nice to run model functions off the returned object in
either the controller or view without having to set the model's id.
Furthermore, if you needed to manipulate two objects of
Dear rartavia,
Thanks for your reply.
Actualy, it's not work, because the couple fields (1 & 2) need to be
unique at the SAME TIME. For instance:
field1 | field2 | status
1 | 1 | allow
1 | 2 | allow
2 | 1 | allow
2 | 2 | allow
And the system can not allo
Hello John,
This is what I see when I run buildAcl from the browser (x 238 times just
the alias` = 'apply' changes for each controller action)
Query: SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`,
`Aco`.`foreign_key`, `Aco`.`alias` FROM `acos` AS `Aco` LEFT JOIN `acos` AS
`Aco0` ON (`Aco0`
Hi,
I'm developing a application and I need to use Sybase as database. I read in
http://groups.google.com/group/cake-php/browse_thread/thread/862a01ace2a18ec4that
Sybase and Cake have many incompabilities, and most of developers give
up using the both together. I would like to know if is there any
1. Lets loose PHP4 asap
2. Hidden input fields should a default class applied something
like: .hidden-input perhaps - if you have forms with coloured
background then it can be a real nightmare making sure hidden fields
stay hidden (not everybody uses firefox) - I'm sure everybody has
scratched th
Hi Drake,
You should not use a NULL as a meaningfull value (NULL is exactly - no
value). If you want your questions to reflect the possibilities of:
1) Not answered.
2) A Yes answer;
3) A No answer;
you should design your column accordingly - to be able to hold three
values (0 - not answered, 1 -
Hi,
in my database I have a field named 'year' which has the type year(4).
In the add form I would like to have a select field for the years. So I
added this:
e($form->year('year'));
If I try to save the form I get an "array to string conversion error"
and "Unknown column 'Array' in 'field lis
I was looking for a way to sort a table without requerying the
database for the data with a new ORDER clause.
This javascript library I found did just that, so I thought I would
share it.
http://www.kryogenix.org/code/browser/sorttable/
All you have to do is download sorttable.js and place in t
Hi I'm having an issue where when I insert a new document into the
database I'm not getting the id of the new record back. The save
function looks like this:
function save() {
if($this->Document->save($this->data)){
$documentid = $this->Document->id;
$message = '"S
Just something I've come across, and wondered if anyone else has
noticed it. I've searched around a bit but not seen anything posted.
Relatively new to Cake so not sure if this is common.
I have table headers in a view for a paginated list of data like this:
sort(__('Name', true), 'list_name');
Hmmm, yeah, I still get the same error. I guess I will keep messing
around with it, maybe read the documentation a little closer :/
thanks.
On May 13, 7:43 am, nini wrote:
> I'm just using
> $this->pdf->setSourceFile($init_data['settings']
> ['pdftemplate_to_load']);
> $this->pdf->useTempla
I'm just using
$this->pdf->setSourceFile($init_data['settings']
['pdftemplate_to_load']);
$this->pdf->useTemplate($this->pdf->importPage(1));
without class extends notation (i think, it didn't worked for me when
i was writing this stuff)
On May 13, 1:30 pm, ryan wrote:
> Hmmm, Thank you for
Hmmm, Thank you for the response.
I get the following error though when I trying to use FPDI methods:
Fatal error: Cannot access protected property XFPDI::$PDFVersion in /
(...)/vendors/fpdi/fpdi_pdf_parser.php on line 381
In my test code, I had just wrote the following inside of pdf.ctp
App
Thanks arif ,but i think VALID_NOT_EMPTY,is deprecated in Cake12, i
made use of it ealier but same result..
On May 13, 3:44 pm, arif hossen wrote:
> Please apply this code for your problem slove.
>
> var $validate = array(
> 'name' => array(
> 'rule' => VALID_NOT_EMPTY,
> '
Sorry but in this way I must keep in session all pages the user load
with relative service_id?
On 13 Mag, 05:34, "Dr. Loboto" wrote:
> You should save service_id in session as associative array:
> current_url => service_id. When your controller/action is requested,
> search service_id in session
after so many years still too "american"!
no real multi-lingual support for usage in other languages than just
englisch
e.g. the mb_() function problem i already pointed out 12 months ago
with utf8 as default + mb_() functions there wouldn't be any trouble
On 13 Mai, 11:57, majna wrote:
> Th
Please apply this code for your problem slove.
var $validate = array(
'name' => array(
'rule' => VALID_NOT_EMPTY,
'allowEmpty' =>false,
'required' => true,
'message'=>'Name field can not be empty.'
)
);
On Wed, May 13, 2009 at 3:53 PM, cbhan wrote:
>
hello!
I have problem with base path route. In routes.php:
Router::connect ('/', array('controller'=>'sites',
'action'=>'index'));
but when I connect to http://localhost/ - I get content of apache
htdocs dir.
I make chages in httpd.conf and set mod_rewrite how its describe here
http://book.ca
try unsetting the key in the data you save. You have said that the key
exists when you check the passed data.
Cake has probably put in a dummy field to provide a default value.
If you unset the key then it should not pass any data to the database
and provided the field defaults to null in the dat
I am using cake_1.2.2.8120 ,notEmpty rule is not responding.
// model code:
var $validate = array(
'name' => array(
'rule' => 'notEmpty',
'required' => true,
'message'=>'Name field can not be empty.'
)
);
//view code
create(array(
'enctype' => 'mult
Think Routing.admin and prefix routing implementation is not complete.
-prefix routing ignores reverse routing and pagination
-Routing.admin accepts only one string
maybe Routing.admin should be removed and replaced with prefix routing
completely.
On May 8, 3:08 pm, Smelly Eddie wrote:
> I hat
@nurvzy - Returning objects from a mysql resource and slower then an
associative array. I for one would hate to have to use objects within
views.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To pos
@Sergei
U why wouldn't helpers and components be in the controller. Where
else would they go.
On May 13, 1:12 am, Sergei wrote:
> Don't like:
>
> * PHP4 support (some years back I thought it as advantage!)
> * too resticted by conventions (at first I liked it too)
> * $helpers=array(..) and
You would set the "foreignKey" or "assocationForeignKey" when creating
the associations.
--~--~-~--~~~---~--~~
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
Why is your query written so weird? Shouldnt it be:
$data = $this->Client->find('first', array(
'conditions' => array(
'Client.id' => $id
),
'contain' => array(
Hmm, I'm not quite getting what you're saying.
> You don't need an extra parameter, I think you can use this code on
app_helper.php:
Well, isn't the language parameter an extra parameter ?
Anyway, I'm allready using a similar code than the one given by
teknoid, and it works well. By problem was
Anyone else having a solution for this?
On May 12, 3:25 pm, Jérémie wrote:
> Actually, seems it's a known bug and that we have to wait for Cake
> 2.0 :(https://trac.cakephp.org/ticket/5336
>
> On 12 mai, 15:16, Jérémie wrote:
>
>
>
> > Hi,
>
> > I've got the same problem
> > Hope someone can he
I've created a new pdf layout:
pdf.ctp:
App::import('Vendor','tcpdf/tcpdf');
App::import('Vendor','fpdi/fpdi');
$this->pdf = new FPDI();
settings etc...
return as string:
echo $this->pdf->Output(null, 'S');
or other output types:
$this->pdf->Output($init_data['settings']['filename'], $init_data
Use some PHP IDE like Eclipse PDT or NetBeans:
When you hover mouse on that function, code insight will show nice
comments
like: "Returns a translated string if one is found; Otherwise, the
submitted message."
You can even ctrl+click on that function and OMG! It's there!
On May 12, 5:30 pm, Stu
Thank you very much,
That answers my question for the plural form of a table name and the
primary key.
But what about the foreign key 'operatorId'?
How can I make cakePHP use a foreign key suffixed by 'Id' instead of
'_id' ?
--~--~-~--~~~---~--~~
You received t
A plugin management system, for plugin, component, behavior, etc...
would be nice
--~--~-~--~~~---~--~~
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 unsu
Hi, I have the same problem in my application: "useTable" it seems to
be ignored.
I use a model's class in his own controller correctly so I think Cake
is able to load it via naming convenctions correctly to!
I think so but Cake still ignore mi configuration in relations!
What to do?
I hate to
Don't like:
* PHP4 support (some years back I thought it as advantage!)
* too resticted by conventions (at first I liked it too)
* $helpers=array(..) and $components=array(..) in controllers.
I really like the new Yii framework -- very powerful, fast and more
important, flexible. Comparing to Ca
it didnt.. should I just use $uses = array('Auth');??
> Date: Wed, 13 May 2009 00:51:25 -0700
> Subject: Re: password field
> From: drlob...@gmail.com
> To: cake-php@googlegroups.com
>
>
> Auth component hashes password automatically.
>
> On May 13, 2:38 pm, lakers fan wrote:
>> Hello, Is
Auth component hashes password automatically.
On May 13, 2:38 pm, lakers fan wrote:
> Hello, Isnt password field automatically hashed??. if not can someone let
> me know how i can hash the password field automatically?
> Thanks,Bharani
> _
Hello, Isnt password field automatically hashed??. if not can someone let
me know how i can hash the password field automatically?
Thanks,Bharani
_
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TA
As far as I can see from the source, the sluggable behavior increments
a number at the end of the slug in the case the slug is already in
use.
Pls. check the beforeSave event of the sluggable behavior.
Markus
--~--~-~--~~~---~--~~
You received this message because
Hi CakePHP Group,
I'm new to this and using CakePHP 1.2 framework. I've trouble for my
production installation and would like to ask for help from
CakePHPGroup. The content uploaded from my local which is running ok.
I've done and checked these:
1. Clear model and persistent cache.
2. I didn't g
1) it's better to validate data in model.
2) can you post your view and controller code?
On 13 Mag, 04:08, Jules wrote:
> I have a form where, if the user enters the same value into two
> fields, they see an error message and have to fill in the form again.
>
> 1) I compare the two fields in th
91 matches
Mail list logo