Support » Installing WordPress » PHP Problems?

  • I am getting the “Error establishing a database connection” after installation. I’ve searched many forums without success. My versions are as follows (I think I have all
    the minimum required versions):

    mysql: 3.23.54
    php: 4.2.2
    apache: Apache/2.0.40

    I wrote the following script in PHP to test my PHP access
    and it fails, which leads me to believe it is a PHP problem (making sure to insert the proper values into
    the db_* variables). My mysql client works with the values I tried. I get the “can’t connect to db:” error when I run the script via browser.

    <?
    $db_host=””;
    $db_user=””;
    $db_pass=””;
    $db_name=””;

    @mysql_pconnect($db_host,$db_user,$db_pass) or die(“can’t
    connect to db host: $db_host”);
    @mysql_select_db($db_name) or die(“can’t connect to db: $db_name”);

    $select = “SELECT user_login FROM wp_users”;
    $result = mysql_query($select) or die(‘db select failed!’ .
    mysql_error());
    ?>

    Any thoughts?

Viewing 1 replies (of 1 total)
  • Thread Starter pauljsolomon

    (@pauljsolomon)

    Okay, I decided to give up on my current setup and upgrade PHP (5.x). After I followed the steps in the INSTALL file,
    it works.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Problems?’ is closed to new replies.