mysql / php5 configuration

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jcoder

    mysql / php5 configuration

    im using win xp and installed apache 2.x and php5...both working fine.
    when i test:

    <?php
    phpinfo();
    ?>

    it works fine. trouble starts when i started installing mysql 4.x
    server on the same machine. mysql run successfully but the issue is i
    cant integrate it with php. i already copied -- php_mysql.dll on my
    \php\ext and libmysql.dll on \php as well as on \windows\system 32.

    also i made necessary changes on php.ini, but when i run :

    <?php
    mysql_connect(" localhost","roo t","123") or die("cannot connect");
    ?>

    it's not working. what could have gone wrong?

  • Jerry Stuckle

    #2
    Re: mysql / php5 configuration

    jcoder wrote:
    im using win xp and installed apache 2.x and php5...both working fine.
    when i test:
    >
    <?php
    phpinfo();
    ?>
    >
    it works fine. trouble starts when i started installing mysql 4.x
    server on the same machine. mysql run successfully but the issue is i
    cant integrate it with php. i already copied -- php_mysql.dll on my
    \php\ext and libmysql.dll on \php as well as on \windows\system 32.
    >
    also i made necessary changes on php.ini, but when i run :
    >
    <?php
    mysql_connect(" localhost","roo t","123") or die("cannot connect");
    ?>
    >
    it's not working. what could have gone wrong?
    >
    >
    What do you get for an error?

    If it's just "cannot connect", print a REAL informative message - such
    as that returned by mysql_error();

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

    Comment

    • jcoder

      #3
      Re: mysql / php5 configuration

      actually there's no error msg..it just gave me blank page.

      <?php
      mysql_connect(" localhost","roo t","123") or die("cannot connect");
      echo'ok';
      ?>

      even the work "ok" is not showing either. im wondering, if my password
      or username, or the host is wrong it should give me the msg "cannot
      connect", but there's nothing. and if i restart apache, no error msgs
      also.

      Comment

      • Dap

        #4
        Re: mysql / php5 configuration

        jcoder pisze:
        actually there's no error msg..it just gave me blank page.
        >
        <?php
        mysql_connect(" localhost","roo t","123") or die("cannot connect");
        echo'ok';
        ?>
        >
        even the work "ok" is not showing either. im wondering, if my password
        or username, or the host is wrong it should give me the msg "cannot
        connect", but there's nothing. and if i restart apache, no error msgs
        also.
        >
        try

        if (function_exist s(mysql_connect )) {
        mysql_connect(" localhost","roo t","123") or die("cannot connect");
        print('OK');
        } else {
        print ('I forgot about php_mysql');
        }

        What does it show ?
        also put error_reporting (E_ALL) at top of Your script

        D.

        Comment

        • Jerry Stuckle

          #5
          Re: mysql / php5 configuration

          jcoder wrote:
          actually there's no error msg..it just gave me blank page.
          >
          <?php
          mysql_connect(" localhost","roo t","123") or die("cannot connect");
          echo'ok';
          ?>
          >
          even the work "ok" is not showing either. im wondering, if my password
          or username, or the host is wrong it should give me the msg "cannot
          connect", but there's nothing. and if i restart apache, no error msgs
          also.
          >
          >
          OK, then in your php.ini file, enable display_errors and set
          error_reporting to E_ALL. That will get you some error messages.

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

          Comment

          • Henri

            #6
            Re: mysql / php5 configuration

            On Wed, 17 Oct 2007 20:29:23 -0700, jcoder wrote:
            im using win xp and installed apache 2.x and php5...both working fine.
            when i test:
            >
            <?php
            phpinfo();
            ?>
            >
            it works fine. trouble starts when i started installing mysql 4.x server
            on the same machine. mysql run successfully but the issue is i cant
            integrate it with php. i already copied -- php_mysql.dll on my \php\ext
            and libmysql.dll on \php as well as on \windows\system 32.
            >
            also i made necessary changes on php.ini, but when i run :
            >
            <?php
            mysql_connect(" localhost","roo t","123") or die("cannot connect");
            ?>
            >
            it's not working. what could have gone wrong?
            how can you tell it's not working?

            Comment

            Working...