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 -> RN Conversion Issues From Standard phpNuke
Author Message
makama80
Hangin' Around



Joined: Feb 20, 2007
Posts: 32

PostPosted: Sun Mar 18, 2007 10:18 am Reply with quote

I am using the following IFRAME (code below) in my 8.0 site. Due to the known security issues I am porting to RN 2.10. But: the IFRAME code used in 8.0 does not work in RN 2.10. It produces a blank page. Also the code mentioned in the HOWTO on PHPNUKE.ORG does not work (anymore?)

Anybody any clues? I commented out the theme, for obvious reasons. It will also work without.

Here's my code:
Code:


<?
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
  die ("You can't access this file directly...");
}
if(!IsSet($mainfile)) { include ("mainfile.php"); }
$index=0;
//$theme="Helius";
$go_to_address1="http://www.actuelewaterdata.nl/cgi-bin/measurements/MUN1.Hm0?template=golfperfreqtemp";
$go_to_address=rawurldecode($go_to_address1);
include("header.php");
echo "<center><h3>Voor de wrakduikertjes onder ons:</h3></center>";
echo "<center><h4>De actuele golfhoogte bij de munitiestortplaats.</h4></center>";
// echo "<center><h4>Bron: Rijkswaterstaat</h4></center>";
echo "<!frame SRC=\"".$go_to_address."\" width=\"100%\" height=\"420\"
framespacing=0 frameborder=no border=0 scrolling=auto></!frame>";
//
//
//
$go_to_address2="http://www.actuelewaterdata.nl/cgi-bin/measurements/MUN1.Hmax?template=golfperfreqtemp";
$go_to_address=rawurldecode($go_to_address2);
echo "<!frame SRC=\"".$go_to_address."\" width=\"100%\" height=\"460\"
framespacing=0 frameborder=no border=0 scrolling=auto></!frame>";
//
OpenTable();
echo "<br><center>Gebruik van deze gegevens is voor eigen risico!</center><br>";
CloseTable();
include("footer.php");
die;
?>
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Sun Mar 18, 2007 10:47 am Reply with quote

then we leave it up to raven ... Laughing
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sun Mar 18, 2007 11:28 am Reply with quote

Note from Raven: I have inserted your code as requested. I modified the iframe tags to !frame to have NukeSentinel ignore it.

To all: For future reference, if you receive a scripting block and don't understand why, first of all, read what's on the screen that's displayed. It tells you the most common causes. Then, if that doesn't solve your issue, examine the /includes/nukesentinel.php code. Somewhere around line 276, depending on your version, you will see a // Check Filters comment. From line 276 down to line 343, again depending on your version, are most all of the word/code that we block. If the text you are tryin to post contain those words or tags you will need to alter them somehow as I have done with the iframe tags here.
 
View user's profile Send private message
makama80







PostPosted: Mon Mar 19, 2007 2:25 am Reply with quote

Thanks for posting my code. I promise to do better reading in the future.

For now, I have resolved my problem by using this blank module: http://www.hotscripts.com/Detailed/55346.html

I have inserted the code from the previous iframe module, and this is how it's working at the moment:

Code:


<?php 

if (!stristr($_SERVER['SCRIPT_NAME'], "modules.php")) {
die ("You can't access this file directly...");
}
   
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
$pagetitle = "- $module_name";

$index = 0; // 0 = No Right Blocks | 1 = Show Right Blocks!

include("header.php");

global $user;
if(!is_array($user)) {
$user_get = base64_decode($user);
$user_get = explode(":", $user_get);
$user_name = "$user_get[1]";
} else {
$user_name = $user[1];
}

OpenTable();
echo "<table width=\"100%\" border=\"0\" align=\"center\"><tr><td align=\"center\">";

$go_to_address1="http://www.actuelewaterdata.nl/cgi-bin/measurements/MUN1.Hm0?template=golfperfreqtemp";
$go_to_address=rawurldecode($go_to_address1);
echo "<center><h3>Voor de wrakduikertjes onder ons:</h3></center>";
echo "<center><h4>De actuele golfhoogte bij de munitiestortplaats.</h4></center>";

echo "<!frame SRC=\"".$go_to_address."\" width=\"100%\" height=\"420\"
framespacing=0 frameborder=no border=0 scrolling=auto></!frame>";

$go_to_address2="http://www.actuelewaterdata.nl/cgi-bin/measurements/MUN1.Hmax?template=golfperfreqtemp";
$go_to_address=rawurldecode($go_to_address2);
echo "<!frame SRC=\"".$go_to_address."\" width=\"100%\" height=\"460\"
framespacing=0 frameborder=no border=0 scrolling=auto></!frame>";

echo "</td></tr></table>";
CloseTable();
include("footer.php");

?>


Regards,

Martijn
 
Raven







PostPosted: Mon Mar 19, 2007 8:22 am Reply with quote

Do you run PHP as an Apache module or as a stand alone CGI?
 
makama80







PostPosted: Tue Mar 20, 2007 3:10 pm Reply with quote

I am running it as an Apache module.
 
Raven







PostPosted: Tue Mar 20, 2007 5:23 pm Reply with quote

klaafstra99 wrote:
I am running it as an Apache module.

You should not have that issue with running PHP as an Apache module. That should only occur if you were running it as CGI, unless you configuration is disallowing PHP_SELF which some do.
 
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 -> RN Conversion Issues From Standard phpNuke

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 ©