Manually add MySQL access to PHP via php.ini

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • angusfreefa
    New Member
    • Sep 2009
    • 11

    Manually add MySQL access to PHP via php.ini

    I saw on the web saying that MYSQL is no longer bulit in PHP 5 and need some manually add in "libmySQL.d ll" in system32, then remove the ";" in front of "extension=php_ msql.dll ." in php.ini

    but below is the only extension i could find inside the php.ini, there is only extension=mysql .so but no extension=php_m sql.dll

    If you wish to have an extension loaded automatically, use the following
    Code:
    ; syntax:
    ;
    ;   extension=modulename.extension
    ;
    ; For example, on Windows:
    ;
    ;extension=mysql.so 
    ;
    ; ... or under UNIX:
    ;
    ;   extension=php5_msql.so
    What should i do to make it work? when i changed the bolded statment to extension=php_m sql.dll, Apache is having error.
  • philipwayne
    New Member
    • Mar 2010
    • 50

    #2
    Make sure the extension directory is correct.

    Also msql is not mysql its mini sql ( which isn't installed by default ) you need to comment out the one with php_mysql.dll.

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Hey.

      If the line isn't in your php.ini you can just add it. Make sure the "extension_ dir" directive is also set correctly and that the DLL (php_mysql.dll) is actually in there.

      If you are just trying to set up a local server to work on, you may want to try something like the XAMPP package. It sets up Apache, PHP, MySQL, and a bunch of other commonly used things, so you don't have to manually set it all up yourself. (Note, this should only be used for development server, not production servers! Not without some major config changes, at least.)

      Comment

      • angusfreefa
        New Member
        • Sep 2009
        • 11

        #4
        Thanks Atli, XAMPP does help a lot.

        Comment

        • Markus
          Recognized Expert Expert
          • Jun 2007
          • 6092

          #5
          For future referrence, the documentation covers this (http://uk3.php.net/manual/en/mysql.installation.php - Installation on Windows PHP5+)

          And don't put your .dlls in the system32 directory!

          Comment

          Working...