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...");
}
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
iceblox Sergeant
Joined: Oct 07, 2004
Posts: 83
Posted:
Sat Mar 26, 2005 1:34 pm
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
Bulldog Nuke Cadet
Joined: Feb 01, 2005
Posts: 8
Posted:
Sat Mar 26, 2005 5:38 pm
Thanks for the reply iceblox.
I tried that script and it still came back with "you can't acces this file directly"
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