obsession boyfriend i'm psyched girl crush i'm dreading enemy

(need an explanation?)

advertisements





when in Stratford-upon-Avon, U.K., I stay at
Adelphi Guest House




maryann buzz Sun Aug 09 09, 1:06PM
| comments (11)

server issues, again, and a question for the technically minded

If I’m guessing correctly -- based on the last time a comment was posted last night and the kind of traffic I might have expected on an early Sunday morning -- FlickFilosopher.com was down again for perhaps as long as 12 hours, up until just a few minutes ago.

If you tried to load the site during that time, you may have gotten something that looked like a error message, or your browser may have suggested that you were trying to download a program and where did you want to save it? That happens because -- this is gonna get a little technical, which is as much technical as I can manage -- this one line in my htaccess file:

AddHandler application/x-httpd-php5 .html .php .htm .html

keeps mysteriously getting commented out. For reasons that my web host is not able to explain or prevent -- though I do keep asking them to -- if suddenly turns into this:

# AddHandler application/x-httpd-php5 .html .php .htm .html
(more below the ad... scroll down...)

which means the server ignores that line and subsequently does not understand how to interpret the HTML pages you’re asking for, and curls up into ball in a virtual corner and starts sobbing.

Now, my host is starting to insist that it’s my job to correct that htaccess file when this problem crops up, which would, indeed, be much faster than waiting on them to do it, except every time I’d tried to make that fix myself in the past, it would hose things even more, as happened this morning: for a few hours after I reuploaded the htaccess file I edited, it was suddenly all Internal Server Errors. So I wasted hours this morning trying to figure out why I was having such problems working on a simple text file, the upshot of which was that I ended up downloading a new program to deal with editing that file, and it seems to have done the trick.

The real issue is, however: I am not the one commenting out that vital directive in the htaccess file. And I think it’s a bit rich for a web host who guarantees 99.9 percent uptime to expect that a customer should have to babysit a site 24/7 so that she can quickly correct a problem that is none of her doing and might recur at any given random interval in order to maintain that uptime.

I’m really at my wit’s end with the whole thing.

So here’s the promised question: Do any of you with hosting/server expertise have any idea what could be automatically commenting out a single directive in an htaccess file? My host has variously blamed Apache and PHP upgrades and unknown server scripts, but no definitive solution to the mystery has been discovered. (If I were really paranoid I might suspect that someone was just fucking with me and trying to drive me crazy.) Could those do it? And if so, how do we stop it?

I really would love not to have to be my own site administrator. It takes too much time away from the real work.


(more below the ad... scroll down...)



comments

So this is what the host is telling me now: that it's a "feature" within cpanel that after apache rebuilds, the system scans for addhandler or addtype lines it doesn't like and gets rid of them. And because they added something to my server for another client last night at 1:30am (so FlickFilosopher.com was down since then!), it did the same thing then.

The obvious question seems to me, If the host knows this problem is gonna recur every time they do something to the server, why aren't they telling their clients about it so they can prepare to fix it? Or why isn't the host just fixing it themselves as soon as it happens?!

Now, this is a host with an impeccable reputation for service and support. And based on my previous hosting experiences, I can't say that they're not the best I've been with, by far.

Maybe I'm just in an impossible situation. Maybe it's just impossible for one person to run a reasonable successful web site on her own. I can't afford dedicated hosting and I certainly don't have the expertise to run a server on my own, so that's it. I'm fucked.

You're paying them money to break your website at random intervals. Why wouldn't it be reasonable to ask them to stop? If they aren't bending over backwards to help you troubleshoot this, then you should be in the market for another hosting provider.

I'm not a cpanel user, but from the googling I've done it seems that the culprit is a script called update_php_mime_types.

This script can be disabled. Ask them why they haven't done that. Presumably they have a good reason, and will share it with you, and you can use that info to help you move forward.

The script's purpose is to make .htaccess files match up with the configuration selected in the cpanel options for a user's account. Is PHP turned off in your user configuration? Another thing to find out.

http://www.cpanel.net/documentation/easyapache/ea3php_php_customize.html

If you keep hitting a wall with them, there are a million hosting providers out there.

The fact that I'm not seeing any bleating about the problem in Steadfast's forums suggests to me that the cpanel options for your account might need to be tweaked. Cpanel is used everywhere so if this were a common issue, the Internet would know about it.

I don't think the script is broken, so if it's doing what it is supposed to do, the trick is to figure out why what it's supposed to do and what you want it to do aren't lining up.

I've got the directives on how to handle PHP files set up in the main Apache config files on my home server, and the host I use for my low-traffic web site also has PHP handling set up by default, so I haven't had to do much messing around with .htaccess files. However, if you can set up cron-jobs on your server then there might be a workaround that'll at least minimise your downtime.

