+ Reply to Thread
Results 1 to 7 of 7

Thread: script error

  1. #1
    03moscropl's Avatar
    03moscropl is offline Flash Freak 03moscropl is an unknown quantity at this point
    Join Date
    Jun 2005
    Location
    England
    Posts
    349

    script error

    i have a proplem with a script i modified for phpnuke rather that post nuke it comes up put in the module postion it shows.

    Code:
     Warning: opendir(modules//games): failed to open dir: No such file or directory in /home/igamer/public_html/site/modules/MiniClip_Games/index.php on line 23
    
    Warning: readdir(): supplied argument is not a valid Directory resource in /home/igamer/public_html/site/modules/MiniClip_Games/index.php on line 24
    
    Warning: closedir(): supplied argument is not a valid Directory resource in /home/igamer/public_html/site/modules/MiniClip_Games/index.php on line 29
    here is the phpfile
    PHP Code:
    <?php
    if (!eregi("modules.php"$_SERVER['PHP_SELF'])) {
        die (
    "You can't access this file directly...");
    }
    require_once(
    "mainfile.php");
    $module_name basename(dirname(__FILE__));
    $pagetitle "mini clip games";

    $modimagefolder "modules/$ModName/images";
    $modgamefolder "modules/$ModName/games";
    // Set $index = 1 to enable right column
    $index 0;
    function 
    menu() {
     global 
    $modimagefolder$modgamefolder$ModName;
        include(
    "header.php");
        
    OpenTable();
     
    $dh opendir($modgamefolder);
     while (
    $dir readdir($dh)) { 
      if (!
    is_dir("modules/".$dir)  && ($dir != '.') && ($dir != '..')) {
       echo 
    " <a href=\"modules.php?op=modload&name=$ModName&file=index&game=$dir&func=playgame\"><img src=\"$modgamefolder/$dir/$dir.gif\" height=\"70\" border=\"0\"></a> ";
      }
     }  
     
    closedir($dh);
     echo 
    "</td></tr><tr><td align=\"center\"><a href=\"modules.php?op=modload&name=$ModName&file=index&func=credits\">"._MINICLIPGAMESMESSAGE."</a>";
        
    CloseTable();
        include(
    "footer.php");
    }
    function 
    playgame() {
     global 
    $modgamefolder$game$ModName;
        include(
    "header.php");
        
    OpenTable();
     echo 
    "<a href=\"modules.php?op=modload&name=$ModName&file=index\">Game Index</a> :: $game"
     
    ."</td></tr><tr><td align=\"center\">"
     
    ."<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" width=\"550\" height=\"360\">\n"
     
    ."<param name=\"movie\" value=\"$modgamefolder/$game/$game.swf\">"
     
    ."<param name=\"quality\" value=\"high\">"
     
    ."<embed src=\"$modgamefolder/$game/$game.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"550\" height=\"360\">\n"
     
    ."</embed>\n"
     
    ."</object>"
     
    ."</td></tr><tr><td align=\"center\"><a href=\"modules.php?op=modload&name=$ModName&file=index&func=credits\">"._MINICLIPGAMESMESSAGE."</a>";
        
    CloseTable();
        include(
    "footer.php");
    }
    function 
    modcredits() {
     include(
    "header.php");
     
    OpenTable();
     echo 
    "<p align=\"center\"><br>This module is brought to you by <a href=\"mailto:burke@dimensionquest.net\">Burke</a> @ <a href=\"http://www.dimensionquest.net\">dimensionquest.net</a>!<br><br>"
     
    ."These games are provided as \"Free games for your website\" by <a href=\"http://www.miniclip.com\">Miniclip.com</a><br><br>"
     
    ."Miniclip files were only renamed in the making of this module to provide naming consistancy between Folder/Flash/Image filenames</p><br>";
     
    CloseTable();
     include(
    "footer.php");
    }
    switch(
    $func) {
        default:
        
    menu();
        break;
        
        case 
    "playgame":
        
    playgame();
        break;
     
     case 
    "credits";
     
    modcredits();
     break;
    }
    ?>
    my customised games module for phpnuke
    http://dragongamer.net/modules.php?name=arcade

  2. #2
    Bryon is offline Administrator Bryon has disabled reputation
    Join Date
    Apr 2005
    Location
    Northfield, NH
    Posts
    7,608

    Re: script error

    Well obviously, the error is because the directory you are trying to open doesn't exist.

    I, myself, cannot test the script and try to fix it, (Because it would take a good amount of time to set it all up and get it working.), but what did you change it in before you saved it? Like I said, it's saying teh directory could not be found, thus you get the error's from opendir(), readdir(), and closedir(). Check all of the names that you are using, and make sure you have the right names of the directories/folders.

  3. #3
    ak007's Avatar
    ak007 is offline x10 Sophmore ak007 is an unknown quantity at this point
    Join Date
    Jun 2005
    Location
    127.0.0.1
    Posts
    108

    Re: script error

    i Don't Use That Buggy Stuff So I Dont Know What Are Are You Talking About I Mean Can You Give me More info About The Directory Structure?

    BTW Heres Some Modification Version of That Script:
    PHP Code:
     <?php
    if (!eregi("modules.php"$_SERVER['PHP_SELF'])) {
        die (
    "You can't access this file directly...");
    }
    require_once(
    "mainfile.php");
    $module_name basename(dirname(__FILE__));
    $pagetitle "mini clip games";

    $modimagefolder "./modules/$ModName/images";
    $modgamefolder "./modules/$ModName/games";
    // Set $index = 1 to enable right column
    $index 0;
    function 
    menu() {
     global 
    $modimagefolder$modgamefolder$ModName;
        include(
    "header.php");
        
    OpenTable();
     
    $dh opendir($modgamefolder);
     while (
    $dir readdir($dh)) { 
      if (!
    is_dir("modules/".$dir)  && ($dir != '.') && ($dir != '..')) {
       echo 
    " <a href=\"modules.php?op=modload&name=$ModName&file=index&game=$dir&func=playgame\"><img src=\"$modgamefolder/$dir/$dir.gif\" height=\"70\" border=\"0\"></a> ";
      }
     }  
     
    closedir($dh);
     echo 
    "</td></tr><tr><td align=\"center\"><a href=\"modules.php?op=modload&name=$ModName&file=index&func=credits\">"._MINICLIPGAMESMESSAGE."</a>";
        
    CloseTable();
        include(
    "footer.php");
    }
    function 
    playgame() {
     global 
    $modgamefolder$game$ModName;
        include(
    "header.php");
        
    OpenTable();
     echo 
    "<a href=\"modules.php?op=modload&name=$ModName&file=index\">Game Index</a> :: $game"
     
    ."</td></tr><tr><td align=\"center\">"
     
    ."<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" width=\"550\" height=\"360\">\n"
     
    ."<param name=\"movie\" value=\"$modgamefolder/$game/$game.swf\">"
     
    ."<param name=\"quality\" value=\"high\">"
     
    ."<embed src=\"$modgamefolder/$game/$game.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"550\" height=\"360\">\n"
     
    ."</embed>\n"
     
    ."</object>"
     
    ."</td></tr><tr><td align=\"center\"><a href=\"modules.php?op=modload&name=$ModName&file=index&func=credits\">"._MINICLIPGAMESMESSAGE."</a>";
        
    CloseTable();
        include(
    "footer.php");
    }
    function 
    modcredits() {
     include(
    "header.php");
     
    OpenTable();
     echo 
    "<p align=\"center\"><br>This module is brought to you by <a href=\"mailto:burke@dimensionquest.net\">Burke</a> @ <a href=\"http://www.dimensionquest.net\">dimensionquest.net</a>!<br><br>"
     
    ."These games are provided as \"Free games for your website\" by <a href=\"http://www.miniclip.com\">Miniclip.com</a><br><br>"
     
    ."Miniclip files were only renamed in the making of this module to provide naming consistancy between Folder/Flash/Image filenames</p><br>";
     
    CloseTable();
     include(
    "footer.php");
    }
    switch(
    $func) {
        default:
        
    menu();
        break;
        
        case 
    "playgame":
        
    playgame();
        break;
     
     case 
    "credits";
     
    modcredits();
     break;
    }
    ?>





  4. #4
    03moscropl's Avatar
    03moscropl is offline Flash Freak 03moscropl is an unknown quantity at this point
    Join Date
    Jun 2005
    Location
    England
    Posts
    349

    Re: script error

    it says
    Warning: opendir(./modules//games): failed to open dir: No such file or directory in /home/igamer/public_html/site/modules/MiniClip_Games/index.php on line 17

    Warning: readdir(): supplied argument is not a valid Directory resource in /home/igamer/public_html/site/modules/MiniClip_Games/index.php on line 18

    Warning: closedir(): supplied argument is not a valid Directory resource in /home/igamer/public_html/site/modules/MiniClip_Games/index.php on line 23



    the directory sytem works by having the foder names as the game names e.g

    folder "pacman" inside are
    pacman.gif
    pacman.swf

    then on the home page it has the image then when you clikc it it takes you to the game.

    by the way if you or any one can fix it i will donate 100 points to you
    Last edited by 03moscropl; 10-08-2005 at 01:41 PM.
    my customised games module for phpnuke
    http://dragongamer.net/modules.php?name=arcade

  5. #5
    Bryon is offline Administrator Bryon has disabled reputation
    Join Date
    Apr 2005
    Location
    Northfield, NH
    Posts
    7,608

    Re: script error

    Quote Originally Posted by 03moscropl

    by the way if you or any one can fix it i will donate 100 points to you
    I would help, but the only thing I can think of, is to check the directories, and make sure all the names are correct. Also, I used mkdir() the other day, and found that I needed to have the FULL name of the directory, going from:

    /home/nedren/public_html/

    As my web root.

    Maybe that's your problem?

  6. #6
    03moscropl's Avatar
    03moscropl is offline Flash Freak 03moscropl is an unknown quantity at this point
    Join Date
    Jun 2005
    Location
    England
    Posts
    349

    Re: script error

    i know it isnt that due to this part

    PHP Code:
    "./modules/$ModName/images";
            
    "./modules/$ModName/games"
    $ModName
    is the dodule name of it and if it can find minclipgames//games folder it is mostlikly to be a script error.
    my customised games module for phpnuke
    http://dragongamer.net/modules.php?name=arcade

  7. #7
    03moscropl's Avatar
    03moscropl is offline Flash Freak 03moscropl is an unknown quantity at this point
    Join Date
    Jun 2005
    Location
    England
    Posts
    349

    Re: script error

    found the bug $ModName

    was causing it.


    but you were the only 2 that helps so i dontated 20 points each.
    my customised games module for phpnuke
    http://dragongamer.net/modules.php?name=arcade

+ Reply to Thread

Similar Threads

  1. problema con script
    By cerealk in forum Soporte
    Replies: 3
    Last Post: 09-21-2006, 05:11 PM
  2. Error With Script Addons
    By Shadow121 in forum Free Hosting
    Replies: 0
    Last Post: 08-01-2006, 10:11 PM
  3. {req} Banners
    By SEŅOR in forum The Marketplace
    Replies: 23
    Last Post: 01-05-2006, 03:15 PM
  4. Script Error
    By Anton in forum Free Hosting
    Replies: 6
    Last Post: 12-27-2005, 06:45 PM
  5. Internal Server Error
    By Lukasz in forum Free Hosting
    Replies: 1
    Last Post: 09-23-2005, 10:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers