Script Error

Discussion in 'Programming' started by gree124, Oct 22, 2007.

  1. #1
    how do i fix this error?
     
    gree124, Oct 22, 2007 IP
  2. upl8t

    upl8t Peon

    Messages:
    80
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Errr, what error exactly? :D
     
    upl8t, Oct 22, 2007 IP
  3. eggi

    eggi Peon

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hey THere,

    Please post as much info as you can about this. Preferably the script you're executing and any information up to the point where you get the "script error" output.

    Thanks,
    ,Mike
     
    eggi, Oct 23, 2007 IP
  4. gree124

    gree124 Well-Known Member

    Messages:
    721
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    128
    #4
    http://www.mknexusonline.com/mkgames/mk1/mk1.php

    Warning: main(./global.php) [function.main]: failed to open stream: No such file or directory in /home/mkne/public_html/mkgames/mk1/mk1.php on line 10

    Fatal error: main() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mkne/public_html/mkgames/mk1/mk1.php on line 10
     
    gree124, Oct 23, 2007 IP
  5. NeDlOh312

    NeDlOh312 Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    There is no file called 'global.php' Is the file actually there?
    It may be in another directory...
     
    NeDlOh312, Oct 23, 2007 IP
  6. gree124

    gree124 Well-Known Member

    Messages:
    721
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    128
    #6
    so i just copy global.php in mk1 directory

    now it;s show this error
    Warning: main(/home/mkne/public_html/mkgames/mk1/includes/init.php) [function.main]: failed to open stream: No such file or directory in /home/mkne/public_html/mkgames/mk1/global.php on line 20

    Fatal error: main() [function.require]: Failed opening required '/home/mkne/public_html/mkgames/mk1/includes/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mkne/public_html/mkgames/mk1/global.php on line 20
     
    gree124, Oct 24, 2007 IP
  7. upl8t

    upl8t Peon

    Messages:
    80
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    That message is basically telling you you're trying to include a file that doesn't exist.

    In this case, it's trying to include a file ./includes/init.php

    Make sure in whatever directory global.php is in:

    /home/mkne/public_html/mkgames/mk1/

    That you copy the includes directory into there.

    Look inside global.php (probably at the top) for the includes (lines starting with include/require/include_once/require_once and look for the files it's including. Make sure these exist and are in the right place.
     
    upl8t, Oct 24, 2007 IP
  8. gree124

    gree124 Well-Known Member

    Messages:
    721
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    128
    #8
    this line your talking about
    // Start initialisation require_once(CWD . '/includes/init.php');
     
    gree124, Oct 24, 2007 IP