First, make a copy of your .htaccess file called htaccess.bak. You can do this from a shell login by typing 'cp .htaccess htaccess.bak'. Then, create a new file and copy/paste the following text into it:

#! /bin/bash
if [ -n "`diff .htaccess htaccess.bak`" ]; then
cp -f htaccess.bak .htaccess;
fi
Make this file executable by typing 'chmod u+x <filename>' at the command prompt (with <filename> being replaced by whatever you called the file) and set up a cron job to run it frequently (once an hour should be reasonably safe.) This will cause the system to check to see if the current .htaccess file is different from the backup copy you've made and to replace it with the backup if it is.

Note that this is a bit of a kludge and really isn't an ideal solution, but it should keep your downtime to a minimum until you can implement a better fix.

You know, that cpanel thing suggested by the earlier posters is probably the problem. Try that first. My solution could potentially be more trouble than its worth.

This script can be disabled.

They're telling me now that they're done just that. We'll see if it helps.

If you keep hitting a wall with them, there are a million hosting providers out there.

Yes, that's true. But it's a major pain in the ass to switch hosts -- I know, I've done it too many times -- which would still be true even if it weren't almost impossible to get any kind of honest assessment of hosting services. How do you choose when all the sites apparently designed to help you choose are also apparently bought-and-paid-for shills? When even the most reputable hosts are the sources of horror stories about sites shut down because a client somehow went over the "unlimited" bandwidth that was supposed to come with hosting? (For just one example of hosting horror stories.)

There do not seem to be good solutions out there for an individual webmaster running a largish, popularish site. If you're running a little blog with low traffic, you're fine. If you're running a huge site with huge traffic and huge revenue, you have lots of options. For someone in the middle -- like me -- there doesn't seem to be much at all.

So, cpanel doesn't like that AddHandler line, but they can't tell you why? And it's your job to figure it out?

That sounds like baaaad tech support to me. They should know these things.

Most likely there's a syntax problem that would be easily fixed if they could tell you how cpanel prefers things.

I wish I knew more about apache and cpanel to give you more than that. I do notice that you have the .html extension twice in that line. Is that necessary? That sort of thing might bother a script...

One recommendation I've seen is to use two separate hosting providers and keep the site updated on both simultaneously. If you do that, and use a managed DNS provide like www.no-ip.com, you'll always have a backup ready to go automatically within minutes of a failure at your primary hosting service.

I'm not technical enough to explain just how that would work out in practice for your site, but apparently it's being done by more and more mid to low traffic sites that want to avoid being taken offline for any extended time. There are probably ways to automate the whole process, so you don't have to update twice by hand every time you change the site.

Yeah, I was gonna email you with some suggestions, but I figured you were probably going out of your mind with frustration (been there). Bottom line is, you should not even need that line in your htaccess... apache should be serving HTML files as HTML all by itself (I know on my computer I was suddenly downloading your pages to a temp directory and displaying them from the local drive).

Anyway, you're right to expect them to fix it. Looks like they did... ?? :)

Newbs, that line doesn't do what you think it does.

That AddHandler line tells Apache to run .html files through PHP before rendering. Which most certainly IS required for a dynamic, database-driven system like a blog engine.

This is why I hate .htaccess, it never does what I think it does. :)

post a comment

who I am


I'm MaryAnn Johanson: writer and ponderer in New York City who drinks too much wine and thinks way too much about such inconsequences as movies, TV, books, and the meaning of life.
[email me]
[become a Facebook fan]
[visit my personal Facebook page]
[follow me on Twitter]
[friend me on MySpace]

FlickFilosopher.com is available on Kindle

• contributor, Film.com
• member, International Academy of Digital Arts and Sciences
• visit my scratchpad blog, MaryAnnJohanson.com
• read my Doctor Who fan fiction

photo by David Speranza

(postings feed)


top critic on Movie Review Query Engine


as seen on Rotten Tomatoes


member, Online Film Critics Society


member, Alliance of Women Film Journalists

Add to Technorati Favorites

monthly archives

recent screenings and hot movies

