Page 3 of 7 FirstFirst 12345 ... LastLast
Results 21 to 30 of 65
  1. #21
    Join Date
    Mar 2006
    Location
    Austarlia
    Posts
    46

    Wink

    Warning: require(C:/webroot/config/db_config.php) [function.require]: failed to open stream: No such file or directory in C:\webroot\temp_con.php on line 2

    Fatal error: require() [function.require]: Failed opening required 'C:/webroot/config/db_config.php' (include_path='.;C:\php5\pear') in C:\webroot\temp_con.php on line 2


    <?php
    $db_host = "localhost";
    $db_user = "php";
    $db_passowrd = "s3cret";
    $db_name = "hbkDB";
    ?>

    <?php
    require ($_SERVER["DOCUMENT_ROOT"]."/config/db_config.php");
    $connection =mysql_connect($db_host, $db_user, $db_password) or die("error connecting");
    echo "connection made";
    ?>

    I am so sry for being a pain in the behind but I am so close to getting I just need a little more help please

    is this because I can't login to user php in mySQL??
    Last edited by HBK; 04-05-2006 at 05:27 AM. Reason: I put the wrong info in the post

  2. #22
    Join Date
    Mar 2006
    Location
    Austarlia
    Posts
    46
    is it at all possible for me to use the main account from mysql for the connection thing as that is the only one I can use

  3. #23
    Join Date
    Mar 2002
    Location
    Denmark
    Posts
    684
    you get that error because the file you are looking for is not located where you are looking for it... make sure db_config.php is located in C:/webroot/config/

    if it ain't then theres your answer... and I suspect it aint there or else you wouldn't get that error...
    ~Chris

  4. #24
    Join Date
    Mar 2006
    Location
    Austarlia
    Posts
    46
    Parse error: syntax error, unexpected T_ECHO in C:\webroot\iftest.php on line 6
    <?php
    $var = 8;
    $var2 = "8";
    if ($var === $var2)
    (
    echo "var equals var2";
    if ($var2 == "8")
    (
    echo " and var2 was 8";
    )
    else
    (
    echo " and var2 was not 8";
    )
    )
    elseif ($var == 20)
    (
    echo "var was 20";
    )
    else
    (
    echo "var was false";
    )

    echo "<br>end of script";
    ?>

  5. #25
    Join Date
    Mar 2006
    Location
    Austarlia
    Posts
    46
    Parse error: syntax error, unexpected ';' in C:\webroot\guestbook.php on line 11

  6. #26
    Join Date
    Mar 2002
    Location
    Denmark
    Posts
    684
    use { and } instead of ( and )
    ~Chris

  7. #27
    Join Date
    Mar 2006
    Location
    Austarlia
    Posts
    46
    can you tell me how to get to the site of phpmyadmin please because when i try to go to the site that the VTM's say I can't find it to download it can anyone tell me if the site is still here as I know the VTM's were made a couple of years ago now

  8. #28
    Join Date
    Aug 2003
    Location
    Madrid - Spain
    Posts
    1,153
    Quote Originally Posted by HBK
    can you tell me how to get to the site of phpmyadmin please because when i try to go to the site that the VTM's say I can't find it to download it can anyone tell me if the site is still here as I know the VTM's were made a couple of years ago now
    You mean where you can download it? Here is the website
    n4x0 -- C++ Programmer
    Tank Game - Progress: 11%

  9. #29
    Join Date
    Apr 2006
    Posts
    11

    "Fatal error: Call to undefined function mysql_connect() in c:\wwwroot\......"

    hi everyone;
    i was following the the video number 3 in "PHP & MySQL Integration Issue 2" at http://www.3dbuzz.com/vbforum/sv_dl_list.php?c=6 every thing was okay but in video three at 14:44, i started to having problem. i made same file as buzz guys said and named it temp_con.php . when i typed http://localhost/temp_con.php
    in internet i got an error saying
    "Fatal error: Call to undefined function mysql_connect() in c:\wwwroot\temp_con.php on line 3"
    i have following in temp_con.php file

    <?php
    require($_SERVER["DOCUMENT_ROOT"] ."/config/db_config.php");
    $connection = mysql_connect($db_host, $db_user, $db_password) or die("error connecting");

    echo "connection made";

    ?>
    could u please let me know what should i do.

    i did what those guys said at http://www.3dbuzz.com/vbforum/showthread.php?t=122395
    (i remove the ; infront of the line extension=php_mysql.dll).

    i am using apache_1.3.34
    php-5.1.2
    MySQL 5.0.19-nt
    Last edited by compaqras; 04-16-2006 at 09:47 PM.

  10. #30
    Join Date
    Apr 2005
    Location
    Atlanta GA
    Posts
    482
    have you been able to connect to mysql before now?

Page 3 of 7 FirstFirst 12345 ... LastLast

Posting Permissions

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