Php5/mysql5

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • opswordfish
    New Member
    • Feb 2008
    • 4

    Php5/mysql5

    Hi

    I've visited a lot of forums regarding getting MySQL5 working with PHP5 in IIS and it seems that with MYSQL5 you need to use mysqli in PHP and that you need to uncomment the extension in php.ini

    However I have tried both of these and I still get the error:

    Fatal error: Call to undefined function mysqli_connect( )

    I was wondering if somebody can help? It's probably something simple I've forgot to do.

    Thanks

    Alex
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    You do not HAVE to use mysqli when you use PHP 5. You can just continue with MySQL.

    Have you stored the .dll in a reachable folder that is in the nysql path?
    As with enabling any PHP extension (such as php_mysqli.dll) , the PHP directive extension_dir should be set to the directory where the PHP extensions are located
    Ronald

    Comment

    • opswordfish
      New Member
      • Feb 2008
      • 4

      #3
      Originally posted by ronverdonk
      You do not HAVE to use mysqli when you use PHP 5. You can just continue with MySQL.

      Have you stored the .dll in a reachable folder that is in the nysql path?
      Ronald
      I tried using mysql as well but that didn't work either. I just looked in my php.ini file and the extension directory seems right and the mysqli dll file is enabled. I've also added C:/PHP/ to the path. There's probably something very simple I'm doing wrong but I have no idea what it is.

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        Originally posted by opswordfish
        I tried using mysql as well but that didn't work either. I just looked in my php.ini file and the extension directory seems right and the mysqli dll file is enabled. I've also added C:/PHP/ to the path. There's probably something very simple I'm doing wrong but I have no idea what it is.
        It would help to see your connection code...

        Comment

        • opswordfish
          New Member
          • Feb 2008
          • 4

          #5
          Originally posted by markusn00b
          It would help to see your connection code...
          My Connection code is as follows (without user/password):

          Code:
          <?php
          
          $link = mysqli_connect("mysql8.streamline.net", "", "");
          
          ?>
          I dont think that is the problem as I've tried it on a working Apache Server with PHP and MySQL and it works fine. PHP works fine on the IIS Web Server except the mysql functions just aren't recognised. If somebody has got php5.25 working with mysql I would be appreciative if I could see the php.ini file and php directory as I could be missing a line of code or a file somewhere.

          Comment

          Working...