Apr 21 2010

PHP.ini Issues on Fat Cow Hosting

by andrew

You’ll have to bear with me – all of you who are interested in our story for the human aspect – I must descend into Geekdom Venting Land for a post here.

I’m a story teller, so if you just want to know how to fix shopping carts or other PHP web applications hosted by Fat Cow, skip down a few paragraphs.

Renee and I design and code websites together and between the two of us we’ve worked on everything from massive enterprise SharePoint driven collaborative web environments to mom-and-pop hand crafted simple sites and everything CMS or static in between. We’ve built and hacked and skinned and themed Drupal and WordPress and even peeked at Joomla, and we’ve done it across quite a range of hosting providers over the years:

  • Go Daddy (our personal favorite for a while now – a little too clicky but the best admin tools and excellent support)
  • Fat Cow (a pretty amazing deal with their unlimited plan)
  • 1 and 1 (so so… wouldn’t recommend necessarily, but tolerable)
  • iPowerWeb (sometimes a necessary evil)
  • HostPrince (I do NOT recommend them at all, but my experience with them is a couple years old now)
  • etc.

Implementing similar solutions across a variety of hosting platforms, I probably shouldn’t be surprised, but I am still caught somewhat off guard by the variety out there in default configurations and compliance (or lack thereof) with best practices that sometimes get taken for granted.

Case in point: Fat Cow’s default php.ini file is simply atrocious. I love their unlimited plan, and in my short experience with them so far their service is solid. But it’s like they installed PHP on the shared servers a few years ago and never touched the php.ini config. Ever.

Why is this a problem? Well, if you want to run anything like WordPress you’re going to need more than teh default memory_limit = 18M from like 1980 (ok, not really but you get the point). Go Daddy defaults theirs to 32M I think … or maybe it’s 64M now… And if you want to run anything like a shopping cart that requires php sessions – forget it (unless you start by uncommenting the session.save_path line and setting it to something useful – even though the session.save_handler = files … unreal! by default it tells php to use the filesystem to save sessions but doesn’t give it anywhere to put session files.).

This all finally came to head when I was trying to get eShop working in WordPress for http://ordercu.com

I knew eShop was probably NOT the culprit because we set it up and have it working great on http://foodbeautiful.com (hosted by Go Daddy).

What is funny (not) is that 2 months ago I had beaten my head against 3-4 different cart systems in WordPress for  http://indiefilmvideo.com (also hosted on Fat Cow) and never got to the bottom of why they wouldn’t work quite right. Well, now I know.

SO – the moral of the post is, here are the first tweaks you might want to make to your php.ini file if your host is Fat Cow. (If you don’t know where to find the php.ini file or how to modify it, you probably shouldn’t anyway). These are the changes I have made so far. In each case, just update the values being set.

  • memory_limit  = 64M
  • [uncomment – delete “;” – and set session.save_path to something like]:
  • session.save_path = “/home/users/web/b2634/moo.ACCOUNTNAME/cgi-bin/tmp”
    (make sure you pull YOUR actual home path from the front page of the Fat Cow control panel)
    (without this change php sessions will not work and you will get bizarre behavior in shopping carts where the things you add to the cart disappear on checkout or subsequent visits to the cart)
  • register_globals = Off
    (eeeek! can you believe that was still defaulted to On ???)

So, there you have it. Even with these basic tweaks WordPress will hum a LOT faster and you’ll actually be able to use shopping cart plugins for it. Imagine that.


    Apr 8 2010

    Day 362: Slowing Down – NOT!

    by andrew

    What a amazing week… well and a bit I guess. We had an amazing Passover and Feast of Unleavened Bread for the last week here in PA, met some incredible people, lots of fellowship, meals, sharing, learning together etc. Still managed to put in nearly 40 hours on projects even with 3 Sabbaths in there. Don’t know how I pulle d . adf firgh Zzzzzz….

    wha … What? what was I saying? Oh right, anyway. This will all be more cursory than it should be because I am in the process of digging out of a 3-month photographic hole. I have 2 down and 1 to go and will share in a second. So back to updates: the kids are in wild country mode: scraping knees, swinging on rope swings, playing in the creek, cutting bare feet, flying down the hill on scooters, running around with friends, that sort of thing.

    Other highlights: Reayah got to be be a flower girl in her first wedding experience, I just spent three hours with Bennah “organizing” his bed (a bio hazmat operation I can assure you)… actually that might not make much sense to you unless I also provide the additional detail that the kids keep all their personal things / toys / collections at the foot of their beds, Joy is both participating in and resisting potty training at the same time quite nicely, Zach and Jaiden are quite the buddies now and while Zach is convinced we are going to build a flying car together this summer – one that actually flies – Jaiden just wants to make sure that he is doing whatever his brothers are doing.

    It’s raining gently outside… such a soothing thing… totally different experience than from inside a house. I got two new drain spouts attached to the rain channel today (I knocked them off a couple months ago when a branch reached out across an otherwise reasonable turn radius and scraped a few little holes in our rubber roof that we discovered a few weeks later during a massive downpour in the form of extra water we didn’t need in the kids room). I patched the holes up earlier in the week.

    Today was laundry day. And grocery day. And pick up the new door latch from the RV dealer finally day.

    I have to tell you about our main door latch. Ok. Proof positive that things are engineered to break – this was the most ridiculous design ever – back in Florida the tab that was responsible for making the entire handle and latch mechanism work broke clean off and we were stuck inside the trailer until I disassembled the whole thing. I tried everything to avoid having to buy another cheap replacement that would just cause another head ache later. I am not kidding – here are some of the random things I employed in various attempts to rig it (some of which lasted longer than others): aluminum from a beer can, JB weld (but it was too old to last) and a hex nut, a screw, a modified golf tee (still inside the spring to control handle travel distance), hockey tape by itself, and hockey tape with pop-sickle stick (which is actually working fairly well so far). But the moment of truth will come and I better get a proper replacement in there. It has been quite a thorn in my side.

    Anyway, enough boring RV life drivel. Here are some pictures! Including some from the solar panel project that I added to the truck.

    January 2010

    February 2010

    Solar Panel Project


    Mar 13 2010

    The (new) Movie Page

    by andrew

    So, let the movie parties begin! I have finally come out of the video editing, rendering, and uploading mire bruised and scarred but victorious. After no less than 3 attempts on each, uploads and deletes, codec woes, and other sundry technology battles – Episodes 1-3 of Journeys (the quasi-documentary) are LIVE!

    The best way to watch them is on the new page I created just for this purpose. I’m playing with a very sweet new tool by Apture, and I think you will find the viewing experience quite fun! – Go to The Movie (up in the top menu) to watch all the Journeys episodes. I will also update that page as I add episodes in the future.

    Or, you can also watch them on my YouTube channel.

    I’ve also updated The Map with the last legs of our travels.

    We are getting ready to leave Georgia in a few short days and work our way back up to Pennsylvania for spring. We’re hoping to swing through Hampton Roads (VA) and Washington, DC along the way and drop in on some friends in our old stompin’ grounds.


    Dec 3 2009

    Day 236: The Plot Thickens

    by andrew

    This was my typical atypical day – as many days are becoming more and more so lately.  I know this post is going to feel like it’s turning into a commercial here pretty quickly, but I can’t help it: that’s just the way my life is now.

    I rolled out of bed at about 10:30am… I think. It might have been closer to 11:00am actually. My night had been interrupted by a couple hours of work from about midnight to 2am. But I actually had a nap before that for once. The new normal is that 2am is my routine bed time. Some times later. I have been entrenched in a project for two weeks now that is proving to be a total blast.

    My partners and I at Garlic Media signed an agreement yesterday to provide full-blown marketing campaign services to La Vie Labs (http://www.lavielabs.com). Our efforts and initiatives span the entire spectrum: internet presence, SEO, web design, social media integration, networking, product placement, retail, wholesale, video production, media leveraging… the works.

    La Vie Labs is an incredible company that has assembled the connections and resources necessary to  bring a breakthrough anti-aging, skin care product to market. What makes this facial serum called Clairte so special? There are a million anti-aging creams, serums, gels, lotions, and liquids already out on the beauty market today. However, unlike every other product in its class, Clairte is made from only 6 pure, natural, and concentrated ingredients. It’s primary potency is found in the immense nutritional essence extracted from placental stem cells through a proprietary process. Clairte represents the latest cutting-edge technology advancements in ethical stem cell research. There are still many misconceptions about stem cell research – I once held a lot of them myself. For instance, most research has now shifted away from embryonic stem cells, which are actually inferior in terms of nutrient potential compared to placental stem cells. Modern, ethical stem cell research is turning what were once essentially waste products – human placentas – into regenerative treatments and serums that have amazing properties.

    If you (or someone you know) might be interested in trying Clairte to solve wrinkles, large pores, or any number of other skin-related issues please check out the web site for more information. And since you are gracious readers of my lengthy, rambling accounts – here is a coupon code for a FREE Travel Pack of Clairte ($39 value) to use at check-out: EDGEVIP1  – or, better yet, here’s a discount code for 33% (!!!) off your first bottle: EDGEVIP9 – Take advantage of these discount codes quickly, because they will expire in two weeks (on Dec 17th). Also, they are only valid for 1 use per person, but share them with your friends and family! Tell them to come read about our adventures here, and if they create their own account at La Vie Labs.com they can use the coupon codes above for themselves too!

    So, after navigating through a torrential downpour of emails between 11:30am and 1:00pm (the results of a great meeting with La Vie Labs yesterday), we piled the kids in the truck as the snow was falling and headed for some lunch and a visit to the local indoor monkey gym (www.monkeybizness.com).

    On the way I had to pull over and stop in a parking lot to somewhat concentrate because I got a call from Videography Magazine. I did an interview with them that Shutterstock facilitated based on an article I just wrote for them. My article was about stock footage and the challenge of finding a niche in a very competitive industry (click to open my article).  So, it looks like awesome folks at Videography Magazine are going to run an article about my adventures in filming for stock and traveling as a lifestyle – what a fantastic and thrilling blessing, to be sure. They will also be featuring this blog in the article! How COOL! I am having copious amounts of fun through all these opportunities! And no I am not making any of this up.

    Finally at Monkey Bizness after that, the boys and I spent a couple hours getting most of our boy energy out for the day. Chasing them is hard work! Oh, and the girls had fun getting their energy out too. It was an official family afternoon. We all came home tuckered, but we managed to hold it together long enough for supper to be ready. Reading the next chapter to Bennah and Reayah from A Wrinkle in Time by Madeleine L’Engle (whom my uncle in New York knew personally) certainly helped pass the short minutes, which can seem long to tired-hungry-grumpy kids. Finally, we had some of my mom’s amazing home-made turkey soup and Renee’s super-yummy biscuits.

    Then, the bed time rituals, and my work day began. I’m still hacking a buddy’s old seized up Blackberry to recover what I can of his 901 contacts. I’m up to 418 so far after 2 days of working on it… I will get the rest though! Then I had a Skype conference call to Thailand with several other participants here in the U.S. Ugghhh. The call kept dropping. Busy night on the Skype pipelines I guess. Or maybe it was all the Macs trying to stay on the call in an older version of the client. Then, back to work on La Vie Labs initiatives like transcribing an amazing testimonial video we are getting ready for the web site and many other things.

    Then, I had to draft this. I should have gone to sleep a long time ago instead, but now this is one less thing I have to do later.

    Thanks for all the comments by the way. We’re having fun in Colorado and learning and growing like Renee wrote. A huge part of that learning and stretching has come with the overall shift from more or less vacation mode to me working full time again. But it is still awesome to have so much flexibility in my schedule… I just have to remember to use it wisely and guard priorities. [published the following evening]


    Sep 3 2009

    Adventures with Andrew

    by andrew

    Introducing one of the media threads I hope to maintain periodically: Adventures with Andrew.

    I was in REI a couple months ago in Missoula, MT and this little guy caught the corner of my eye – the HERO camera (http://www.goprocamera.com/). It caught my eye because my dad had told me about it just a few weeks prior and sent me the link. It was easy to justify the purchase because I wanted to see if I could also use it to produce acceptable stock video clips using it’s rudimentary time-lapse features. Yes – the business angle.

    In fact, some of my initial experiments have already been accepted at Shutterstock, for example:

    Those were all shot using the HERO camera. I’m in the process of submitting them at a couple other stock footage sites, and I’m looking forward to squeezing more stock-worthy content out of the little camera. But enough about business… this particular introduction is about having some FUN with the new toy.

    So, I had this idea to start up a little series of episodes connected by a particular theme along the lines of exploring some strange places and attempting some adventurous (i.e. crazy) escapades… and I’d capture chunks of the adventures and edit them together into fun little YouTube clips. Of course, they would have to be called something cheesy like “Adventures with Andrew.” Maybe I’ll even start taking requests for Adventures through comments here and on YouTube… for example, if you give me a crazy (but it better be good) idea of something to try or somewhere to go, I’ll shoot the adventure with the HERO cam and you can have your very own made to order vicarious adventure with me. You’ll almost feel like you were there!

    And then again… maybe the world is not ready to go on Adventures with Andrew yet. But I guess we will find out. I have several more episodes that I’m still editing to post, but here is the first one in all its glory.

    A few interesting facts about this particular adventure:

    • Location: West Cost, USA near Lincoln City, OR
    • Time: very very early
    • Water temperature: not as cold as the ocean itself (at least 55F)
    • Air temperature: about the same as the water
    • Gear: Vibram Five Fingers Footwear, swimming suit, dry bag, t-shirt, fleece
    • Original video length shot: over an hour, but most of it was really boring, just crawling through overgrown bush on a steep incline that you can’t tell was steep on the video

    Adventures with Andrew Episode 1: Exploring the Foggy Forest Timber Playground

    Andrew swims across a river to explore an otherwise inaccessible overgrown wasteland of fallen trees and wild bush. He climbs, hangs, jumps, crawls, walks, and slides over the seemingly impassable terrain. Join him on the very 1st Episode of Adventures with Andrew. Ok. It’s cheesy, but you love it.


    May 22 2009

    Day 41: Favor

    by andrew

    YHWH is finding favor with us at this campground. He has given us a neat relationship with the owner even though we didn’t really do anything special to seek it out. The family that runs the gas station / campground here is really nice and helpful. With my background in computers I was in a position today to help the owner get his wifi broadcasting from the coffee shop into the campground again (he had an antenna / repeater / booster that was unplugged for the winter and I made sure it was all connected correctly and verified the signal for him).

    He’s interested in expanding the range throughout the whole campground, so I went around with my pocket pc surveying the current signal strength per site. After I had a picture of how the layout and foliage affected the coverage I walked around with him and made recommendations as to how many repeaters he might need and what existing structures / poles / etc might make ideal locations for them to cover the rest of the campground.

    I was happy to help! And the immediate benefit for us is that WE ARE NOW FULLY CONNECTED RIGHT AT OUR SITE!!!

    Actually, this is a huge deal, because I’ve been battling the Autonet Mobile connection for days. Their support team has been excellent, but what we’ve discovered together is that Canada is a problematic no-man’s land of wireless data service when it comes to roaming. We’ll see what the final outcome is, but for now I will be diplomatic and protect most of the guilty with some anonymity. Basically it works like this: Autonet advertises data coverage for the U.S. and Canada because the carrier / provider they use advertises coverage in the U.S. and Canada. Essentially, Autonet themselves are a customer to this carrier on behalf of their own customers. Their carrier in turn has roaming provision agreements in place with Canadian carriers to (in theory) provide data and voice service to their customers. Confusing?

    Well, the Canadian companies, it turns out – and I’m thinking of one in particular – seem to be (at the very least) somewhat unconcerned about the data connections of the customers who are on their network via a roaming agreement. In fact, looking at the logs and observing continuous ping behavior, it seems like their network is actually terminating data connections at a fixed interval. This has been the source of our woes.

    Autonet is still working with me to get a solution – and they’ve been fantastic. Ultimately, I’m hopeful, however – I’m keenly aware that the reality is this: I’m the customer of a customer of a customer of a service. When you boil it all down, that’s the true picture, and there are a lot of moving gears in the overall scheme of that arrangement. It would only take one uncooperative gear at any level to translate into my service not working reliably.

    Also, I’d take issue with the statement on Autonet Mobile’s FAQ that says: “Autonet Mobile is the Internet Service Provider…” I guess this is true from a certain vantage point, but traditional broadband ISP’s generally have their own infrastructure and Autonet does not. To the marketing team’s credit however, the web site has already been updated to correct their ignorance in advertising. The original page pulled from Google cache as of May 7th (which sold me on the service) states: “…to give you the broadband speed and expansive coverage in both the US and Canada.” The cached page also includes a link to a coverage map that clearly shows the US and Canada. The new page, by contrast, states: “to give you broadband speed and expansive coverage over the entire United States,” and includes a link to the coverage map of their service provider.

    This might all sound like I’m trying to slam Autonet Mobile. Well, I was quite disappointed that they didn’t deliver the reliable service in Canada that was advertised, since that was one of the biggest requirements I had as I was shopping for service – knowing we’ll be spending a lot of time up here. However, their support has been superb, and I’m still hopeful that they will work something out on behalf of the customers who need connectivity throughout North America. I really hope that they don’t decide to give up on Canada and take a minimize-the-losses approach. The ridiculous state of affairs when it comes to cross-border data sharing and service really needs to be kicked into the 21st century. Maybe Autonet will take the mantle and be one of the pioneering catalysts.

    But, for the meantime YHWH has looked out for us anyway – we now have a solid connection through the wifi at the Campground all the way inside the trailer – and for that we are very thankful!!! Thank you YHWH! Thank you Welcomestop! No more packing everything up to go spend a few hours at the coffee shop; no more leaving the laptop at friends overnight to get some bulk uploading done; no more sneaking in email checks and uploads when we’re with family for dinner… and, truth be told, the upstream data rate over wireless here (even with only 2 bars) is actually FASTER than either location that I tried in the city hardwired to a cable connection. Ah… it’s the little things in life.

    Ok, back to the work I should have been getting done instead of this little praise/rant before Sabbath sets in.


    May 10 2009

    Day 25-29: Over the Appalachians

    by andrew

    We are surviving our first bout of hard-core travel and campgrounding, but it hasn’t been without … um … “events” shall we say? I think I have previously lamented the fact that there are not enough nanoseconds in the day to do these tales justice with the flowing, detailed narrative they deserve. But let me recap the last few days of adventure in bullet form lest current events overtake the record and press it with their own need to be captured.

    Day 25 (Wed, 5/6/09):

    • Intended day of departure from PA… slow going with all the final preparations even though we had done most of it the day before…
    • 3:00pm, still planning to leave and make some progress, final checks on the truck… needed oil change badly… likely not going to get on the road after all…
    • 3:30pm, Jaiden (age 2) falls in the creek and gashes the back of his head open, Reayah (age 5) was right with him when it happened, watching him like we’d asked her too; she got Bennah (age 7) right away because he was close by; Bennah pulls Jaiden out of the creek and stays with him (he’s soaked head to toe, his head is bleeding, and he’s screaming from the shock; knowing Bennah is with him, then Reayah runs to the the trailer (just a few hundred feet away) to get us; I run down there, scoop up my little brave soaking wet explorer and hustle him back to the trailer; Renee cleans him up, and we get ice on his head; he shows initial symptoms of a mild concussion; we pray for him, battle our fear, and the symptoms clear… at that point we were obviously not going anywhere that day… wanted to watch him closely and make sure he would be alright.
    • Jaiden was quiet for a bit but was his old giggly self before too long and the delay worked out to let us go visit some other dear friends about an hour away who we hadn’t seen in a long time.

    Day 26 (Thurs, 5/7/09):

    • On the way to get some errands done in the morning (one of which was getting the oil changed) I got stuck behind some SLOW traffic with no passing lane. There were alternate routes I could have taken into town, but I was keenly aware of YHWH saying that the situation was an example to me: He is slowing us down, every part of our lives… our previous life was lived in such servitude to schedules and TIME… always trying to get things done in a rush or having to be somewhere quickly… we are learning to slow down and become more aware of the NOW.
    • Of course, that approach leads to things like 2pm departures. But we were finally on our way.
    • And our first real mountain driving across I-80… what another example of slowing down… pulling 17,000 lbs total up some climbs brought us down to 30 mph in a couple spots to keep all the gauges in the mostly happy zones. Average maybe 45-50 mph. 60 mph on the downhill. Slowing down like that was HARD (for me because I much prefer the speed limit +5 rule of thumb). But I learned how to ride my gears on the auto tranny based on the precise position of the pedal and the current RPMs, speed, and incline of the road.
    • How do I know we were pulling 17,000 lbs? Because we finally found a scale that worked. For $5 I found out that:
      • my front axle was carrying 3140 lbs (GAWR 4250)
      • my rear axle was carrying 5380 lbs (GAWR 6000)
      • my trailer axles were carrying 8760 lbs (GAWR > 8800)
    • What a relief – we were under ALL our limits, which up until then was actually quite doubtful. We are pulling more than the overall recommended weight for the stock make / model / year, but we’re not driving a stock vehicle… and we can always sacrifice speed to make sure we don’t overwork the engine.
    • We rolled into a Wal-mart in Ohio at 10:30pm only to discover we had NO power from the trailer battery. I knew I needed to replace it, but it had never been totally drained before. This meant no tongue jack (to relieve some weight off the truck for the night and stabilize a bit) and no slide-out (which means the kids room is barely accessible and the bathroom is inaccessible – except to Jaiden and Zach who can squeeze through). Then, after getting the kids to bed doubled up on the pull-out couch and fold-down dinette, some initial checks on the wiring suggested that the trailer outlet on the truck wasn’t wired right and maybe hadn’t been charging the trailer battery during travel. It was a project for the morning, but it was going to mean a LATE departure.

    Day 27 (Fri, 5/8/09):

    • Renee entertained the kids in Wal-Mart the next morning while I discovered that positive cable connector had completely snapped off the terminal (hence, no juice). Battery also needed replacement. Not satisfied that the trailer plug on the bumper was resolved, but it could wait; new battery and cable rewired, we pulled out around 1:30pm, gassed up and hit the interstate once more.
    • We entered Sabbath with an Indiana sunset and a spectacular visual reminder of what we love so much about traveling.
    • For whatever reason, I was determined to get to Chicago that night, and be done with it. But wondering if we shouldn’t heed the lessons of slowing down I tried to stop at a Flying J around 10:oopm but it seemed to be rigged only for trucks (or cars) but there didn’t seem to be anywhere for RVs to park… which was very strange… but we pressed on…
    • YIKES. 90/94 W through Chicago at 10:30pm on a Friday night… talk about some serious prayerful towing driving… that is an experience I’d rather not have to repeat… ever…
    • 11:01pm pull into Wal-mart on the other side of Chicago and join the ranks of a couple trucks and a couple motorhomes.
    • Stabilized on the tongue jack but still not using the slide-out after confirming that the new battery did not charge during the day of travel.
    • Settled in for a crazy night of some of the most insane wind we’ve half-slept through ever. The Windy City’s way of greeting us I suppose. The trailer rocked and shook like a dingy tossed around at sea, and that next morning Wal-Mart’s array of plants outside the Garden Center in the parking lot had suffered the damages of a tornado through a trailer park on a botanical scale.

    Day 28 (Sabbath, 5/9/09):

    • 9:00am on the way to our final intended resting spot for the area – Illinois Beach State Park – another hour north.
    • 10:00am pulled in, found a site, set-up, registered, Jonathan (my brother who lives in the Chicago area) arrived, and we thought to ourselves – smooth sailing from here!!!!
    • or not
    • Discovered that the fridge wasn’t on and wouldn’t turn on.
    • Zach (age 4) found a small bead the exact size of a 4-year-old ear canal and he had not been previously, properly trained about what things (i.e. everything) should NOT be inserted an inch or so into one’s ear.
    • Between Zach lying on his side on the couch, ear hanging over and down, Jonathan holding his head level, me underneath looking up from the floor with a headlamp shining like some sort of mechanic pulling his ear down and forward while squirting water into it with a syringe while Renee consulted her mom (a nurse) on the phone regarding the correct angle to pull a child’s ear when it has become the container for a foreign object… and MUCH prayer… we finally got the crazy thing out. I’m not kidding, initially you couldn’t even see the bead without pulling the ear back first and shining some light.
    • I finally found the access panel (on the OUTSIDE of the trailer) to check if the fridge was even plugged in… which it was not (shaken unplugged in our travels) and that was working again so we could finally explore the campground a bit.
    • Came back and headed to Jonathan’s (an hour a way) for an awesome home-cooked meal (thank you Jonathan!)
    • Back to the trailer after that only to discover NO power – AGAIN! Even though we were plugged into the campground 30 amp service. No matter what I did, every time I plugged in, I tripped the 30 amp GFCI breaker….

    [historical background digression]: there is a story here. When we first got the trailer, I discovered that the ground pin on the main 30 amp shoreline cable was broken. Now I suspect that this was done by the previous owners intentionally after having some frustrating electrical issues with GFCI circuits at campgrounds, but at the time I was thinking… this is not right, it needs to be fixed. So, I cut off the old broken plug and wired in a spiffy new 3-prong 30 amp plug… and I immediately started tripping the breaker in the garage that I had previously been plugged into without any problems. Safety = Pain in the Bum. Just like in the programming world. (Security = Pain in the Bum). In fact, the overkill in both arenas of Safety and Security largely result from the moronic behavior of a few individuals who make life much more complicated for the rest of the human race. My solution a few months ago – plug into a different outlet in the garage that was not GFCI protected, and forget about the whole thing.

    • Ah… the GFCI incident came back to haunt me didn’t it, here months later, in the up-until-2-am-with-a-multimeter-and-internet-forums kind of way. Current theory: electrical systems in RVs can be a Pain in the Bum. Solution so that we could have heat, keep the battery charged, and I could go to bed: break the ground prong off of an extra 30 > 15 amp adapter and plug into the 15 amp service (also GFCI) for now. [THIS IS NOT SAFE. DON’T DO THIS. YOU’VE BEEN WARNED…. but if it comes down to survival… ;)]

    Day 29 (Sun, 5/10/09):

    • Renee and the kids out for a walk while I narrowed down the electrical issue at least to a specific circuit in the trailer… the one that has most of the receptacles (outlets) and the converter (which converts the AC to DC for charging the battery and running the DC appliances). Now if I can just dig up a little more electrical know-how than I currently possess I might not have to pay someone to fix the whole mess for me. I get the feeling that it could get involved. Especially if most or all of the outlets on that circuit were wired with the ground and neutral bonded. Ugh.
    • Met Jonathan for a tasty lunch, because life must go on.
    • Got some grocery shopping done and other errands.
    • Including a couple outlet testers from Home Depot that ended up telling me nothing I didn’t already know (they say all the outlets check out just fine, so the mystery continues).
    • Took the kids to an amazing playground. There will be photos of it posted somewhere eventually.
    • Brought them home, fed them, got them to bed.
    • And here I am typing this.

    Congratulations, you have passed the very useful course: Reading Andrew’s Long Winded Posts (Even When They’re Written in Bullet Format) 301.

    For further entertainment:
    Updated Trip data
    Updated Map

    I also have a bunch of photos queued for upload (and more that I have to sort and queue) but I have to wait for a decent hard connection to get the upload done.


    Sep 16 2008

    Bending InfoPath and SharePoint to Your Will: Dynamic, Filtered Queries through Data Connections with Minimal Code

    by andrew

    [migrated from http://edgedev.blogspot.com]:

    It seemed simple enough at first. All I wanted was a way to dynamically pull data from Lists and Document Libaries into InfoPath. Oh, but did I forget to mentioned that I also wanted the data filtered BEFORE it hit InfoPath because the Lists and Libraries might be massive (go figure). Trying several things, it became obvious that I needed a faster/better/easier method than any of the following:

    1. Using a baked-in InfoPath data connection to a List is easy, but it retrieves ALL List items and leaves filtering to the controls. This is obviously a horrible method when working with large data sets.
    2. Using custom code-behind on the InfoPath form to query SharePoint via the object model is perhaps the cleanest method, but adds code-bloat, is not very modular, and requires extra maintenance.
    3. Using a web service data connection from InfoPath to SharePoint web services (like http://[site]/_vti_bin/lists.asmx?op=GetListItem) would be perfect, except that InfoPath does not form the xml in the SOAP request correctly (i.e. the way that SharePoint is expecting) and returns an error. Actually, this boggles my mind. Somebody please correct me if I’m wrong here and/or if there is a clever workaround that I couldn’t find / figure out. This seems like an incredible oversight on Microsoft’s part for 2 products that are supposedly designed to play nice together.
    4. Since I’m in a K2 blackpearl environment, I also thought about using a SmartObject, which rivals option #2 for cleanest method, but it also adds an additional maintenance tail outside of InfoPath and requires additional wiring inside the form.

    Looking for a solution, I stumbled on this article – http://blogs.msdn.com/infopath/archive/2007/01/15/populating-form-data-from-sharepoint-list-views.aspx – at the InfoPath Team blog which formed the basis for a new idea:

    To summarize – if you don’t want to have to read through the whole article yourself: This little known feature allows you to pass GUIDs for Lists and Views, along with filter parameters, in the URL querystring to owssvr.dll and dynamically retrieve an XML “results” file. Furthermore, the URL itself can be used as the file location for an “XML Document” data connection in InfoPath.

    The main hurdle is that, once the data connection is created, it doesn’t seem on the surface like there’s a way to dynamically update this file location to retrieve a different XML Results Document from a List or Library based on related fields in a form that has been opened. Well, it turns out that the InfoPath object model exposes this property and lets us manually execute the query.

    In my particular scenario I wanted to retrieve a group of documents (metadata) from a massive Document Library where a DocumentColumn matched a particular FieldValue in the form opened. Here’s what I did:

    1. [Optional] Create a View of the List or Doc Lib that contains the specific fields you want retrieved into the Form
    2. In the Form, add a new Receive > XML Document data connection
    3. For the “location of the XML data file…” in the wizard use:
      http://[server]/[site]/[list]/_vti_bin/owssvr.dll?Cmd=Display&List={LIST_GUID}&XMLDATA=TRUE
    4. [Optional] Include &View={VIEW_GUID} if you want to pull data and columns from a specific view that already exists or was created in step 1.
    5. Note: the GUIDs in the querystring parameters can be in either format:
      a. “{xxxxx-xxxxx-xxxx-…}”
      b. “%7BF498875E%2D5A645B%2D…” (as copied directly from SharePoint generated URLs)
    6. Complete the data connection wizard – this will add the unfiltered data connection results schema to the Form (you do want the unfiltered schema). Make sure the following settings are set as you complete the wizard:
      a. “Access the data from the specified location”
      b. [UNcheck] “Automatically retrieve data when form is opened”
    7. To add the repeating table that will hold the query results, find the xml/rs:data/z:row repeating group in the new data connection and drag it onto the form
    8. To complete the solution, a little code-behind is necessary (but it’s minimal and a LOT less code than method #2 mentioned at the top). There are probably several ways to do this (like wiring the code to a button or another event), but here’s my basic approach:
    9. Since the ID will already be stored in the form data by the time the user opens it (in the context of a K2 workflow), I use the form’s Loading event to modify the connection URL and execute the connection.
      a. In InfoPath Designer: Tools > Programming > Loading Event
      b. In Visual Studio Tools for Office: Insert > Loading Event
    10. The following code will append – at run time – the filter parameter and value from a field in the form to the XML Data Connection location URL and execute the data connection to retrieve the hits:

    // we need to instantiate a typed data connection object
    // to modify the query and execute the results
    FileQueryConnection dc = (FileQueryConnection)(this.DataConnections
    [“NameOfXmlDataConnectionCreatedThroughWizard”]);
    // next, we append the filtering values from the form field(s)
    // to the existing URL already stored in the data connection
    // –see notes for description of readNode()
    dc.FileLocation += “&FilterField1=DocumentColumnName&FilterValue1=” +
    readNode(“/my:myFields/my:FieldInForm”);
    //finally, we execute the data connection to return the results
    dc.Execute();

    Notes:

    • readNode is a little helper function I add to all my InfoPath forms so that I can quickly retrieve the value of a node without having to jump through navigator objects every time I want to get something. It looks like this:
      public string readNode(string xpath)
      {
      return MainDataSource.CreateNavigator().SelectSingleNode(xpath,
      NamespaceManager).InnerXml.ToString();
      }
    • I think the SharePoint URL trick supports multiple FilterFieldX and FilterValueX parameters, so in theory, you could build pretty sufficient queries using the querystring alone. For example:
      “&FilterField1=ColumnName1&FilterValue1=Value1&FilterField2=ColumnName2&FilterValue2=Value2”
      This trick might also be leveraged throughout other events in K2 workflows since it returns standard XML and the query results are stored in /xml/rs:data/z:row.

    Use this knowledge wisely. And have fun.