jacob | 25 July, 2010 00:42
jacob | 07 June, 2010 09:18
In a previous post, I mentioned that I was receiving a bizarre error message: "Unable to create temporary work files". It turns out that it may not have been as bizarre as I had once thought.
After making the previously discussed change, things went downhill fast. Errors started coming in, dozens a day, from the same page. We had a brand new problem; every once and a while, queries on the same FoxPro data source would start failing. This was mostly during periods of high volume, and would also randomly start working again after a couple minutes.
My solution was to migrate all the data to a normal SQL database, and that worked – but while I was working on that, I was able to track down the problem.
It appears that the Microsoft Visual FoxPro ODBC driver was indeed having trouble creating temporary files. I found that, upon every new connection, the server created a randomly named temporary file in one of Windows' temp folders. It would then create another for the next connection, and another, and so on. It would keep on creating a temp file for each new connection requested by that process; in this case, the IIS worker process. File #14, no problem. 15 & 16 were cake. But upon creating the 17th file, it crashed and burned. This would make the database unreachable by each subsequent PHP page that loaded and tried to connect until the IIS worker process was recycled, or those files were deleted.
As I said, we solved it by moving all the data to SQL, but I thought I should post this just in case anyone else runs into this problem.
jacob | 06 May, 2010 12:06
Update: The plot thickens!
Since I work for a County municipality, we have a lot of bizarre stuff going on behind the scenes. For instance, we have an ODBC connection set up so that I can display a bunch of FoxPro data on our web site using PHP. Weird situation, right? Well, it gets weirder...
A little while back, I started seeing an error pop up every once and a while: "Unable to create temporary work files". I scoured the net, but wasn't able to find anything that would explain the behavior we were encountering. Luckily, I added in some logging functionality and was able to reproduce the problem.
Since the FoxPro data came from a production system, I copied the database (just a collection of files) on to the web server, to prevent hammering the application server with web traffic, and to prevent any security holes from affecting production data. A quick script copies all of the relevant files to the web server at night, so it has something to work with... or so I thought!
It turns out that I forgot to copy one of the files, and therefore one of the tables, over to the web server. Whenever we tried to display a property that referenced that table, everything blew up quite spectacularly and threw that vague error message. After amending the copy script and running it to get the missing files, everything went off without a hitch.
I know this doesn't make for exciting news, but I wanted to throw it out there just in case someone else ran into this problem, and received an equally vague error message. It also serves as a warning to any would-be developers: make intelligent error messages!
jacob | 05 May, 2010 05:54
In my quest for a cool Openbox desktop that fits me (you know, other than CrunchBang, which has elevated itself beyond sliced bread some time ago :) ), I ended up tearing up a lot of other perfectly nice distros and building some up from a base install. In each, I ended up tearing out GDM. It's little bit hefty for accepting two strings, and it doesn't exactly work with Likewise, which I use at work.
Once I did that, I was back to good 'ol Getty, which is as basic as you can get. That also means that it dropped me at a Bash prompt, where I would have to run startx manually to get all the GUI goodness going.
That's where this new trick comes in handy: the ".bash_profile" file. It should be located in your home directory - just create it if it doesn't. Once there, toss the following line into the end:
startx
...and "whamo!" You've got yourself an X session whenever you log in.
Original tip, and more info, courtesy of Debian Admin's article about starting X without a display manger.
jacob | 19 March, 2010 12:30
Just a quick post to highlight a great package I found in the Ubuntu Repositories: gcolor2!
gcolor2 launches one of those color-pickers with the hue/saturation triangle embedded in the color rainbow ring. It has a bunch of boxes for RGB values, hex name, etc. and so on.
Where this really shines is the eye dropper; if you click the eye dropper tool, and then go to another window, you can grab a color right out of another program. Window borders, web pages inside your web browser – even your desktop background. Pick whatever you'd like to use as your source, and it will give you the hex value and all of the other information for it.
This is perfect for use in combination with a program like Agave, which generates color palettes. If you use Ubuntu (and possibly Debian) and have the right stuff installed, you can install gcolor2 using the link. Enjoy!
jacob | 16 March, 2010 14:40
Recently I had to print at work, which required installing a printer on Ubuntu, so I thought I'd share how it went. Long story short: It went awesome.
First of all, I checked with OpenPrinting (now run by the Linux Foundation) to make sure if our office MFP was supported; and indeed, it was. In fact, it looked like it was supported by a whole bunch of different Linux printing methods. I'm most familiar with CUPS, so I did it that way.
Before I tried to install it, I made sure I had the HP drivers installed through the Ubuntu repositories. The packages are called hplip and hplip-cups; if you're using a Ubuntu-based system, you might even be able to click right on those links and have them installed. Otherwise, a quick search with Synaptic or Add/Remove Software should do the trick.
To install the printer, just visit the CUPS admin page, and follow the prompts. That was it - printing in just a couple minutes.
The only snag I ran into was the printer selection page of the process; it searched my whole network for ANY available printers, so I had a gigantic list of generic-sounding HP models. Luckily, we have the only HP 4345 in the building, so I was able to pick it out.
While I'm mostly posting this so that I can remember myself, who knows; maybe somebody will find this useful.
jacob | 04 March, 2010 16:03
Okay, quick note for myself later on - and anyone who may find it useful - about how to mount a Windows or Samba share in a Ubuntu Karmic/9.10 Minimal Install:
smbfs" and "smbclient" packages beforehandmount -t cifs -o nounix,noserverino,username=DOMAIN\\user,password=*****,file_mode=0777,dir_mode=0777 \\\\server\\share /mount/pointjacob | 26 February, 2010 19:00
As of today, I'll be booting into Ubuntu at work instead of the usual Windows XP. I am psyched.
For the past month or so, I've been spending an hour or so after work building up a second drive on my machine. I think I started off with Crunchbang, moved to Xubuntu with a lot of pieces stripped out, and eventually settled on a Ubuntu minimal install with Openbox for a window manager. Tonight, I was able to get the last bits sorted out that make it a sensible alternative in an all-Windows environment.
Here are a couple tips I learned along the way:
startx" to get to a GUI. There are alternatives, like qingy, but I didn't get very far with them.So far, things are going well; Ubuntu with Openbox is proving to be lightning fast and far out-performs my XP installation on the same machine. Hell, the XP VM runs faster than the native install. I'll keep posting tips and tricks I run into along the way, and who knows: maybe I'll save someone time in the process. Here's hoping!
jacob | 19 February, 2010 06:59
I've been working a lot with SVG a lot lately, and you know what? It would be really handy to have a SVG-like format that could be embedded via the img tag.
Hell, I'd even use the SVG format we have today inside an image tag, if I could. Note to self: find out why that isn't allowed.
Okay, now I need to get back to being late for work.
jacob | 16 February, 2010 14:13
Just a quick tip to keep in mind when overriding default color values on elements with CSS: Make sure to override all colors involved.
I have been bitten by this in some of my own sites. When I switched over to a dark theme in Openbox, all of the form controls inside web pages inverted from their usual colors; they now had black backgrounds and white text. This presented problems when people would change the text color or the background color of input fields, but allow the other property to stay with the default.
I can't tell you how many times I tried to enter something in a web form, only to realize that I wasn't going to be able to read the text I was entering, because the web site designer decided to specify black text on top of my black form fields.
The moral of the story: If you're specifying the color property, make sure to specify background-color as well!
jacob | 12 February, 2010 09:22
After running around on their support forums for a couple hours, one of the 2K support techs provided me with the following information:
You can create an offline profile by entering the GFWL menu, press home. Sign out of a profile if you already have one created. Select "Create New Profile". Scroll down slightly, and click on "create a local profile". You can then play the game offline without the need to remember passwords or account details.
While it's still not perfect, this at least makes the game playable. The aforementioned "Create a local profile" is a plain hyperlink, hidden at the bottom of the description of the Games for Windows Live "service". It's definitely one of those weasel compromises that Microsoft is famous for; enough to keep their legal team happy, while basically forcing their service on people. If the process of creating an account didn't fail on three separate occasions, I would have never known to look for it.
With that considered, though, I can kind of understand why the 2K people would have integrated this Games for Windows nonsense into their game. With the knowledge that it is, indeed, optional to use the service (if you're willing to hunt the fuck around), and that Microsoft usually pays people in Yachts to implement their bullshit, it must be hard to be concerned for your users when you can't see them through all of the giant green dollar signs that were covering their eyeballs.
I'm excited that I can play this game, but will definitely be wary of purchasing another one. Anything with a "Games for Windows Live" label on it won't get a damn dime from me, now that I know what to look out for.
jacob | 09 February, 2010 20:32
Update: There is a workaround that allows you to save games locally, but it still requires the Games for Windows application.
...or any games from 2K, for that matter. Watch out for the Windows Live Game whateverthefuck logo, too, because this apparently means your games are dependent on Microsoft for basic functionality (like saving).
So, I recently purchased a legal copy of the PC game, Bioshock 2, for my freedom-hating gaming partition. I purchased this through the Steam platform, as is normally my process.
After downloading the game, and attempting to run it for the first time, I was notified that Steam was installing SecuROM - a DRM used to prevent game piracy. I didn't like it, but I really just use this partition for games by shitty publishers that don't have a Linux port. I was already freedom-hating, so what do I care if they take away more of my freedom?
Then the game client launched, and asked for a CD key. Every other game I've ever bought from Steam hasn't needed this, but I don't mind the extra hassle too much. After all, those publishers need their pennies! I dutifully copied the game key into the game, and was greeted with an overlay for Windows Live Gamer something or other, which informed me that I could sign into it.
I informed it that it could go fuck a charcoal grill, and tried to close the overlay. I was greeted with a message that informed me certain things would not be available, such as saving.
Like, saving your progress in a game. Making a save file. SAVING.
Angry but still interested in trying to salvage some fun out of this game, I tried signing up for a live account. I filled out all the requisite forms (including the game CD key AGAIN), and was greeted by a 404 message from the Microsoft Live web site.
So, I'm going to look into getting a refund. I am most certainly not going to pay $50+ for a high-graphics version of Altered Beast. In addition, I will no longer be purchasing anything from 2K studios, or any game that integrates Windows Live Games for Genuine Advantage Gaming Ultimate Rainbow Unicorns.
Maybe I'll look on the Pirate Bay - I hear pirated games have a much better experience, as all of the DRM has been circumvented ahead of time. I've payed thousands of dollars in hardware and games to be a PC gamer, and I'll be damned if I'm going to stop because Microsoft and 2K want to make it difficult for me.
</rage>
jacob | 23 January, 2010 11:53
I've recently transitioned myself over to a Openbox-based desktop by installing Xubuntu and pulling out most of the XFCE stuff. It's been quite the learning experience, and I've discovered a couple things that I thought I should share:
At first, I was running Openbox without any panel at all, but in light of Tint2's awesomeness, I can't see doing without it. These are the kind of little things that make me love Linux and Free software so much.
jacob | 08 January, 2010 19:07
I finally got Postfix configured correctly (if not completely) on my VPS. It took a lot of poking, but now I can send and receive mail in SquirrelMail. While this is only the beginning of the configuration, it's a nice feeling to have something "click" and start functioning. I owe it all to the fantastic Postfix documentation - quality stuff they've got there.
As a nice side-effect, PHP is also able to send mail out - and that was a BIG stumbling block to getting sites migrated over. Those PHP mailer scripts sounded like such a good idea when I was embedding them in each site...
It's been loads of fun getting this running, but it has also shown me how immensely small my sys admin knowledge really is. I administer Windows servers at work, but Linux is a whole different ballgame. I felt quite lost in the beginning, but in the months I've been working on this server, I feel like I've learned tons more about the software involved and how it all interacts. Each time I go back into a config file, I see mistakes I've made and correct them, and the server runs a little smoother.
Okay, next adventure is going to be getting Postfix configured for virtual domains, and allowing authenticated users to relay mail with their mail clients. SquirrelMail is good stuff, but I'm not going to force it on clients!
jacob | 29 December, 2009 15:32
I decided to create a collapsible/expandable navigation script as one of my first forays into jQuery, and ran into an interesting issue with the way I was using the wrap() function, and the way Internet Explorer interpreted it.
I was adding some anchor tags via wrap(), like so:
$('#selector').wrap('<a href="#">');
This worked fine in every browser I tested in, as long as it wasn't made in Redmond. The code ran fine, without any errors, but wrap() never added the anchors. This really stumped me for a while, since it not only broke in IE6, but 7 & 8 as well.
A quick change to the code, however, had everything working everywhere:
$('#selector').wrap('<a href="#"></a>');
Who knew IE was a stickler for properly formatted code? I'm not sure why this happens, but hopefully my discovery will save you some time in the future.
All content, graphics and, design © 2005 - 2008 Fragmented Development. All rights reserved, may contain peanuts. Powered by LifeType.