looking for some advice on (Warning: main(includes/db_connect.php) Please

Discussion in 'MySQL' started by ritchie111, Aug 3, 2007.

  1. #1
    Hi i have uploaded 3 files to my site and i am getting these errors can anyone advice me with this please.


    Warning: main(includes/db_connect.php) [function.main]: failed to open stream: No such file or directory in /home/theukmaf/public_html/game/auctions.php on line 3

    Warning: main() [function.include]: Failed opening 'includes/db_connect.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/theukmaf/public_html/game/auctions.php on line 3

    Warning: main(includes/functions.php) [function.main]: failed to open stream: No such file or directory in /home/theukmaf/public_html/game/auctions.php on line 4

    Warning: main() [function.include]: Failed opening 'includes/functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/theukmaf/public_html/game/auctions.php on line 4

    Warning: main(includes/jail_check.php) [function.main]: failed to open stream: No such file or directory in /home/theukmaf/public_html/game/auctions.php on line 5

    Warning: main() [function.include]: Failed opening 'includes/jail_check.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/theukmaf/public_html/game/auctions.php on line 5

    Warning: main(probe.php) [function.main]: failed to open stream: No such file or directory in /home/theukmaf/public_html/game/auctions.php on line 6

    Warning: main() [function.include]: Failed opening 'probe.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/theukmaf/public_html/game/auctions.php on line 6

    Fatal error: Call to undefined function: logincheck() in /home/theukmaf/public_html/game/auctions.php on line 7


    Thanks Ritchie
     
    ritchie111, Aug 3, 2007 IP
  2. killerj

    killerj Active Member

    Messages:
    765
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    95
    #2
    the path to auctions.php is invalid . Kindly re-check and see if its the right path .
    Also post here , the lines 2,3,4,5 and 6 of functions.php .
     
    killerj, Aug 4, 2007 IP
  3. matty005

    matty005 Member

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #3
    it looks like the path to db_connect.php, functions.php and jail_check.php are invalid. Take a look at the bit where it says: include( and change the path.
     
    matty005, Aug 4, 2007 IP
  4. f3ze

    f3ze Active Member

    Messages:
    73
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    98
    #4
    if the file which is calling all these errors is in a directory /a/b and the includes file is say /includes you'd want to change the path to ../../includes
    here it looks like you'd want to change the path from eg 'includes/db_connect.php' to '../includes/db_connect.php'
    The ../ takes you up a level in the folder structure
     
    f3ze, Aug 4, 2007 IP
  5. ritchie111

    ritchie111 Peon

    Messages:
    279
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks for the advice up to now, :)
    I have done the above but now i have these errors :(
    again any help would be really appreciated.

    Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/*******/public_html/game/auctions.php on line 15

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/******/public_html/game/auctions.php on line 719

    Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/******public_html/game/auctions.php on line 722

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/********/public_html/game/auctions.php on line 866

    Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/*******/public_html/game/auctions.php on line 868

    Thanks once again


    Ritchie
     
    ritchie111, Aug 6, 2007 IP
  6. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #6
    That is usually caused by an error in connecting to MySQL or selecting a database, which results in all subsequent MySQL functions to produce an error. Confirm that your database settings (host, username, password and database name) are correct, note that username and database name should most likely be prefixed by your CPanel username
     
    krt, Aug 6, 2007 IP
  7. ritchie111

    ritchie111 Peon

    Messages:
    279
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks krt i will have a look now ;)
    I appreciate this mate i really do, as you can gather im just trying to get the hang of this :)
     
    ritchie111, Aug 6, 2007 IP
  8. f3ze

    f3ze Active Member

    Messages:
    73
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    98
    #8
    checkout tizag.com, they have pretty easy step by step explanations
     
    f3ze, Aug 14, 2007 IP