Tag Archives: perl

Red Hat Enterprise update Broke my Perl weak references!

My credit card processing interface (to CyberSource) broke today after we updated our Red Hat enterprise with the latest Perl. Apparently, the problem I hit was not all that rare.

The error I got was (approximately) “Version of perl at [path-to-perl] doesn’t support weak references at line 2447.” 

package SOAP::Server;

 

...
use Carp ();
use Scalar::Util qw(weaken);
sub DESTROY { SOAP::Trace::objects('()') }

sub initialize {

...

Thanks to the gang at perlmonks, the fix was pretty simple:


perl -MCPAN -e shell
force install Scalar::Util

This worked for me, if you have the same problem, well I hope it works for you, too!

ftp: u: unknown option

This one gave me fits for a couple whiles this afternoon. My commerce site ftp’s orders to another server for shipping. I was opening a pipe in perl to call ftp and send the file. Simple enough, worked for years and years.

Well, we recently upgraded our servers and intermittently I would get this message in the log:

ftp: u: unknown option

I was pulling my hair out because, subsequent to an updatedb, I’d issue a whereis:

[root@camera ~]# whereis ftp
ftp: /usr/bin/ftp /usr/share/man/man1/ftp.1.gz

OK, I’m in /usr/bin/ftp so let’s issue the command:

[root@camera ~]# /usr/bin/ftp -u
ftp: u: unknown option

What the haywire?  How about plain old ftp, as it’s being issued by the apache server (sometimes, because sometimes it works, sometimes it doesn’t – that’s the part I like the least).

[root@camera ~]# ftp -u
ftp>

Plain weird. Finally, good old find and env found my answer: we’re calling /usr/kerberos/bin/ftp aren’t we? Yes, we are.

So, I supplied the full path to /usr/kerberos/bin to my ftp call in my Perl module, and everything works. The mystery of why the failure was intermittent remains unsolved. Anyone care to venture a guess? I’m curious, but I’m not looking for any more answers for now.