SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can one use mysql5 with php4?

    Hi guys

    I've seen that mysql 5x has some nice interesting stuffs compared to the 4x series. But then, i'm using php4x and prefer to remain with php4x for sometime. Do I need php5x to use mysql5x, or I can use mysql5x with php4x (4.1.21-standard, to be exact).

    Anyone? Thanks.

  2. #2
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use MySQL 5 from PHP 4.

  3. #3
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, thanks. Just one more thing, if I ask my server guys to upgrade my mysql from 4x to 5x, will it change anything for my existing users, since I have a number of databases build on that mysql 4x, I mean, do I need to fine tune anything or just changing will do, users won't have any problem in the front end.

    Thanks again.

  4. #4
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,807
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    It's pretty well documented......
    http://dev.mysql.com/doc/refman/5.0/en/news-5-0-x.html

    In fact, there is a good overview on http://dev.mysql.com/doc/refman/5.0/...-from-4-1.html that details some of the major changes
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  5. #5
    SitePoint Wizard bronze trophy devbanana's Avatar
    Join Date
    Apr 2006
    Location
    Pennsylvania
    Posts
    1,736
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Only thing is, are you saying you have PHP 4.1, or am I misunderstanding something? That's a quite ancient version even of PHP4.

    But you know that php 5's been out for 3 years now?

  6. #6
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, it really depends. certain features (or even query syntaxes) that work in MySQL 4 do not not work in MySQL 5. For example, format of the TIMESTAMP column or how MySQL handles invalid dates. So, you better test your apps before upgrading.

  7. #7
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, in fact I'm using php 4.4.4 and mysql 4.1.21. I mean, the same reason here as well, I am afraid that a lot of my users will see their sites are not working suddenly as it should, if I change suddenly my php version to php 5x. Got any idea to solve this issue?

    Spike, thanks for the links.

    Another issue I am considering for sometime. Will recompiling mysql change something, i mean, if I need a recomplie of my mysql will that result in any loss / malfunction of any of my database / table / data?

  8. #8
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Kailash, that's clearer in that way. It means that I should not go for an upgrade immediately untill i have enough man power to handle all this issues in a short period of time ...

  9. #9
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,807
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    backup, backup and backup again - then try it!
    Really the only way to find out is to do it!
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  10. #10
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi, thanks Spike, yeah you are right here

  11. #11
    SitePoint Wizard bronze trophy devbanana's Avatar
    Join Date
    Apr 2006
    Location
    Pennsylvania
    Posts
    1,736
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, your first post made it sound like you were using php 4.1

    Do I need php5x to use mysql5x, or I can use mysql5x with php4x (4.1.21-standard, to be exact).
    What is the relationship with "your user"? If they are programming clients you're hosting, you should still have their projects, so I would install php5 and mysql5 locally and test them. If they are regular hosting clients, then tell them you'll be upgrading in x days or weeks and will answer any questions they have about the upgrade. Of course if you could afford it you should set up a test server with php5 and mysql5, and let them test their web sites on the test server.

    I'm only going on the fact that you said you have "Users", and not just your own web sites.

  12. #12
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, you are right, they are users, means clients ... yeah, one day I will have to decide to move to php5x and mysql5x ... decision ... decision ... Test server is a good idea ... let's see ...

    About the quote, yes, I was not clear ... lol

  13. #13
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Some queries may break from MySQL4 to 5. For example I had some selecting from 3 tables with a LEFT JOIN. I needed to add parenthesis around the table names in the query to get them working on MySQL5.

    You will need to test your apps unless they all use really simple queries like SELECT field FROM table WHERE ID=1 ... not much room for differentiation there
    mikehealy.com.au
    diigital.com art, design . Latest WorkSaturday Morning

  14. #14
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks cranial, yeah this is what I should do ... but as it goes, it seems that i will really have to prepare for several days for bug fine tunings and bug fixings once i'm moved to 5x.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •