Cannot connect to MySQL through php on WindowsXP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • php-newbe

    Cannot connect to MySQL through php on WindowsXP

    I can conntect to mySQL thouth the mySQL monitor, but I cannot access
    it thorugh php script.

    After PHP5 installation I had uncommented "extention_php_ mysql.dll" in
    php.ini file.
    I copied libmysql.dll from MySQL installation file to php directory
    overriding the pre-installed file.
    I also Edit the PATH in the system path = ;c:/php

    I still cannot access mySQL!

    Please, help
    THank you
    Vera

  • Patrick Schlangen

    #2
    Re: Cannot connect to MySQL through php on WindowsXP

    Hi,

    On 2006-08-19 22:27:41 +0200, "php-newbe" <veraburenin@ve rizon.netsaid:
    I still cannot access mySQL
    can you post the error message you get from PHP while trying to connect
    to your database?
    You might have to set "display_errors " to "on" and "error_reportin g" to
    "E_ALL & ~E_NOTICE" if you don't see any error messages.

    Patrick

    Comment

    • php-newbe

      #3
      Re: Cannot connect to MySQL through php on WindowsXP


      Patrick Schlangen wrote:
      Hi,
      >
      On 2006-08-19 22:27:41 +0200, "php-newbe" <veraburenin@ve rizon.netsaid:
      I still cannot access mySQL
      >
      can you post the error message you get from PHP while trying to connect
      to your database?
      You might have to set "display_errors " to "on" and "error_reportin g" to
      "E_ALL & ~E_NOTICE" if you don't see any error messages.
      >
      Patrick
      Thank you, Patrick
      The error says: "Call undefined function mysql_connect() ".
      I undertand that something wrong with the php_mysql.dll file.

      Vera

      Comment

      • Jerry Stuckle

        #4
        Re: Cannot connect to MySQL through php on WindowsXP

        php-newbe wrote:
        I can conntect to mySQL thouth the mySQL monitor, but I cannot access
        it thorugh php script.
        >
        After PHP5 installation I had uncommented "extention_php_ mysql.dll" in
        php.ini file.
        I copied libmysql.dll from MySQL installation file to php directory
        overriding the pre-installed file.
        I also Edit the PATH in the system path = ;c:/php
        >
        I still cannot access mySQL!
        >
        Please, help
        THank you
        Vera
        >
        What does phpinfo() show? And does it show you're using the php.ini
        file you think you're using?

        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • chrisv

          #5
          Re: Cannot connect to MySQL through php on WindowsXP


          php-newbe wrote:
          I can conntect to mySQL thouth the mySQL monitor, but I cannot access
          it thorugh php script.
          >
          After PHP5 installation I had uncommented "extention_php_ mysql.dll" in
          php.ini file.
          I copied libmysql.dll from MySQL installation file to php directory
          overriding the pre-installed file.
          I also Edit the PATH in the system path = ;c:/php
          >
          I still cannot access mySQL!
          >
          Please, help
          THank you
          Vera
          Some quick suggestions:

          1. you commented "extension_php_ mysql.dll". that doesn't help with
          PHP5. version 5 utilizes the msyqli.dll. you need to create a line in
          php.ini that says "extenstion_php _mysqli.dll".

          2. make sure the path to php 'extensions' is correct in the php.ini
          file.

          3. if you downloaded php5 from php.net, there are two dlls for mysql.
          one is the the 'mysql.dll' and the other is 'mysqli.dll'. make sure
          you have a copy of the mysqli.dll in your C:/windows/system directory.


          just some ideas

          Comment

          • Andy Hassall

            #6
            Re: Cannot connect to MySQL through php on WindowsXP

            On 21 Aug 2006 09:27:04 -0700, "chrisv" <nickadeemus200 2@gmail.comwrot e:
            >php-newbe wrote:
            >I can conntect to mySQL thouth the mySQL monitor, but I cannot access
            >it thorugh php script.
            >>
            >After PHP5 installation I had uncommented "extention_php_ mysql.dll" in
            >php.ini file.
            >I copied libmysql.dll from MySQL installation file to php directory
            >overriding the pre-installed file.
            >I also Edit the PATH in the system path = ;c:/php
            >>
            >I still cannot access mySQL!
            >
            >Some quick suggestions:
            >
            >1. you commented "extension_php_ mysql.dll". that doesn't help with
            >PHP5. version 5 utilizes the msyqli.dll. you need to create a line in
            >php.ini that says "extenstion_php _mysqli.dll".
            That's misinformation; the "old" mysql extension works fine on PHP5. You are
            not forced to use mysqli.

            You also have to spell extension correctly, and use an equals sign, not more
            underscores.

            extension=php_m ysql.dll

            Or:

            extension=php_m ysqli.dll
            >2. make sure the path to php 'extensions' is correct in the php.ini
            >file.
            >
            >3. if you downloaded php5 from php.net, there are two dlls for mysql.
            >one is the the 'mysql.dll' and the other is 'mysqli.dll'. make sure
            >you have a copy of the mysqli.dll in your C:/windows/system directory.
            No, don't copy things to windows/system, use the PATH environment variable.

            --
            Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
            http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

            Comment

            Working...