Warning: main(): Failed opening 'php‘' for inclusion

Discussion in 'PHP' started by Doug the Great, Jul 28, 2007.

  1. #1
    What does this normally mean?

    Warning: main(php‘): failed to open stream: No such file or directory in ************************ on line 298
    
    Warning: main(): Failed opening 'php‘' for inclusion (include_path='.:/usr/local/lib/php') in ************************** on line 298
    PHP:
     
    Doug the Great, Jul 28, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    You're trying to include a file that not exists. Check if the file name is correct.
     
    nico_swd, Jul 28, 2007 IP
  3. Doug the Great

    Doug the Great Peon

    Messages:
    548
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Okay now i'm getting this message.

    
    Warning: mysql_connect(): Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /******************/referrers/log.php on line 37
    Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2)
    PHP:
    EDIT: Could this mean that the MySQL 5.0 is to new for the script i'm running?
     
    Doug the Great, Jul 28, 2007 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    That probably means that your MySQL username or password is/are incorrect.
     
    nico_swd, Jul 28, 2007 IP
  5. Doug the Great

    Doug the Great Peon

    Messages:
    548
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Triple checked even changed the username + pass twice, same error.

    :(
     
    Doug the Great, Jul 28, 2007 IP
  6. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #6
    Is the part that connects to the database included in the page you're trying to view?
     
    nico_swd, Jul 28, 2007 IP
  7. Doug the Great

    Doug the Great Peon

    Messages:
    548
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yes. I'm trying to run this script.

    toxicgoblin.com/2006/03/03/tg-referrers/

    It has a config.php file with all of my MySQLdb info.


    I'm deleting the script+MySQL and will start from scratch.
     
    Doug the Great, Jul 28, 2007 IP
  8. PowerExtreme

    PowerExtreme Banned

    Messages:
    2,118
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Due to some reason it cant connect to databese

    check the databese name also
     
    PowerExtreme, Jul 28, 2007 IP
  9. Doug the Great

    Doug the Great Peon

    Messages:
    548
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Ya everything is right (matching).

    Looks like I have to contact godaddy.
     
    Doug the Great, Jul 28, 2007 IP
  10. PowerExtreme

    PowerExtreme Banned

    Messages:
    2,118
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
    #10
    is servername also rite its not 'localhost' in godaddy
     
    PowerExtreme, Jul 28, 2007 IP
  11. Doug the Great

    Doug the Great Peon

    Messages:
    548
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I put the correct server URL. I'm calling GoDaddy right now.

    :D

    EDIT: On hold as a rep consults with his "agent".

    ;-)


    EDIT#2: Think I fixed it all the files that are pulling for the config.php aren't point exactly at the specific file so ya... go figure hehe.
     
    Doug the Great, Jul 28, 2007 IP
  12. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #12
    This is the price you pay for hosting at a crappy site.

    Godaddy is OK for domains only (they also suck a bit in that too).

    Peace,
     
    Barti1987, Jul 28, 2007 IP
  13. Doug the Great

    Doug the Great Peon

    Messages:
    548
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Hehe, althought GoDaddy does have it's flaws. This one was my fault hehe. One of the GoDaddy agents pointed out my error.

    So I guess you can say GoDaddy did something right?

    :D
     
    Doug the Great, Jul 28, 2007 IP