Re: Geocoding

2012-05-25 Thread Simon Males
Data source for the GeoNames service:

https://github.com/signified/CakePHP-GeoNames-DataSource

On Thu, May 24, 2012 at 4:00 PM, Justin Edwards
 wrote:
> Might have some luck with this one.
>
> http://geocoder.us/help/php_kenny.shtml
> http://geocoder.us/help/php_pear.shtml
>
>
> On Thu, May 24, 2012 at 12:57 AM, Justin Edwards 
> wrote:
>>
>> https://github.com/dereklio/cakephp_geoip
>> https://github.com/neilcrookes/CakePHP-Yahoo-Geo-Planet-Plugin
>>
>>
>> On Wed, May 23, 2012 at 1:09 PM, euromark 
>> wrote:
>>>
>>> I still use google maps.
>>> but there the only evolution is going to "not free anymore" - so for high
>>> traffic sites this might not be the most suitable approach (or it might
>>> again if the money is not the issue).
>>>
>>>
>>> Am Mittwoch, 23. Mai 2012 19:53:07 UTC+2 schrieb Alex Bovey:

 Hi all,

 What behavior / component / plugin is everyone using for geocoding these
 days?

 I want to use either Yahoo or Google Maps and I've found a bakery
 article from Nate in 2007 but can't find the actual behavior anywhere:

 http://bakery.cakephp.org/articles/nate/2007/04/13/geocoding-in-cakephp

 As that was 5 years ago I guess there might be a more evolved solution
 now anyway?

 THanks,

 Alex

 --
 Alex Bovey
 Web Developer | Alex Bovey Consultancy Ltd
 Registered in England & Wales no. 6471391 | VAT no. 934 8959 65
 a...@bovey.co.uk | t 0844 567 8995 | m 07828 649386 | f 0870 288 9533
 PHP | CakePHP | MySQL | jQuery | HTML5 | CSS3 | Drupal | Wordpress

>>> --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>>> others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>>> at http://groups.google.com/group/cake-php
>>
>>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php



-- 
Simon Males

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: GoogleMapV3 Helper issue

2012-05-25 Thread Michael Gaiser
Would there be any issue with the fact that I am running it from my
local host instead of from my host?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Unauthorized users don't get redirected to login action

2012-05-25 Thread Dave Milsom


On Friday, May 25, 2012 2:15:51 AM UTC-4, rahajiyev wrote:
>
>
>
> On May 24, 6:52 pm, Ceeram  wrote: 
> > Why should a logged in user be redirected to login? 
> > 
> The logged in user doesn't have that specific privilege. 
> One would expect a login screen to appear when one has insufficient 
> privileges...


I wouldn't expect that. 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cake Bake under Ubuntu

2012-05-25 Thread Mike Griffin
On Fri, May 25, 2012 at 3:06 PM, Max Kiehnscherf
 wrote:
> I've got xampp installed. Is that enough?
>

Do you see mysql in the output from phpinfo() ?

Did you install mysql-server and mysql-client?

Mike.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cake Bake under Ubuntu

2012-05-25 Thread Max Kiehnscherf


On 25 Mai, 15:22, Mike Griffin  wrote:
>
> Have you got the php mysql packages installed? And mysql-server and
> mysql-client?
>
> Mike.


I've got xampp installed. Is that enough?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Update div with Selectbox

2012-05-25 Thread Jerome Walitzek
Hi all,
i have solved my problem by myself, but I am now once again facing another 
problem-where you can possibly help me.

First of all, my code
*
EventsController.php*
*public function edit($id = null) {
$this->Event->id = $id;
if (!$this->Event->exists()) {
throw new NotFoundException('Ungültige Veranstaltung','error');
}
if ($this->request->is('post') || $this->request->is('put')) {
if ($this->Event->save($this->request->data)) {
$this->Session->setFlash('Die Veranstaltung wurde geändert !', 
'success');
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash('Die Veranstaltung konnte nicht 
geändert werden','error');
}
} else {
$this->request->data = $this->Event->read(null, $id);
}

$variables = $this->Event->User->find('all', 
array('conditions'=>array('User.typ'=> array('einsatzleiter', 
'fahrdienstleiter';
$this->set(compact('variables'));

$ansprechpartner = $this->Event->Passanger->find('all', 
array('conditions'=>array('Passanger.ansprechpartner'=> array('ja';
$this->set(compact('ansprechpartner'));

$events = $this->Event->find('all');
$this->set('events', $events);
$this->set('locations', $this->Event->Location->find('list'));

$places = $this->Event->Place->find('all');
$this->set(compact('places'));
}

public function data_interface($place_id) {
$locations = $this->Event->Location->findAllByPlaceId($place_id);
$this->set('locations', $locations);
}

public function save_data() {
if(!empty($this->data)) {
$this->Event->create($this->data);
if($this->Event->saveAll()) {
$this->Session->setFlash('Die Veranstaltung wurde geändert !', 
'success');
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash('Die Veranstaltung konnte nicht 
gespeichert !','error');
}
$this->autoRender = false;
}
}*

*edit.ctp*
*Form->create('Event', array('type' => 
'file',array('controller'=>'events', 'action' => 'save_data')));?>
Form->input('id'); ?>
.

Veranstaltungsort

data;
if (  $mydata['Event']['place_id'] != null ) {
foreach ( $select_value as $k => $v ) {
if ( $mydata['Event']['place_id'] == $k ) {
$this_is_selected =  $k;
}
}
} else {
$this_is_selected = 0;
}
echo $this->Js->Form->select('place_id', $select_value);
echo $this->Js->writeBuffer();
?>




Locations

 Html->div(null, '', array('id' => 'target-div'));
?>


.
Js->submit('Speichern', array(
'url' => array(
'controller' => 'events',
'action' => 'save_data'
)));
echo $this->Js->writeBuffer();
echo $this->Form->end();
?>*

*data_interface.ctp*
*Form->select('location_id', $select_value, array('label'=> 
false, 'multiple' => 'checkbox'));
?>*


The problem before I stand now is that I like to put the values ​​that are 
given to me as checkboxes from my ajax request also would like to save to 
the events controller. Unfortunately, this does not work and cake saves me 
no matter which checkbox i set, the value "1" to the database
.
Any ideas how I can solve this problem now?

Looking forward to help.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: GoogleMapV3 Helper issue

2012-05-25 Thread Michael Gaiser
Firebug shows there isn't anything being sent.

Sent from my iPhone

On 2012-05-25, at 4:27 AM, euromark  wrote:

you must be doing sth wrong. this is usually a JS error.
if you use firefox and firebug extension you most likely can see the JS
error in the firebug console at the bottom.


Am Freitag, 25. Mai 2012 09:56:06 UTC+2 schrieb Michael:
>
> So I have been trying to get this to work but still cannot seem to
> work through it.
>
> I am using this version:
> https://github.com/dereuromark/cakephp-google-map-v3-helper
>
> And following this explanation:
>
> http://stackoverflow.com/questions/8795104/google-map-v3-cakephp-helper-and-multiple-markers
>
> But I cannot seem to get it to show up and all I get when I try to
> display the map is "Map cannot be displayed!"
> I have turned off all my css in hopes that would solve it, but no
> luck. I am running Cake 2.1 and trying to get this working on my
> localhost, which is connected to the internet. Any help would be most
> welcome. Thanks in advance.
>
> ~Michael
>
 --
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cake Bake under Ubuntu

2012-05-25 Thread Mike Griffin
On Fri, May 25, 2012 at 2:19 PM, Max Kiehnscherf
 wrote:
>
> PHP Fatal error:  Call to undefined function mysql_query() in /home/
> max/akk/cake/libs/model/datasources/dbo/dbo_mysql.php on line 613
>
> Fatal error: Call to undefined function mysql_query() in /home/max/akk/
> cake/libs/model/datasources/dbo/dbo_mysql.php on line 613
> max@max-ubuntu:~/akk/app$
>
> What is the problem here?

Have you got the php mysql packages installed? And mysql-server and
mysql-client?

Mike.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cake Bake under Ubuntu

2012-05-25 Thread Max Kiehnscherf

On 25 Mai, 08:46, luca capra  wrote:
>
> Don't use sudo. Try:
>
> # cd in your app dir
> cd /home/max/akk/app
> # run cake with the full path, or relative like ../cake/console/cake
> /home/max/akk/cake/console/cake bake
>
> Probably you will need to reset permission
>
> sudo chown max.max -r /home/max/akk

Ok, this works so far, but now i get this error:

Welcome to CakePHP v1.3.14 Console
---
App : app
Path: /home/max/akk/app
---
Interactive Bake Shell
---
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[F]ixture
[T]est case
[Q]uit
What would you like to Bake? (D/M/V/C/P/F/T/Q)
> C
---
Bake Controller
Path: /home/max/akk/app/controllers/
---
PHP Fatal error:  Call to undefined function mysql_query() in /home/
max/akk/cake/libs/model/datasources/dbo/dbo_mysql.php on line 613

Fatal error: Call to undefined function mysql_query() in /home/max/akk/
cake/libs/model/datasources/dbo/dbo_mysql.php on line 613
max@max-ubuntu:~/akk/app$

What is the problem here?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: find conditions fatal error

2012-05-25 Thread rahajiyev
As I said Cake 1.3 never supported PDO, and this is how things are
done in 2.x, so Oracle driver needs to be rewritten if you want to do
any kind of filtering (WHERE ...). There are too many bits of code
needing a rewrite, not only the connection step.
I've "worked around" the issue by simply falling back to 1.3

On May 24, 5:21 pm, Stefanie  wrote:
> Hi rahajiyev,
>
> I encountered a related problem. I was always getting a "Warning (2):
> implode() [function.implode]: Invalid arguments passted [...]" error.
> After some days of research I came to the point that (for my problem)
> the line
> $data .= implode(', ', $this->value($value, $columnType));
> in DboSource.php, #2352 is making all the trouble. Compaire the
> DboSource::value() method with the one from the Oracle class. You'll
> see differences.
>
> I think that a work-around for this function - in order to get the
> whole find-method to work - will solve the problems.
>
> Does anybody else have another solution so far?
>
> Greetings,
> Stefi

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


cake adding data to an existing column in a database

2012-05-25 Thread Jwesus
I'm at wits end trying to solve this problem in my database. So when a
user goes to add another user, the two user keys are added to the
database but when the other user goes to accept the request including
an expiry date for the add, it creates a new column with just the
expiry date and null fields. here is my add and approve functions any
help would be greatly appreciated.

public function add(){
if($this->request->is('post')){
$this->Relationship->create();
if ($this->Relationship->save($this->request->data))
{
$lastId=$this->Relationship->id;
$this->Session->setFlash('The relationship has been saved');

}
else { $this->Session->setFlash('The relationship could not be
saved. Please, try again.'); }
}

  }



public function approve(){
if($this->request->is('post')){
$this->request->data('Relationship.$lastId');
$this->Relationship->save($this->request->data);
$this->Session->setFlash('The information has been saved');}
else{$this->Session->setFlash('The information couldnt be
saved');}


}

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: how to run a program in cake php

2012-05-25 Thread Jeremy Burns | Class Outfit
You're really not going to get help with that if you haven't even looked at the 
comprehensive tutorial and online guides, else we'll end up gradually writing 
your app for you (which *isn't* going to happen).

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 25 May 2012, at 12:56:54, sneha kulkarni wrote:

> plz help me how to run a simple helloword program in cake php using
> xamp
> 
> i have created one file in controller with name testers_controller.php
> 
>  class TestersController extends Controller{
>  var $uses=null;
>  var $autoRender=false;
>  function sayHello(){
>echo 'Hello, CakePHP!';
>  }
> }
> ?>
> 
> but i got 2 errors
> 
> like
> TestersController could not be found.
> 
> Create the class TestersController below in file: app\Controller
> \TestersController.php
> Notice: If you want to customize this error message, create app\View
> \Errors\missing_controller.ctp.
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: how to run a program in cake php

2012-05-25 Thread stork


> i have created one file in controller with name testers_controller.php 
>
... 

> Create the class TestersController below in file: app\Controller 
> \TestersController.php
>

Can you read?
Also, your controllers should extend AppController

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


how to run a program in cake php

2012-05-25 Thread sneha kulkarni
plz help me how to run a simple helloword program in cake php using
xamp

i have created one file in controller with name testers_controller.php



but i got 2 errors

like
TestersController could not be found.

Create the class TestersController below in file: app\Controller
\TestersController.php
Notice: If you want to customize this error message, create app\View
\Errors\missing_controller.ctp.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


how to run simple cake php program using xampp

2012-05-25 Thread madhuri yewale
how to run simple cake php program using xampp?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


curl

2012-05-25 Thread LITTO CHACKO
iam currently developing a tool for autoposting in several sites... so iam 
using curl in php.. iam succeessful in automatic registering..but can't 
login because the login function is calling a javascript function..like

function login() {
var loginForm = document.getElementById("loginForm");
if (loginForm.username.value == "") {
alert("Please enter your E-mail.");
return false;
}
if (loginForm.password.value == "") {
alert("Please enter your password.");
return false;
}
loginForm.submit();
}

and form is like this:-

http://www.pentimo.com/authenticate.php"; 
method="post">
Password: 

can anyone tell how it can be donepls..


can 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Form validation always fails - but there is no validation in the model.

2012-05-25 Thread Papa Gateau
Hi,

I'm at my wits end on this one, so I'm hoping some of the great and
good here can help me out.

The client site is on cakePHP1.1 (and an upgrade is not on the cards
for quite sometime).

I have a very simple form which was always returning validation
message (from the setFlash - see code snippet below) but not any
validation errors (the validationErrors is returning Null when I
var_dump it) - so I removed the validation rules from the model and
still get the same behaviour.

I just don't understand what is going on here, so any help or pointers
gratefully received.

Thanks
PG

All relevant code posted below:

Model:

class SeoDefault extends AppModel {

var $name = 'SeoDefault';
/*var $validate = array(
'region_code' => VALID_NUMBER,
'section_id' => VALID_NUMBER,
'title' => VALID_NOT_EMPTY,
'blurb' => VALID_NOT_EMPTY
);*/

}

Controller:

class SeoDefaultsController extends AppController {

var $name = 'SeoDefaults';
var $helpers = array('Html', 'Form', 'Javascript','Pagination');
var $uses = array('SeoDefault','Section');

function admin_edit($id = null) {

$this->set('sections', $this->Section-
>generateList(null,null,null,'{n}.Section.id', '{n}.Section.name'));

if (empty($this->data)) {
if ($id) {
$this->data = $this->SeoDefault->read(null, 
$id);
}
} else {
$this->cleanUpFields();

if ($this->SeoDefault->save($this->data)) {
$this->Session->setFlash('The SEO Default has 
been saved');
$this->redirect('/admin/seo_defaults/index');
} else {
$this->Session->setFlash('Please correct errors 
below.');
}
}

}
}

Admin_Edit view:

SEO Default

link('List SEO Defaults', '/admin/seo_defaults/
index'); ?>
link('New SEO Default', '/admin/seo_defaults/
edit'); ?>



Edit SEO Default Details


labelTag('SeoDefault/region_code', 'International
or UK');?>
selectTag('SeoDefault/
region_code',array("1"=>"UK","2"=>"International"),$html-
>tagValue('SeoDefault/region_code'), array(), array(), true, true);?
>Which website does this apply to UK or
International
tagErrorMsg('SeoDefault/region_code', 'Please
select the website that these defaults apply to.');?>



labelTag('SeoDefault/section_id', 'Section');?>
selectTag('SeoDefault/section_id',$sections,$html-
>tagValue('SeoDefault/section_id'), array(), array(), true, true);?
>The section of the website that these defaults
apply to. e.g. news
tagErrorMsg('SeoDefault/section_id', 'Please select
the section that these defaults apply to.');?>


labelTag('SeoDefault/title', 'Title');?>
input('SeoDefault/title');?>The
Default Meta title. max. 65 chars.
tagErrorMsg('SeoDefault/title', 'Please enter the
Meta Title');?>


labelTag('SeoDefault/blurb', 'Desc.');?>
textarea('SeoDefault/blurb', array('cols' => '60',
'rows' => '12', 'class' => 'mceNoEditor'));?>Please
provide the Meta description for this section. Max. 250 chars
tagErrorMsg('SeoDefault/blurb', 'Please enter the
Meta Description.');?>




hidden('SeoDefault/id')?>

submit('Save');?>



And in case it's useful the Model for the Section (again with
validation commented out):

class Section extends AppModel {

var $name = 'Section';

/*var $validate = array(
'name' => VALID_NOT_EMPTY,
);*/

}

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Using PUT request method does not populate data with values

2012-05-25 Thread elitalon
Hi,

I am developing an API using CakePHP 2.1.1. I have configured the following 
route:

Router::connect("/api/accounts/:id",
  array('controller' => 'accounts', 'action' => 'edit', 'api' => true, 
'[method]' => array('PUT', 'POST')),
  array('pass' => array('id'), 'id' => '\d+'));

Then I have the following action:

public function api_edit($id = null) {
  if ($this->request->is('put') || $this->request->is('post')) {
if ($this->Account->save($this->request->data)) {
  ...
} else {
  throw new InternalErrorException();
}
  } else {
throw new MethodNotAllowedException();
  }
}

I am testing the API using curl. When using POST the action saves the data 
and everything goes as expected:

$ curl -i -X POST -d "data[Account][id]=1&data[Account][name]=FooBar" 
http://example.com/api/accounts/1.json
HTTP/1.1 200 OK

However, when using PUT $this->request->data is not populated with the 
submitted data but returns an empty array():

$ curl -i -X PUT -d "data[Account][id]=1&data[Account][name]=FooBar" 
http://example.com/api/accounts/1.json
HTTP/1.1 500 Internal Server Error

Both requests are entering the action and passing the check of 
$this->request->is(...). But printing the content of $this->request->databefore 
saving just reveals this scenario.

Any ideas? If not I'll submit this issue as a ticket.

Thanks!!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


how to run simple cake php program using xampp

2012-05-25 Thread madhuri yewale
how to run simple hello world cake php program using xampp?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: GoogleMapV3 Helper issue

2012-05-25 Thread euromark
you must be doing sth wrong. this is usually a JS error.
if you use firefox and firebug extension you most likely can see the JS 
error in the firebug console at the bottom.


Am Freitag, 25. Mai 2012 09:56:06 UTC+2 schrieb Michael:
>
> So I have been trying to get this to work but still cannot seem to 
> work through it. 
>
> I am using this version: 
> https://github.com/dereuromark/cakephp-google-map-v3-helper 
>
> And following this explanation: 
>
> http://stackoverflow.com/questions/8795104/google-map-v3-cakephp-helper-and-multiple-markers
>  
>
> But I cannot seem to get it to show up and all I get when I try to 
> display the map is "Map cannot be displayed!" 
> I have turned off all my css in hopes that would solve it, but no 
> luck. I am running Cake 2.1 and trying to get this working on my 
> localhost, which is connected to the internet. Any help would be most 
> welcome. Thanks in advance. 
>
> ~Michael 
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: compare and update database records at once.

2012-05-25 Thread Mike Griffin
On Fri, May 25, 2012 at 6:48 AM, Teji  wrote:
> foreach($file['NewDataSet']['Products'] as $products):
>            {
>                $tp['text']=$products[1];
>                $tp['date']=$products[2];
>               $this->model->saveall($tp);
>     }endforeach;
>
> bt now i want to match this $file data with the existing records in
> database. if it match then update that record else make a new entry..
>
> how can i do this.
> actually i dnt know how to compare my $file data with my database
> records.

Once again, look up how to use foreach, it doesn't need the colon and
the brackets.

But anyway...

foreach($file['NewDataSet']['Products'] as $products) {
  $tp['text']=$products[1];
  $tp['date']=$products[2];

  if($in_db = $this->model->find('first', array('conditions' =>
array('text' => $tp['text'] {
// The entry is in the database, just update it
$tp['id'] = $in_db['model']['id'];
  } else {
// The entry is not in the database, create it
$this->model->create($tp);
  }
  // do the save stuff here, if there is an id, it gets edited,
otherwise it gets saved
}

I think that could be a starting point for you.

Mike.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Model Associations

2012-05-25 Thread Mike Griffin
On Thu, May 24, 2012 at 7:37 PM, hill180  wrote:
> Solved:  But I don't know why.  This but this code puts the data where I
> want it, and without the index error:
>

Good to hear, glad I could help.

Mike

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


GoogleMapV3 Helper issue

2012-05-25 Thread Michael Gaiser
So I have been trying to get this to work but still cannot seem to
work through it.

I am using this version:
https://github.com/dereuromark/cakephp-google-map-v3-helper

And following this explanation:
http://stackoverflow.com/questions/8795104/google-map-v3-cakephp-helper-and-multiple-markers

But I cannot seem to get it to show up and all I get when I try to
display the map is "Map cannot be displayed!"
I have turned off all my css in hopes that would solve it, but no
luck. I am running Cake 2.1 and trying to get this working on my
localhost, which is connected to the internet. Any help would be most
welcome. Thanks in advance.

~Michael

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php