Author |
Message |
virtuaopolis
Corporal


Joined: Oct 07, 2003
Posts: 64
|
Posted:
Wed Jun 09, 2004 8:28 pm |
  |
I am currently using Fortress 1.20b on phpNuke 7.1 with phpBBtoNuke 2.0.6
When i try to acces the "forums" icon in the admin panel (http://thesite.com/modules/Forums/admin/index.php) [signed in as a site admin with full access].
I get this error message:
Warning: main(fortress.php): failed to open stream: No such file or directory in /usr/local/etc/httpd/htdocs/public_html/mainfile.php on line 29
Warning: main(): Failed opening 'fortress.php' for inclusion (include_path='') in /usr/local/etc/httpd/htdocs/public_html/mainfile.php on line 29
Fatal error: Call to undefined function: bards() in /usr/local/etc/httpd/htdocs/public_html/mainfile.php on line 30
Despite the problem accessing the administration panel for the forums, the fortress works fine, I get the emails of the attacks, the CSV and HTML are updated and there are no other problems in the site.
The address to the forums administration does not seem to follow the modules.php?name=OP_HERE designation. Could this be why? Ifso, any sugestions would be wonderfuly appreciated.
THank you in advance
~Percy |
|
|
   |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Thu Jun 10, 2004 4:52 am |
  |
That sure is a bug... I'm not too sure what is causing yet. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
madman
Support Mod


Joined: Feb 15, 2004
Posts: 806
|
Posted:
Thu Jun 10, 2004 9:29 am |
  |
In mainfile.php, replace a line:
Code: |
include("fortress.php") |
With this one:
Code: |
function nuke_getRootPath() {
$ret = "./";
if (eregi('\/modules\/[^\/]+\/[^\/]+\/[^\/]+.php$', $_SERVER['PHP_SELF'])) { $ret = "../../../"; }
else if (eregi('\/modules\/[^\/]+\/[^\/]+.php$', $_SERVER['PHP_SELF'])) { $ret = "../../"; }
else if (eregi('\/modules\/[^\/]+.php$', $_SERVER['PHP_SELF'])) { $ret = "../"; }
return $ret;
}
require_once(nuke_getRootPath().'fortress.php'); |
Be careful that nuke_getRootPath() function also defined by Admin Secure. In that case (and you install Admin Secure as well), simply put this single line for fortress inclusion:
Code: |
require_once(nuke_getRootPath().'fortress.php'); |
|
_________________ I'm  |
|
      |
 |
virtuaopolis
Corporal


Joined: Oct 07, 2003
Posts: 64
|
Posted:
Thu Jun 10, 2004 2:02 pm |
  |
Great work madman! Kudos to you! Patched with credits >=]
~percy |
|
|
   |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Thu Jun 10, 2004 2:34 pm |
  |
Nice code work madman... Did you write that from running into the same bug?
madman wrote: |
In mainfile.php, replace a line:
Code: |
include("fortress.php") |
With this one:
Code: |
function nuke_getRootPath() {
$ret = "./";
if (eregi('\/modules\/[^\/]+\/[^\/]+\/[^\/]+.php$', $_SERVER['PHP_SELF'])) { $ret = "../../../"; }
else if (eregi('\/modules\/[^\/]+\/[^\/]+.php$', $_SERVER['PHP_SELF'])) { $ret = "../../"; }
else if (eregi('\/modules\/[^\/]+.php$', $_SERVER['PHP_SELF'])) { $ret = "../"; }
return $ret;
}
require_once(nuke_getRootPath().'fortress.php'); |
Be careful that nuke_getRootPath() function also defined by Admin Secure. In that case (and you install Admin Secure as well), simply put this single line for fortress inclusion:
Code: |
require_once(nuke_getRootPath().'fortress.php'); |
|
|
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
Getyousomeofthis
Sergeant


Joined: Jan 18, 2004
Posts: 128
Location: Tulsa Oklahoma
|
Posted:
Thu Jun 10, 2004 3:47 pm |
  |
Nice fix madman thanks . This has been bothering me for quite some time.. It was getting old having to remove the Union tap long enough to admin the forums. Awesome work  |
_________________ Click Here To Join Our CS:Source Game Server!
[img]http://www.dtsbase.com/files/logo.gif[/img]
Last edited by Getyousomeofthis on Fri Jun 11, 2004 7:01 pm; edited 1 time in total |
|
    |
 |
madman
Support Mod


Joined: Feb 15, 2004
Posts: 806
|
Posted:
Thu Jun 10, 2004 3:58 pm |
  |
Glad to hear it solve many problems, not only forum admin access.
Maybe it's a good idea to put similar function in upcoming php-nuke version so we able to find actual nuke root directory when we running a script not from root, like phpbb forum admin. |
_________________ I'm  |
|
      |
 |
Tank863
Lieutenant


Joined: Feb 21, 2003
Posts: 195
Location: Philadelphia
|
Posted:
Fri Jun 11, 2004 6:11 am |
  |
I am still, even after the code change getting a forbidden error message.
I am unable to access the admin section for my forums...
I am using Nuke 6.5 all patched up, Admin Secure 1.7, Fortress 1.20, Sentinel 1.2, |
|
|
     |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Fri Jun 11, 2004 8:14 am |
  |
Chris, it might be time to start disabling packages to see where the problems lies. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
Tank863
Lieutenant


Joined: Feb 21, 2003
Posts: 195
Location: Philadelphia
|
Posted:
Fri Jun 11, 2004 12:23 pm |
  |
That's what I thought...
Like I said before... always my nuke... I will test it out and post the results back...
Hoepfully I can get this thing working again...\
Anyway.. Thanks Paul.. PS: Had my first lesson in PHP coding.. I told my buddy.. I already knew that from messing around with php-nuke.. teach me something new... |
|
|
     |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Fri Jun 11, 2004 6:40 pm |
  |
Coolio! |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
madman
Support Mod


Joined: Feb 15, 2004
Posts: 806
|
Posted:
Sun Jun 13, 2004 2:57 pm |
  |
Tank, check your PM. |
_________________ I'm  |
|
      |
 |
|