Vbulletin problem -"require once"

Discussion in 'PHP' started by pixeladd, Sep 25, 2008.

  1. #1
    ive installed VBadvanced links directory on my vbulletin site

    http://savemoneytalk.com/links/

    anyone who whats causing this error?


    Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/save/public_html/links/links_global.php on line 15
    
    Warning: require_once(/global.php) [function.require-once]: failed to open stream: No such file or directory in /home/save/public_html/links/links_global.php on line 44
    
    Fatal error: require_once() [function.require]: Failed opening required '/global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/save/public_html/links/links_global.php on line 44
    
    PHP:
     
    pixeladd, Sep 25, 2008 IP
  2. Warden

    Warden Peon

    Messages:
    22
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Apparently for some reason the script cannot find or access those two files. Check if they were uploaded correctly, check if they're still there and check the CHMOD.
     
    Warden, Sep 25, 2008 IP
  3. pixeladd

    pixeladd Banned

    Messages:
    2,238
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yeh the global file is there

    what should the CHMOD be mate? its 644 at the mo

    thanx for your help
     
    pixeladd, Sep 25, 2008 IP
  4. Warden

    Warden Peon

    Messages:
    22
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'm sure 644 should be fine. Could you copy paste the code around line 44 of the file /links/links_global.php?
     
    Warden, Sep 25, 2008 IP
    pixeladd likes this.
  5. pixeladd

    pixeladd Banned

    Messages:
    2,238
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanx mate i thought so

    heres the code
    );
    
    require_once('/global.php');  [B]LINE 44[/B]
    
    // Redirect if using cat jump (have to have it here to include the session)
    if ($redirect)
    PHP:
     
    pixeladd, Sep 25, 2008 IP
  6. Warden

    Warden Peon

    Messages:
    22
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ok. Instead of require_once('/global.php'); write the full path to the global.php file including http://.
    Something like:

    require_once('http://savemoneytalk.com/links/global.php');

    OR remove the "/" like this:

    require_once('global.php');
     
    Warden, Sep 25, 2008 IP
  7. Shazz

    Shazz Prominent Member

    Messages:
    8,395
    Likes Received:
    453
    Best Answers:
    0
    Trophy Points:
    330
    #7
    If you still have no luck have brian at vBA take a look at it.
     
    Shazz, Sep 25, 2008 IP
    pixeladd likes this.
  8. Warden

    Warden Peon

    Messages:
    22
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I'm guessing that would be the problem, because the "/" means root, so it's trying to access http://savemoneytalk.com/global.php. If he'd add the full URL, remove the "/" or write "/links/global.php" it should work.
     
    Warden, Sep 25, 2008 IP
  9. pixeladd

    pixeladd Banned

    Messages:
    2,238
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #9
    thanx to both warden and shazz

    someone at the VB forum gave me the same solution as warden

    thanx for your help guys
     
    pixeladd, Sep 25, 2008 IP
  10. Whippet75

    Whippet75 Well-Known Member

    Messages:
    1,599
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    155
    #10
    You may be right warden if the script he is accessing it from is not placed in the root of /links.
     
    Whippet75, Sep 25, 2008 IP