PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
twelves
Regular
Regular


Joined: Aug 22, 2003
Posts: 84

PostPosted: Sun Jan 04, 2004 11:10 pm Reply with quote Back to top

You can't access this file directly...
Fresh install of nuke 7.0.

When I try to make any non Stock module as the main page in nuke...

I get that error.

I did look really long and hard for the fix.

No luck on the suggested fixes.

So I turn to Mr Raven the expert!
Dang how does he know this stuff? Embarassed

If any one has ever fixed this error, I would like to know.

Thanks gang!

Jay.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Mon Jan 05, 2004 2:14 am Reply with quote Back to top

Hmmmm. Not heard that one before. Can you PM me access permissions to your site?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
twelves
Regular
Regular


Joined: Aug 22, 2003
Posts: 84

PostPosted: Mon Jan 05, 2004 11:04 am Reply with quote Back to top

I removed this code from the modules index.php file. (Of every module I want in the main page)

Although I need to remove it from every 3rd party module, leads me to think I have a config messed up..

Its a harsh fix, But its working and I dont see any ill effects.

YET... Very Happy


Removed from Modules index.php

if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Mon Jan 05, 2004 11:10 am Reply with quote Back to top

$PHP_SELF is not being resolved. Your 'fix' will make it easier to hack your site.

If register_globals are not on then you need to change
Code:
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
to
Code:
if (!eregi("modules.php", $HTTP_SERVER_VARS['PHP_SELF'])) {
die ("You can't access this file directly...");
}
or
Code:
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Mon Jan 05, 2004 11:19 am Reply with quote Back to top

I just picked up on the "non-stock" statement. So, are you saying that if, for instance, you wanted Forums as the default Home, it works?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
twelves
Regular
Regular


Joined: Aug 22, 2003
Posts: 84

PostPosted: Mon Jan 05, 2004 11:39 am Reply with quote Back to top

Yes, its just new modules. I can make the stock nuke modules as the main page.

But so far, gallery and NukeC both cough and give the errors.

On your fix, do I need to do that to every Module that has the complaint of
You can't access this file directly... ?

My guess is its the authors error and not nuke?
I am reversing my edit and putting yours in my file
/modules/nukec/index.php

Thanks.

Jay!
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Mon Jan 05, 2004 11:40 am Reply with quote Back to top

Just try it on one to see if that is the problem.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
twelves
Regular
Regular


Joined: Aug 22, 2003
Posts: 84

PostPosted: Mon Jan 05, 2004 11:47 am Reply with quote Back to top

Yes, I just compleated the edit.

The second fix worked!

Thanks!

I guess Ill do this for every 3rd party block (Module add on)

Very Happy

So far its only the new modules. I guess its some thing on my server.

Peace!

Jay!
View user's profile Send private message Visit poster's website
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

View next topic
View previous 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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum