PHP – FTP timeouts

Warning: ftp_site(): Transfer completed. 23188 (8) bytes transferred. in /Library/WebServer/Include/IIWheader.inc on line 102 Error: Site command failed.

I think I’m experiencing a timeout on a long running query. I found a couple of references to commands to address this issue and tried them to no avail.

set_time_limit(6000);
$old_max_execution_time = ini_set(“max_execution_time”, 6000);
$fn = rdb_query($conn_block, $host, $db, $query);
ini_set(“max_execution_time”, $old_max_execution_time);

the fix

ftp_set_option($conn_id, FTP_TIMEOUT_SEC, $runtime);

arrow keys in Terminal.app

export TERM=dtterm

this seems to make my arrows work when and where I want them to.

cool. and I can edit in Radio still

There are problems (sometimes) with emacs and other tools.

If you do this you probably don’t want “lynx” to be in color, so make lynx work like this

TERM=vt100; lynx

as a single command.

immutable flag on files

locked files got you down? might be immutable. see “chflags”

uchg set the user immutable flag (owner or super-user only)

The chflags command is your friend.

Fonts in GLterm

GLTerm is a very nice Terminal replacement, the only one which runs mc flawlessly. Unfortunately, the choice of fonts is quite limited. To use custom fonts in GLTerm you need:

1. Installed X11 from Apple or through fink 2. The getbdf utility (click here to download)

Choose a font visible to X11 (the fontname should look like ‘-adobe-utopia-bold-i-normal-‘. These names may be found in the fonts.dir and fonts.alias files under /usr -> X11R6 -> lib -> X11 -> fonts). You may try ‘fixed’ or ‘lucidasanstypewriter-12’ aliases to get the default X console font or Lucida, as well.

Start X11, go to the xterm window. You can see if your font name is correct by executing /usr/xterm -fn [fontname]. If you see no error message and you like the font in the new xterm window, you may proceed. Execute getbdf -font [fontname] > [newfontname].bdf in xterm.

Note the redirection (>), getbdf outputs to stdout by default. Copy the resulting .bdf file to /Applications -> GLterm.app -> Contents -> fonts (if your GLterm is in /Applications), either in the console or through Control-Click and Show Package Contents in the Finder. Restart GLterm, go to Preferences -> Appearance, and your custom font should be available in the list.

[Editor’s note: I tested this hint, and it works as expected, although it’s a bit more complex than expected. The one thing that threw me at first is that there are subdirectories in the “fonts” folder, and it’s those subdirectories that hold the fonts.dir and fonts.alias files. To find all the files easily, just type:

% cd /usr/X11R6/lib/X11/fonts % find . -name “fonts.*”

This will list all the fonts.dir and fonts.alias files in the various subdirectories. When you’re looking in those files, the names of the font is quite long. For example, in the fonts.dir file in the “misc” subdirectory, a random font name is:

-misc-fixed-medium-r-normal–14-130-75-75-c-70-iso10646-1

You need to use that entire string as the name of your font in order for this to work. When you use the redirect, give it a nice short name!]

Screen Shot Format

Apple’s Cocoa Development mailing list archives contain an interesting snippet that explains how to change the default screenshot (command-shift-3 and -4) format from TIFF to JPEG, PICT or PNG. The original article can be seen here (read the dialog box for the username and password), but it’s basically a one-line terminal command:
defaults write NSGlobalDomain AppleScreenShotFormat imageFormat

Replace imageFormat with one of JPEG, TIFF, PNG, or PICT to change the format of the screenshot

Disable Specific Software Updates

found on Mac OS X Hints…

In the midst of playing around with the newly discovered Software Update log file (see the recent hint), I also found out how to remove those annoying notices that pop-up when you try to quit Software Update without installing all the updates. In my case, it’s the AirPort update on my desktop G4. It shows up every time, and when I quit the updater application, I get a warning dialog about “are you sure you want to do this even though you haven’t installed this update?”

Like a few others published this week, this tip is probably blatantly obvious to many people, but I’d never previously looked at the menubar in Software Update. If I had, I would have seen the Update -> Make Inactive option. If you simply highlight the package you’d like to ignore and then select this menu item, you’ll get a dialog box warning you that you won’t be able to update this package while its inactive. Click on Make Inactive and that’s the end of the warnings when you quit Software Update.

If you ever wish to update the inactive package, select Update -> Show Inactive Updates and then reactivate the package(s) you are wish to update.

Again, my apologies if this was obvious to everyone but me, but I had no idea you could ignore updates!

Welcome

Replacing the Manila site with a Movable Type site…doing it all by hand.

CALCULATING THE VALUE OF IT

CALCULATING THE VALUE OF IT

By Bob Lewis

Posted February 07, 2003 12:00 Pacific Time

“Imagination is the only weapon in the war against reality.” — Jules de Gautier

Gartner has achieved fame and fortune through the publicity it generates from regular publication of outrageous “TCO (total cost of ownership)” calculations. It’s time for Gartner to share the fame if not the fortune.
Continue reading “CALCULATING THE VALUE OF IT”