You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 60 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Cant access Downloads module [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Bulldog
Nuke Cadet
Nuke Cadet


Joined: Feb 01, 2005
Posts: 8


PostPosted: Sat Mar 26, 2005 1:12 pm Reply with quoteBack to top

I recently upgraded PHP-nuke 7.3 to 7.6. Then I installed the 2.9 patch. Then I installed NukeStyle Downloads module and upgraded it to 7.6 compatible.
I can access everything on the site and the admin section except for the Downloads module. I get the "you can't access this file directly" error. I checked the script in the downloads module index.php file and it appears correct. I may be missing something. Here is the script:

Quote:
if (!stristr($_SERVER['SCRIPT_NAME'], "modules.php")) {
die ("You can't access this file directly...");
}

if (isset($show)) {
$show = intval($show);
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- $module_name";
require_once("modules/$module_name/ns_downloads_file.php");
$index = 1;


I changed the "SCRIPT_NAME" to "PHP_SELF". That seemed to be the fix for other people who got that error for other modules. But that did not work in this case.. Does anyone have any ideas what I am missing here?

Do I need to add "downloads" everywhere it says "$module_name"

Anyhelp will be appreciated...Thanks
Find all posts by BulldogView user's profileSend private message
iceblox
Sergeant
Sergeant


Joined: Oct 07, 2004
Posts: 83


PostPosted: Sat Mar 26, 2005 1:34 pm Reply with quoteBack to top

I have 7.6 and the snippet of code from my index.php in my downloads section is

Code:
if ( !defined('MODULE_FILE') )
{
   die("You can't access this file directly...");
}
if (isset($show)) {
    $show = intval($show);
}



Give that a try maybe?


As for your question about changing all the "$module_name" to downloads you dont need to Nuke will grab the global from the tables and fill it in for you

Dont know if this helps

_________________
Iceblox
The Truth Empire
Find all posts by icebloxView user's profileSend private message
Bulldog
Nuke Cadet
Nuke Cadet


Joined: Feb 01, 2005
Posts: 8


PostPosted: Sat Mar 26, 2005 5:38 pm Reply with quoteBack to top

Thanks for the reply iceblox.

I tried that script and it still came back with "you can't acces this file directly"
Find all posts by BulldogView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.169 Seconds - 231 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::