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 -> PHP-Nuke Patched Series By Chatserv
Author Message
Darrell3831
Worker
Worker


Joined: Feb 18, 2004
Posts: 244

PostPosted: Tue Jan 31, 2006 5:08 am Reply with quote

Within the code of a module it's necessary to know what patched version you have so that you can make conditional tests.

For instance:

Code:
define('INDEX_FILE', true);  // 3.1 or later - show right hand blocks

$index = 0; // 3.0 or earlier - show right hand blocks


Is there a test I can run in php that will tell me what patched version my code is running under?

Thanks,
Darrell

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9456
Location: Arizona

PostPosted: Tue Jan 31, 2006 6:38 am Reply with quote

Darrell3831, unfortunately not. What I have done recently is within my index file I simple define both. In my opinion, it really isn't introducing any security risk because if you are 3.0 and under, it requires $index be set anyways, and if you are running 3.1, nothing looks at $index variable anyways.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Darrell3831
PostPosted: Tue Jan 31, 2006 9:14 am Reply with quote

huh,

Well that's a simple solution I had'nt thought of.

Thanks again Montego!
 
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Tue Jan 31, 2006 11:18 am Reply with quote

Simple enough - mainfile.php has the 3.1 version number on it.
If it doesn't, then you know its 3.0 or earlier

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Darrell3831
PostPosted: Tue Jan 31, 2006 11:29 am Reply with quote

Sorry Evaders,

I don't think I understand what your saying... Could you fix this thing you called a simple test for me, please?

Code:
if (mainfile.php => 3.1) {  // Simple test


define('INDEX_FILE', true); 

}

else {

$index = 0;

}


Thanks,
Darrell
 
evaders99
PostPosted: Tue Jan 31, 2006 11:32 am Reply with quote

Ah - you wanted a code way to determine their patched level. Sorry.

montego is correct. You can define both, it won't hurt you
 
Darrell3831
PostPosted: Tue Jan 31, 2006 11:35 am Reply with quote

thanks
 
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 -> PHP-Nuke Patched Series By Chatserv

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 ©