1
Altered
Caching Problem?
  • 2007/2/9 0:21

  • Altered

  • Just popping in

  • Posts: 7

  • Since: 2005/8/14


I'm using XOOPS 2.2.4 with the Protector module installed.

I've created a php mailing form that uses captcha. The script itself works fine but when i try to implement it with XOOPS by using the
<?php include("../mainfile.php"); include(XOOPS_ROOT_PATH."/header.php"); ?>
and 
<?php include(XOOPS_ROOT_PATH."/footer.php"); ?>

code in the index.php file the Captcha portion no longer works.
It gives one number that never changes. Is this a cache problem? If so how would i go about fixing it?
Also i've noticed something in the mainfile.php that looks like it disables scripts from running.
Quote:
// Protect against external scripts execution if safe mode is not enabled

Could this be the cause of the problem?

Thanks!

2
JMorris
Re: Caching Problem?
  • 2007/2/9 0:56

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Altered,

I'm not sure if that line is causing the problem or not, but there is another method you could try that might work around this issue. What you can do is download the PageWrap module.

Change the folder name to whatever you want, like "contact".

Open the xoops_version.php file and change the $modversion['dirname'] = "pagewrap"; to point to the new folder name, like $modversion['dirname'] = "contact";.

Then open index.php and add your include statement, like so.

<?php
include("../../mainfile.php");
include(
XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 1;
include(
XOOPS_ROOT_PATH."/yourscript.php");
include(
XOOPS_ROOT_PATH."/footer.php");
?>


Then install the module like you would any other. This should fix the problem because the script will be registered as a module.

After that, just make sure the module is not cached and you should be just fine.

HTH.

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

3
Altered
Re: Caching Problem?
  • 2007/2/9 1:36

  • Altered

  • Just popping in

  • Posts: 7

  • Since: 2005/8/14


I managed to get it working, i placed the XOOPS code into the actual form script, i guess the first time i tried that it was put in wrong.
Thanks for the suggestion, I have a few other things I can use that for!!

Login

Who's Online

150 user(s) are online (83 user(s) are browsing Support Forums)


Members: 0


Guests: 150


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits