SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Aug 2004
    Location
    Calagary, Canada
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cant connect to mysql 4.0.20-0

    The following page does not connect to mysql,
    and does not diagnose a faillure to connect.

    <html>
    <head></head>
    <body>
    <p>php test page</p>
    <?php
    echo 'This is a test of mysql 4.x access from php.';

    $link = mysql_connect('localhost', 'root');
    if (!$link) {
    die('Could not connect: ' . mysql_error());
    }
    echo 'Connected successfully';
    mysql_close($link);
    ?>
    </body>
    </html>

    I run Fedora RC2, and am in the process of upgrading from mysql 3.23.58-9
    to 4.0.20-0. The new version has run all benchmarks (written in perl)
    successfully, and I can create and access databases with it.

    My only problem (test case above) is accessing the database from
    php 4.3.4, which is the version of php installed in Fedora RC2. I have used
    the phpinfo() function to confirm that MySQL is supported, and it seems to
    be:
    a) the clause '--with-mysql=shared,/usr' is in the configure command
    b) dbx lists MySQL as supported.

    Questions
    ----------
    How do I see more information about the failure, whatever it is? (php newbie)
    Is is necessary to upgrade from php 4.3.4 to connect to mysql 4.x ?

    Bill.

  2. #2
    SitePoint Wizard Lats's Avatar
    Join Date
    Jun 2003
    Location
    Melbourne, AU
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you getting any output on the screen for this?
    Lats...

  3. #3
    SitePoint Member
    Join Date
    Aug 2004
    Location
    Calagary, Canada
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Lats
    Are you getting any output on the screen for this?
    If you mean output in the browser - NO.

  4. #4
    SitePoint Wizard Lats's Avatar
    Join Date
    Jun 2003
    Location
    Melbourne, AU
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, what do you see if you select 'View Source' of the blank page?
    Lats...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •