Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.0
Author Message
twelves
Regular
Regular



Joined: Aug 22, 2003
Posts: 84

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

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: 17088

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

Hmmmm. Not heard that one before. Can you PM me access permissions to your site?
 
View user's profile Send private message
twelves







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

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...");
}
 
Raven







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

$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...");
}
 
Raven







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

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?
 
twelves







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

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!
 
Raven







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

Just try it on one to see if that is the problem.
 
twelves







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

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!
 
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.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.0

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©