Re: Strange error passing from windows to linux

2011-04-10 Thread Mariano C.
You were right, in related table (carriers) there's not an id field.
That's why the table is just a joining table. Matter of fact id field
never been present in this table, and never this has been adviced as
warning.

Models are setted in this way:
Carrier belongsTo Season, Team, Player
Season, Team, Player hasMany Carrier

This is the carriers table
Array
(
[player_id] => Array
(
[type] => integer
[null] =>
[default] =>
[length] => 11
)

[team_id] => Array
(
[type] => integer
[null] =>
[default] =>
[length] => 11
)

[season_id] => Array
(
[type] => integer
[null] =>
[default] =>
[length] => 11
)

[shirtnumber] => Array
(
[type] => integer
[null] =>
[default] => 0
[length] => 2
)

[gk] => Array
(
[type] => boolean
[null] =>
[default] => 0
[length] => 1
[comment] => goalkeeper
)

[role] => Array
(
[type] => boolean
[null] =>
[default] => 0
[length] => 1
[comment] => 0: simple / 1: vice-captain / 2: captain
)

[created] => Array
(
[type] => datetime
[null] =>
[default] =>
[length] =>
)

)

On 9 Apr, 19:37, cricket  wrote:
> On Sat, Apr 9, 2011 at 5:40 AM, Mariano C.  wrote:
> > Wherever I put this debug($this->MyModel::schema()) i get:
> > T_PAAMAYIM_NEKUDOTAYIM php error :(
>
> You shouldn't use the double colon syntax like that.
>
> debug($this->MyModel->schema());

-- 
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: Strange error passing from windows to linux

2011-04-09 Thread cricket
On Sat, Apr 9, 2011 at 5:40 AM, Mariano C.  wrote:
> Wherever I put this debug($this->MyModel::schema()) i get:
> T_PAAMAYIM_NEKUDOTAYIM php error :(

You shouldn't use the double colon syntax like that.

debug($this->MyModel->schema());

-- 
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: Strange error passing from windows to linux

2011-04-09 Thread Miloš Vučinić
I just read this so I might say something that has already been said..
The key difference in web programing between windows and linux is that
linux is case sensetive and windows is not. Especialy when it comes to
database. I know that because I had some java project in windows and
lost a whole day to figure out why it doesn't work in Linux.

So you need to check the way you reference to your key in database. If
you use a field with wrong case in Linux such as User.UserFirstName
instead of User.user.firstname you will have a problem.

I would look for that, because you error indicates that you tried to
access field that you do not have, and since your app works in
windows, I gues that most probably your problem is in case sensitivity
in linux.. And I think you can't turn it off, so youll need to check
for every usage of indexes in model..
All the best
Milos

On Apr 9, 11:40 am, "Mariano C."  wrote:
> Wherever I put this debug($this->MyModel::schema()) i get:
> T_PAAMAYIM_NEKUDOTAYIM php error :(
>
> On 8 Apr, 21:23, cricket  wrote:
>
> > On Fri, Apr 8, 2011 at 2:28 PM, Mariano C.  
> > wrote:
> > > I suppose, I've just made a dump
>
> > What is the primary key for the model? Is it id? The error is telling
> > you that the model thinks the PK is id but that the database is saying
> > something else. Put debug($this->YourModel::schema()) somewhere so you
> > can see what the DB source is returning.

-- 
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: Strange error passing from windows to linux

2011-04-09 Thread Mariano C.
Wherever I put this debug($this->MyModel::schema()) i get:
T_PAAMAYIM_NEKUDOTAYIM php error :(

On 8 Apr, 21:23, cricket  wrote:
> On Fri, Apr 8, 2011 at 2:28 PM, Mariano C.  wrote:
> > I suppose, I've just made a dump
>
> What is the primary key for the model? Is it id? The error is telling
> you that the model thinks the PK is id but that the database is saying
> something else. Put debug($this->YourModel::schema()) somewhere so you
> can see what the DB source is returning.

-- 
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: Strange error passing from windows to linux

2011-04-08 Thread cricket
On Fri, Apr 8, 2011 at 2:28 PM, Mariano C.  wrote:
> I suppose, I've just made a dump

What is the primary key for the model? Is it id? The error is telling
you that the model thinks the PK is id but that the database is saying
something else. Put debug($this->YourModel::schema()) somewhere so you
can see what the DB source is returning.

-- 
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: Strange error passing from windows to linux

2011-04-08 Thread Mariano C.
I suppose, I've just made a dump

On 8 Apr, 19:40, cricket  wrote:
> On Fri, Apr 8, 2011 at 4:11 AM, Mariano C.  wrote:
> > Disparity among DB' structure and?
>
> Are the databases identical?

-- 
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: Strange error passing from windows to linux

2011-04-08 Thread cricket
On Fri, Apr 8, 2011 at 4:11 AM, Mariano C.  wrote:
> Disparity among DB' structure and?

Are the databases identical?

-- 
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: Strange error passing from windows to linux

2011-04-08 Thread Mariano C.
Disparity among DB' structure and?

On 8 Apr, 03:25, cricket  wrote:
> On Thu, Apr 7, 2011 at 4:47 PM, Mariano C.  wrote:
> > I starting developing my app on windows on Apache/MySQL/PHP
> > environment, today i've copied my htdocs directory returned on my
> > ubuntu, again under AMP environment (and paste my htdocs).
>
> > Every things work quite good, but sometimes I have error like:
> > Notice(8) Undefined index: id [CORE/cake/libs/model/model.php, line
> > 1329]
> > Warnign(2) Cannot modify header information - headers already sent by
> > (output started at /opt/lampp/htdocs/cakephp/cake/libs/debugger.php:
> > 673) [CORE/cake/libs/controller/controller.php, line 742]
>
> Well, line 1329 is in save() method:
> $fInfo = $this->_schema[$this->primaryKey];
>
> It looks like you have some disparity in your table definitions.
>
> > Database operetions work as usual but there's this little problem.
> > Anyway if I set debug to 0 this error disappear.
>
> That's because the notice is being suppressed.

-- 
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: Strange error passing from windows to linux

2011-04-07 Thread cricket
On Thu, Apr 7, 2011 at 4:47 PM, Mariano C.  wrote:
> I starting developing my app on windows on Apache/MySQL/PHP
> environment, today i've copied my htdocs directory returned on my
> ubuntu, again under AMP environment (and paste my htdocs).
>
> Every things work quite good, but sometimes I have error like:
> Notice(8) Undefined index: id [CORE/cake/libs/model/model.php, line
> 1329]
> Warnign(2) Cannot modify header information - headers already sent by
> (output started at /opt/lampp/htdocs/cakephp/cake/libs/debugger.php:
> 673) [CORE/cake/libs/controller/controller.php, line 742]

Well, line 1329 is in save() method:
$fInfo = $this->_schema[$this->primaryKey];

It looks like you have some disparity in your table definitions.

> Database operetions work as usual but there's this little problem.
> Anyway if I set debug to 0 this error disappear.

That's because the notice is being suppressed.

-- 
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


Strange error passing from windows to linux

2011-04-07 Thread Mariano C.
I starting developing my app on windows on Apache/MySQL/PHP
environment, today i've copied my htdocs directory returned on my
ubuntu, again under AMP environment (and paste my htdocs).

Every things work quite good, but sometimes I have error like:
Notice(8) Undefined index: id [CORE/cake/libs/model/model.php, line
1329]
Warnign(2) Cannot modify header information - headers already sent by
(output started at /opt/lampp/htdocs/cakephp/cake/libs/debugger.php:
673) [CORE/cake/libs/controller/controller.php, line 742]

Database operetions work as usual but there's this little problem.
Anyway if I set debug to 0 this error disappear.

What error is this???

-- 
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