Re: Media Temple server seems to be closing mysql connections after every query

2008-12-16 Thread Lucho Molina

Thanks. It was caused by the version of PHP that was installed (4.1),
I missed that. Moved to 5.0 and worked

On Dec 14, 4:29 pm, Brett Wilton bdwil...@gmail.com wrote:
 I assume this is on the grid and your using the latest cakephp ?

 I'm using the grid and aren't having any problems with adding records
 via MySQL, have you set the grid to use PHP 5 rather than 4 ?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Media Temple server seems to be closing mysql connections after every query

2008-12-14 Thread Brett Wilton

I assume this is on the grid and your using the latest cakephp ?

I'm using the grid and aren't having any problems with adding records
via MySQL, have you set the grid to use PHP 5 rather than 4 ?

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Media Temple server seems to be closing mysql connections after every query

2008-12-11 Thread Lucho Molina

Hello.

I'm having problems running an application in Media Temple: the
LAST_INSERT_ID() command always returns 0 from autoincremented id
tables, to both our application and to the phpMyAdmin console. Above,
you'll find a sample of what I've been trying to do unsuccesfully:

INSERT INTO `contacts`
(`contact_type_id`,`first_name`,`last_name`,`email`,`phone`,`website`,`message`,`created`)
VALUES (2,'Test','Test','t...@test.com','','','Lorem ipsum dolor sit
amet, consectetur adipiscing elit. ','2008-12-09 19:54:38')

= OK, 1 row inserted, checked in the table ande there is the new
value with an autogenerated id.

SELECT LAST_INSERT_ID() AS insertID

= 0 --- Wrong!

I wrote them to see if they had an idea of what was going on, and they
replied saying that I must be using separated connections and that I
should try running the queries together separated by semicolon, which,
of course, worked in phpMyAdmin, but, in cakePHP it doesn't make
sense.

I have a version of my CakePHP application running locally with MySQL
5.0 (Media Temple has 4.1, although that shouldn't matter, supposedly)
and it works fine. It seems then that, somehow, the DB is closing the
connection with the application after every single query in the same
request, which is just weird.

BTW, I'm using persistent connections and the mysql block in my php
config is just like theirs (I checked it via phpinfo()), except for
the version, but, again, it shouldn't matter.

Any ideas?

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---