User Profile

Collapse

Profile Sidebar

Collapse
Hendor
Hendor
Last Activity: Jun 1 '09, 02:45 AM
Joined: May 28 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Hendor
    replied to mysql_connect function isn't working
    in PHP
    I think that was just an extraordinarily unlikely typo. I had heard of both mysql and mysqli, and I knew I was looking for mysql. Or maybe I just copied and pasted it from somewhere without noticing the 'i'.

    Thanks for the tips, I'm sure they would have worked, but after changing so many settings over the past few days, I figured that even if I had fixed the problem, one of my other changes would have messed it up and I wouldn't know...
    See more | Go to post

    Leave a comment:


  • Hendor
    replied to mysql_connect function isn't working
    in PHP
    Ok, thanks. I've done that, restarted Apache and computer, but it's still not working. PHP seems to work just as before, but still returns "Bad" when I run that script.



    I've read a few things and looked through my php.ini. I found this:

    extension_dir=" C:\Program Files\PHP\ext"

    The phpinfo() function also returns that directory as the extension location. When I look in that PHP...
    See more | Go to post

    Leave a comment:


  • Hendor
    replied to mysql_connect function isn't working
    in PHP
    Thanks for your responses; I think Atli got it. I ran this script:
    Code:
    <?php
    if (function_exists('mysql_connect')) {
        echo "Good<br />\n";
    } else {
        echo "Bad.<br />\n";
    }
    ?>
    It returned "Bad", so the MySQL extension for PHP is not installed. Is this the kind of thing that PHP would exclude when I choose the Recommended settings during its installation?...
    See more | Go to post

    Leave a comment:


  • Hendor
    started a topic mysql_connect function isn't working
    in PHP

    mysql_connect function isn't working

    Hi all. I've recently set up Apache 2.2 with PHP 5.2 and MySQL 5.1. I played around with SQL a bit, and now I'm trying to access it with PHP. I currently have the code:

    Code:
    <?php
    
    # error_reporting(E_ALL);
    # ini_set('display_errors', true);
    
    echo "test";
    
    $link = mysql_connect('localhost', 'root', '[mypassword]');
    if (!$link) {
        die('Could not connect: ' . mysql_error());
    ...
    See more | Go to post
No activity results to display
Show More
Working...