Re: Problems with query functions on production server

2008-06-24 Thread Sanfly

Now I have another problem with differences on my production and
development servers

Im using $ajax-editor to update a field (bg_notes).  On my home
development server, this works fine regardless of debug mode.

On my actual website, it didnt seem to be updating the database (i
would make the change, the right value would return in my text area,
but when I refresh it would go back to the previous value, and when I
checked the database in phpMyAdmin it hadnt been updated)

So i quickly changed the debug mode on my live website to '2' (Silly I
know, but I dont know how to display debug info on one page when the
site is set to '0', if anyone can tell me would appreciate), tried
again, copied the debug info, which didnt show any errors.

Then when I did the refresh, It appeared that it had worked!! I
checked the database, and indeed it had been updated!!!

But when I flicked the debug mode back to '0' it no longer works
again  aggg.

Any ideas what is going on here?  How can I diagnose the problem if
there isnt one when its in full debug mode?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problems with query functions on production server

2008-06-24 Thread Chris Hartjes

On Tue, Jun 24, 2008 at 4:37 PM, Sanfly [EMAIL PROTECTED] wrote:

 So i quickly changed the debug mode on my live website to '2' (Silly I
 know, but I dont know how to display debug info on one page when the
 site is set to '0', if anyone can tell me would appreciate), tried
 again, copied the debug info, which didnt show any errors.

 Then when I did the refresh, It appeared that it had worked!! I
 checked the database, and indeed it had been updated!!!

 But when I flicked the debug mode back to '0' it no longer works
 again  aggg.

 Any ideas what is going on here?  How can I diagnose the problem if
 there isnt one when its in full debug mode?

Any time you go from debug '0' to another debug setting, make sure
that you delete stuff in APP/tmp before you switch back.  The fact
that the code works when debug = 2 means that it will work just fine
when debug = 0.  It's probably crashing because you have cached model
and other information in APP/tmp.

Always good practice to delete stuff in APP/tmp every time you put a
change into production as well.  Just my opinion.


-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problems with query functions on production server

2008-06-23 Thread Sanfly

Hi all

I seem to have a crazy problem with my production server that I dont
see on my development one.  Unfortunately the production server is
hosted by a third party and quite out of date (still using php4
etc) while my new one is based on a fresh WAMP installation, about
4 months ago (php5 etc...)

Before I go trying to download old versions of apache, php and mysql
to replicate the production server, I thought I would ask about my
problem here incase anyone knows a solution

When using functions such as find(), findAll(), even findBy, ive found
that in the fields attribute I have to define the fields attribute as
* for default value

Eg:  I might have a query

$members = $this-Member-findAll(active = '1', *);

If i just do it like the one below, it works on my development server,
but not production:

$members = $this-Member-findAll(active = '1');

I was hoping this might be an easy fix with some php setting I can
edit?  If anyone has a solution or idea I would love to hear it

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---