How To: Fix Nick Berlette’s excellent Redirect Plugin for WordPress 2.6 and higher

The static pages (like Store) are working again.  I’ve had to fix the redirect plugin by Nick Berlette.  If you want it to work with your modern WordPress blog (2.6 or higher) you just need to change a tiny bit.
Remove this:

require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-config.php');

Replace with:

$root = dirname(dirname(dirname(dirname(__FILE__))));

if (file_exists($root.'/wp-load.php')) {
    require_once($root.'/wp-load.php');
} else {
    require_once($root.'/wp-config.php');
}

It should work fine now 🙂

Share Button

Are you receiving the “Useless localization of scalar assignment” error when using Exception::Class::TCF with Perl 5.10? I have a fix for you!

The following is a patch for bug 45563 in Exception::Class::TCF:

Useless localization of scalar assignment at Exception-Class-TCF/lib/Exception/Class/TCF.pm line 255.

Index: lib/Exception/Class/TCF.pm

--- lib/Exception/Class/TCF.pm	(revision 83)
+++ lib/Exception/Class/TCF.pm	(working copy)
@@ -251,8 +251,11 @@
my($block,@catches) = @_;
my($exc,@args,$res);
&$pushFrame;
-    $HANDLE_WARN &&
-      local ( $SIG{'__WARN__'} =  sub { throw Exception::Class::TCF::Warning @_;  } );
+
+    if ($HANDLE_WARN) {
+      local ( $SIG{'__WARN__'} ) =  sub { throw Exception::Class::TCF::Warning @_;  };
+    }
+
$dTHROWING = 0;
$res = eval { &$block() };
$exc = $EXCEPTION;
Share Button

Getting “A suitable JVM could not be found” with ASE 15.0.2 setup

$ ./setup -is:$JAVA_HOME -console 
InstallShield Wizard
Initializing InstallShield Wizard...
Searching for Java(tm) Virtual Machine...
A suitable JVM could not be found. Please run the program again using the option -is:javahome
Permission denied
Permission denied

Have you ever run into this? Well, I just did and for some reason the /tmp directory had permissions of drwxr-xr-x. A quick chmod 1777 /tmp fixed it. This is an fyi in case someone else runs across this problem.

Share Button