PHP 5 & MySQL 5 Together? Problems?
Has anyone heard anything about problems with running PHP5 and MySQL 5 together?
I read it somewhere yesterday..and can't find it again....still trying to figure out what the hell a clients host did to screw up pMachine's calendar when they erhmmm.....'upgraded' on December 15th.
Roo
andy206uk posted this at 11:51 — 23rd January 2007.
He has: 1,758 posts
Joined: Jul 2002
From my experience, MySQL 5 still seems to have a few stability issues compared to version 4 - but it should work perfectly with PHP5 unless the host has screwed up a setting somewhere during installation...
Andy
Roo posted this at 23:22 — 24th January 2007.
She has: 840 posts
Joined: Apr 1999
It would seem that when they did the upgrade the table pm_events was completely removed. It is no longer present on any of the four sites my client has hosted with them (Omnis). And they keep passing the buck and they are not owning up to the fact that whatever happened was the result of thier upgrade.
Roo
andy206uk posted this at 11:18 — 25th January 2007.
He has: 1,758 posts
Joined: Jul 2002
Hmmmm... tough one. Upgrading shouldn't have caused any tables to be deleted as far as I know. If the **** up had been that severe it would have more likely deleted everything! I assume your client hasn't been taking any backups?
Andy
Roo posted this at 00:05 — 30th January 2007.
She has: 840 posts
Joined: Apr 1999
No, no backups.
Another question....
This host give the option of using PHP 4 OR PHP 5 in the user CP. Could the issue be caused by there being TWO versions of PHP running on the server?
We are currently using PHP 5, as turning things back to PHP 4 did nothing solve the problems.
Maybe some issue with PHP 4 & 5 & MySQL 5 all on the same server?
This whole thing is driving me mad!
Roo
andy206uk posted this at 13:18 — 30th January 2007.
He has: 1,758 posts
Joined: Jul 2002
It's possible but at the same time impossible to say, not knowing exactly how they have the server setup.
How do you switch between 4 and 5? On my hosting you use .php for php4 and .php5 files if you want php5 and it works flawlessly.
At the end of the day I don't think you'll be getting the table back, so you'll be best just to set it up again and start from scratch.
Of course, any intelligent host would have made a complete backup before upgrading... the table might still be available.
Andy
Roo posted this at 01:48 — 7th February 2007.
She has: 840 posts
Joined: Apr 1999
Well it looks like they have found the issue....
Dear Customer:
I've discovered the problem. With the installation of MySQL 5, the
word 'repeat' is now a reserved word. The pm_events table contains a
field named 'repeat' so the SQL being executed to insert a new event
is failing. Is there a new version of pMachine?
Only the (site name) account is missing the table. During the
re-installation of pMachine, the SQL to re-create the pm_events table
failed because it tries to create a field named 'repeat'. Because
that is now a reserved word, the field can not be named 'repeat' so
the create table command failed.
If a new version of pMachine is not available, the hack is to wrap
the field name in all the queries with backticks (`). For example, on
(site name)/cp/events.cp.php on lines
418 and 419 the insert into the table is:
$query = new DB_query($DB, "insert into $db_events
(id,link_id,repeat,t_stamp,year,month,day,show_time,title,description)
values
('','$link_id','$repeat','$t_stamp','$evyear','$evmonth','$evday','$show_time','$title','$description')");
If you change it to:
$query = new DB_query($DB, "insert into $db_events
(id,link_id,`repeat`,t_stamp,year,month,day,show_time,title,description)
values
('','$link_id','$repeat','$t_stamp','$evyear','$evmonth','$evday','$show_time','$title','$description')");
The insert will work. Any place the repeat field name is used, wrap
it in backticks.
Roo
andy206uk posted this at 08:54 — 7th February 2007.
He has: 1,758 posts
Joined: Jul 2002
Son of a *****
It looks like they didn't just upgrade MySQL - they reinstalled it from scratch and then re-imported the data. Looks to me like they didn't bother reading the error messages or had them set to ignore during the import - MySQL would definitely have flagged that up as a problem.
Andy
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.