php error

Discussion in 'PHP' started by zeebloyankees, Jul 11, 2006.

  1. #1
    i get this error

    Warning: main(): Failed opening 'session.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/yankees/public_html/script/admin.php on line 14




    but session.php is there:confused:
     
    zeebloyankees, Jul 11, 2006 IP
  2. tflight

    tflight Peon

    Messages:
    617
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If session.php is in fact either in the same directory or in one of the include paths then the error message would indicate the file could not be opened because of a permission issue.
     
    tflight, Jul 11, 2006 IP
  3. zeebloyankees

    zeebloyankees Guest

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yea that helped, thanks.

    I also have another problem

    Warning: mysql_num_rows (): supplied argument is emergency A valid MySQL result resource in /home/yankees/public_html/script/database.php on LINE 218

    here is line 218


    $this->num_active_guests = mysql_num_rows($result);
     
    zeebloyankees, Jul 12, 2006 IP
  4. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #4
    if the query did not return any records, the resource pointer is not a pointer, it's just boolean false IIRC.

    So, check it before assigning it.

    if($result != false)
     
    noppid, Jul 12, 2006 IP
    joeychgo likes this.
  5. zeebloyankees

    zeebloyankees Guest

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I just deleted the entire $result phrase

    Worked
     
    zeebloyankees, Jul 18, 2006 IP