7 Replies - 1930 Views - Last Post: 14 August 2012 - 05:23 PM Rate Topic: -----

#1 racidon  Icon User is offline

  • D.I.C Head

Reputation: 59
  • View blog
  • Posts: 172
  • Joined: 27-August 11

MySQL 4.0 on PHP 5.5

Posted 14 August 2012 - 05:48 AM

Sadly I can't just upgrade mysql to 5 or anything, because the server application that runs this mysql database, if anything but 4.0 is used it screws all the data up in the rows.
I also can't downgrade because the php server and scripts also have to interact with SMF 2.0 which requires atleast version 5.3 I think?

So basically I'm wondering is there any kind of "hack" I can do to connect to mysql 4.0 using PDO?
Do I need to edit some stuff in the pdo php files?

Is This A Good Question/Topic? 0
  • +

Replies To: MySQL 4.0 on PHP 5.5

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: MySQL 4.0 on PHP 5.5

Posted 14 August 2012 - 06:18 AM

Quote

if anything but 4.0 is used it screws all the data up in the rows


Can you be a little clearer as to what this means? There may be a way to get around this. I mean, you can't stay on a really old version of MySQL forever.

In any event, according to the docs there's no reason you can't use PDO with MySQL 4.0, or even 3.x.
Was This Post Helpful? 1
  • +
  • -

#3 racidon  Icon User is offline

  • D.I.C Head

Reputation: 59
  • View blog
  • Posts: 172
  • Joined: 27-August 11

Re: MySQL 4.0 on PHP 5.5

Posted 14 August 2012 - 06:23 AM

I mean the person who wrote the server applications we use (c++ - compiled, so I can't edit them) screwed up how values are handled when being written to the database, so values change in some very odd ways. So changing versions is out of the question.

I guess I may be able to just install php 5.3 as I just read the docs as you suggested and read the following in the change log:

5.4.0 MySQL client libraries 4.1 and below are no longer supported.


So 5.3 php should support it where as >5.3 doesn't
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: MySQL 4.0 on PHP 5.5

Posted 14 August 2012 - 06:34 AM

Oh shit, missed the 5.5. Sorry about that.
Was This Post Helpful? 1
  • +
  • -

#5 racidon  Icon User is offline

  • D.I.C Head

Reputation: 59
  • View blog
  • Posts: 172
  • Joined: 27-August 11

Re: MySQL 4.0 on PHP 5.5

Posted 14 August 2012 - 06:47 AM

either way thanks :D
Was This Post Helpful? 0
  • +
  • -

#6 racidon  Icon User is offline

  • D.I.C Head

Reputation: 59
  • View blog
  • Posts: 172
  • Joined: 27-August 11

Re: MySQL 4.0 on PHP 5.5

Posted 14 August 2012 - 07:22 AM

So version 5.3.13 is still having this problem :(

Should I use 2 php servers (as this is a possibility for us) one with say php4 and execute the script externally getting the data I require from the older database?
Also if this is a possibility and able to be done (prefer securely, as this will involve user names and passwords) how do I send this data securely between servers without the user being able to send the server fake data?
Was This Post Helpful? 0
  • +
  • -

#7 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: MySQL 4.0 on PHP 5.5

Posted 14 August 2012 - 07:42 AM

Not understanding the problem set completely, nor your systems' architecture, (or really the intricacies of MySQL/PHP integration at the extension level) is there any reason you couldn't use the old mysql library for access to the older system, alongside PDO for other access?
Was This Post Helpful? 0
  • +
  • -

#8 racidon  Icon User is offline

  • D.I.C Head

Reputation: 59
  • View blog
  • Posts: 172
  • Joined: 27-August 11

Re: MySQL 4.0 on PHP 5.5

Posted 14 August 2012 - 05:23 PM

ok I have server X
This has
Mysql 4.0 (can't be changed)
This database contains a lot of user data for an online game.

Now we also have server Y
This has
MySQL 5.5
Php 5.3 (Can't be changed)
This database contains forum information

I am creating a system that allows users to manage their game accounts via their forum accounts, so I need access to both databases.

But apparently even 5.3 is not compatible with mysql 4.0


Error:
Warning: PDO::__construct() [<a href='pdo.--construct'>pdo.--construct</a>]: Connecting to 3.22, 3.23 &amp; 4.0 is not supported. Server is 4.0.21-nt in C:\wamp\www\scripts\database.php on line 138

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1