just opened (U.S.)
red for no The Twilight Saga: New Moon
yellow for maybe Planet 51
not viewed by me The Blind Side [trailer]
not viewed by me Bad Lieutenant: Port of Call New Orleans [trailer]
yellow for maybe Broken Embraces
green for go Red Cliff [trailer]
yellow for maybe The Missing Person [trailer]
green for go Precious (expanding)
green for go Fantastic Mr. Fox (expanding)
just opened (U.K.)
red for no The Twilight Saga: New Moon
green for go A Serious Man
green for go The Informant!
box office top 5 (U.S.)
yellow for maybe 2012
red for no A Christmas Carol
green for go Precious
green for go The Men Who Stare at Goats
yellow for maybe Michael Jackson's This Is It
top limited releases (U.S.)
green for go Precious
red for no The Boondock Saints II: All Saints Day
green for go An Education
green for go A Serious Man
yellow for maybe Coco Before Chanel
box office top 5 (U.K.)
yellow for maybe 2012
red for no A Christmas Carol
not viewed by me Harry Brown
green for go Up
green for go The Men Who Stare at Goats
coming soon (U.S./U.K.)
red for no The Loss of a Teardrop Diamond
yellow for maybe Serious Moonlight [trailer]
yellow for maybe A Single Man [trailer]
green for go Everybody's Fine [trailer]
red for no The Strip
green for go The Private Lives of Pippa Lee [trailer]
green for go The Young Victoria [trailer]
green for go Creation [trailer]
green for go The Road [trailer]
green for go The Imaginarium of Doctor Parnassus [trailer]
other current flicks (U.S./U.K.)
green for go Amelia
red for no Antichrist [trailer]
red for no Astro Boy
yellow for maybe The Box
green for go The Boys Are Back
green for go Bright Star
green for go Capitalism: A Love Story [trailer]
yellow for maybe Cirque du Freak: The Vampire's Assistant
yellow for maybe Collapse
red for no Couples Retreat
green for go Creation [trailer]
green for go The Damned United
green for go An Education
green for go Five Minutes of Heaven
yellow for maybe The Fourth Kind
red for no Gentlemen Broncos [trailer]
green for go The Imaginarium of Doctor Parnassus [trailer]
green for go The Invention of Lying
red for no Jennifer's Body
green for go The Messenger [trailer]
green for go Ong Bak 2: The Beginning
yellow for maybe Paranormal Activity
red for no Pirate Radio (aka The Boat That Rocked)
yellow for maybe A Single Man [trailer]
yellow for maybe Where the Wild Things Are
red for no Whiteout
red for no Women in Trouble
green for go Zombieland

2009 screening log

new on dvd

11.17 (Region 1)
green for go Star Trek [buy]
green for go Humpday [buy]
green for go Bruno [buy]
green for go Is Anybody There? [buy]
yellow for maybe The Limits of Control [buy]
yellow for maybe My Sister's Keeper [buy]
yellow for maybe How to Be [buy]
green for go Farscape: The Complete Series [buy]
green for go Gone with the Wind: 70th Anniversary Ultimate Collector's Edition [buy]
(complete list of this week's new releases at Amazon U.S.)

11.16 (Region 2)
green for go Star Trek [buy]
green for go Moon [buy]
green for go Sunshine Cleaning [buy]
yellow for maybe Four Christmases [buy]
yellow for maybe Tyson [buy]
green for go An Evening with John Barrowman [buy]
green for go Doctor Who: The Key to Time [buy]
green for go South Park: Christmas Time in South Park [buy]
green for go Star Trek Trilogy [buy]
green for go Star Trek: The Next Generation Movie Collection [buy]
green for go Star Trek: Films 1-10 Remastered Special Edition [buy]
yellow for maybe Terminator: The Sarah Connor Chronicles Season 2 [buy]
(complete list of this week's new releases at Amazon U.K.)

11.10 (Region 1)
green for go Up [buy]
red for no The Ugly Truth [buy]
green for go The Sarah Jane Adventures: The Complete Second Season [buy]
green for go Ink [buy]
(complete list of this week's new releases at Amazon U.S.)

11.09 (Region 2)
green for go Bruno [buy]
yellow for maybe The Age of Stupid [buy]
red for no Night at the Museum: Battle of the Smithsonian [buy]
green for go The Sarah Jane Adventures: The Complete Second Season [buy]
green for go All Creatures Great and Small: Christmas Specials [buy]
(complete list of this week's new releases at Amazon U.K.)

11.03 (Region 1)
green for go The Taking of Pelham 123 [buy]
green for go Thicker Than Water: The Vampire Diaries Part 1 [buy]
yellow for maybe Food, Inc. [buy]
red for no G.I. Joe: The Rise of Cobra [buy]
red for no Aliens in the Attic [buy]
red for no I Love You, Beth Cooper [buy]
green for go North by Northwest (50th Anniversary Edition) [buy]
green for go Doctor Who: The War Games [buy]
green for go Doctor Who: The Black Guardian Trilogy [buy]
green for go National Lampoon's Christmas Vacation (Ultimate Collector's Edition) [buy]
green for go Mission: Impossible: Complete Series [buy]
(complete list of this week's new releases at Amazon U.S.)

11.02 (Region 2)
green for go Public Enemies [buy]
yellow for maybe Last Chance Harvey [buy]
red for no Year One [buy]
red for no Blood: The Last Vampire [buy]
green for go Wallace and Gromit: The Complete Collection [buy]
(complete list of this week's new releases at Amazon U.K.)

my book (Amazon U.S.)

my book (Amazon U.K.)

advertisements

search

Google
flickfilosopher.com
web