1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Enable PHP5 + MySQL Support

Discussion in 'PHP' started by obenix, Nov 7, 2005.

  1. #1
    I've just installed PHP5/MySQL5/Apache2 on my new laptop running Windows XP.
    I copied the PHP scripts and re-created my SQL tables from my old laptop but alas, it does not work on my new laptop.

    After 1 whole day (I'm slow :p) of checking, I found out the PHP5 does not enable MySQL by default. So, I proceeded to read all about getting it enabled. PHP.net is either overly helpful or I'm plain dumb (I would like to think the former is true :D).

    Can someone please point out how to enable MySQL for PHP5. Thanks.
     
    obenix, Nov 7, 2005 IP
  2. hnn

    hnn Peon

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Edit php.ini and load the module mysql.dll.

    This modules is not included in the MSI package, but you can find it in the ZIP package.
     
    hnn, Nov 7, 2005 IP
    obenix and frankm like this.
  3. obenix

    obenix Eats an apple a day......

    Messages:
    2,236
    Likes Received:
    180
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks hnn.. I've already did that. Here's what I have done:
    - Use the zip instead of msi
    - amended extension_dir = "c:\php\ext"
    - added extension=php_mysql.dll
    - environment path set to c:\php
     
    obenix, Nov 7, 2005 IP
  4. hnn

    hnn Peon

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Whats the error?
    Tried with a phpinfo() page?
     
    hnn, Nov 7, 2005 IP
  5. hnn

    hnn Peon

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Also....

    Copy the libmysql.dll (or something) to C:\Windows\System32
     
    hnn, Nov 7, 2005 IP
  6. obenix

    obenix Eats an apple a day......

    Messages:
    2,236
    Likes Received:
    180
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Damn it!! All I had to do was restart the laptop. :mad:

    Never thought that I needed to do so... :(
     
    obenix, Nov 7, 2005 IP
  7. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #7
    And now you feel soooooooooooooo stupid.

    thanks for sharing :) This will get me thru the next windows "WTF!"-moment.
     
    frankm, Nov 7, 2005 IP
    obenix likes this.