How I set open_basedir for a domain on a Plesk server (9.2.2)

Posted by Streetdaddy™ on September 18th, 2009 filed in Geek
Comment now »

If you’ve gotten here than I’m going to assume you understand the security risks of what we’re doing here.

It took me a few goes as I’m still bumbling my way through Plesk, so I thought I’d share my successful attempt.  Remember to replace <your domain> with, er, your domain…

  1. Open/create vhost.conf:
    vim /var/www/vhosts/<your domain>/conf/vhost.conf
  2. Add the following rules:
    <Directory /var/www/vhosts/<your domain>/httpdocs>
    <IfModule sapi_apache2.c>
    php_admin_value open_basedir "/var/www/vhosts/about-australia.com/httpdocs:/tmp:<directory to open>"
    </IfModule>
    <IfModule mod_php5.c>
    php_admin_value open_basedir "/var/www/vhosts/about-australia.com/httpdocs:/tmp:<directory to open>"
    </IfModule>
    </Directory>
  3. Reload configuration and restart httpd via Plesk:
    /usr/local/psa/admin/sbin/websrvmng --vhost-name=<your domain> -v -r

Hope it works for you…

Taskbar Shuffle – booty from the nerd cave

Posted by Streetdaddy™ on December 5th, 2008 filed in Geek
Comment now »

Taskbar Shuffle logoToday I decided I wanted to be able to close items in my Windows XP taskbar by middle-clicking them.  Little more than 7 seconds later I found myself entering the nerd cave where I found Taskbar Shuffle.  Not only did it fulfil my simple requirement, it also ticked off many items on my subconscious user interface wishlist, items that I had barely realised I needed … so … badly.  Take for instance its primary reason for being, shuffling the taskbar.    It’s even compatible with my dirty secret lover, Ultramon.  If I have to suffer the wrath of Windows at work, at least improvements like these make it slightly more bearable.

Congratulations, you just saved yourself 7 seconds!  Go reward yourself with a satisfying w… sorry, time’s up.

Gob’s program

Posted by Streetdaddy™ on November 20th, 2008 filed in Geek, Life, Web
Comment now »

Arrested Development is still one of my all-time favourite TV shows and I still occasionally shed a tear that it was cancelled by those merciless Fox bastards.  Thankfully there are plenty of other people who feel the same and can still get some nostalgic humour value out of it.

Take for example, Gob’s Program

Exclamation marks appearing in HTML email

Posted by Streetdaddy™ on November 11th, 2008 filed in Geek
2 Comments »

If you’re getting random exclamation marks appearing in the source of HTML emails being sent using PHP’s built in mail() function, then your HTML may be exceeding the maximum line length (998) specified in RFC 2822 Internet Message Format.

I found the easiest way to deal with it is to use the PHP function wordwrap(), eg.

$someHtml = wordwrap($someHtml, 996);
mail(“someone@somewhere.com”, “My subject”, $someHtml, “MIME-Version: 1.0;\nContent-type: text/html; charset=iso-8859-1;\nFrom: someone@somewhere.com\n”);

I discovered this while I was tidying up some of the email templates for a web application at my work.  There’s a long list of defects perpetrated by previous contributors, and I was tearing my hair out trying to work out why the content of a random table cell refused to center.  So now I have a greater appreciation for HTML email template designers, or maybe I just feel sorry for them…

mod_php5.c:22: php_apache_http.h: No such file or directory

Posted by Streetdaddy™ on July 31st, 2008 filed in Geek
Comment now »

Whilst it may seem nonsensical to you, the title of this post could save someone else the headaches I had, but only if that someone is trying to compile apache v1.3.x with support for php5. So there’s this old server at my work that’s just been chugging away for years (since well before I started) and supposedly nobody has been game to touch it, until I came along and decided to try and get mod_deflate working.  The seemingly simple task of recompiling apache came to a grinding halt with this failure:

mod_php5.c:22: php_apache_http.h: No such file or directory

1.3.33 is almost 3 years old now, and after trawling endless mailing lists and way to many./configure attempts, I gave up for long enough to make a late afternoon coffee, read a few inspiring quotes, and kept trying… Eventually I managed to get it to compile and render PHP pages with the following:

./configure \
--activate-module=src/modules/php5/libphp5.a \
<add your switches here>

The clincher was adding the correct source file reference, as I’d previously tried ’src/modules/php5/libmodphp5.a’, or just ’src/modules/php5′, none of which worked.  If you found this helpful please let me know, because until then this is just 5 minutes of my life wasted…

Wintery bliss on the Gold Coast points

Posted by Streetdaddy™ on July 27th, 2008 filed in Surf
Comment now »

After a few weeks of sub-2′ slop, it was nice to finally get a good pulse of swell, because I really needed the exercise!  Good buddy Fanta was out snapping a few pics (300 to be exact!) with his new baby: a 300mm lens.  Just in time for Indo…

Burleigh - 26th July 2008

Pimp your user experience in 3 dimensions with PicLens

Posted by Streetdaddy™ on July 23rd, 2008 filed in Geek, Web
1 Comment »

I hate feeling like I’ve been living in a cave, especially when I’ve in fact been religiously working through my Google Reader list on a daily basis…  Somehow PicLens has snuck under my radar (for the last 6+ months!) and just today my boss called me over with a ‘You have to see this’ sort of tone which you’re never sure is good or bad until you’ve walked the green mile to look at his screen.  Thankfully what he showed me was a full-screen quasi-3-dimensional image/video browser implemented as a Firefox addon, and I was very impressed!

It seems to me that it’s 99% eye candy, but the 1% usability could grow exponentially if it gains traction with heavy web-surfers and webmasters start PicLens-enabling their own resource portals.  I’m already reading up on the requirements and pondering the possibilities for a web services consumption I’m prototyping at the moment…  I’ve been trying to work out what the technology is behind the app, maybe someone else can enlighten me?  My first thought was Flex, but I’m not so sure now…  Other sites say native code, but I’d like to know more.

Could this be the coolest Firefox addon released so far? Definitely gets my vote!

Ripe

Posted by Streetdaddy™ on July 19th, 2008 filed in Surf
Comment now »

Nice and simple surf blog over at newly launched Ripe.  Great for lazy folk like me…

Timing is everything

Posted by Streetdaddy™ on July 14th, 2008 filed in Life, Surf
Comment now »

Credit to Nathan Lawrence / Surfingmag.com3 months ago, our ‘08 Indo jaunt was looking to good to be true: dirt-cheap airfares with Rain Man’s airline of choice, 5-star accommodation at 2-star prices and a loose itinerary made up of epic waves and happy wives/girlfriends.  Since then there’s been a few unavoidable slaps in the face, but the ones that really tang would have to be 1. a local protest-lead relocation of the Rip Curl Search WCT competition from Gnaraloo to Uluwatu, the end of its waiting period coinciding with the first three days of our trip, and now 2. a bunch of drunk taiwanese fisherman have parked their illegal fishing vessel on the reef at Padang Padang:

Taiwanese fishermen run aground at Padang Padang as locals make the best of a messy situation
“It didn’t take locals long to figure out that the Taiwanese boat had been illegally fishing in Indonesian waters. When the boat ran aground (Poor navigation? Too many Arak Attacks? Captain was wearing green? No one really knows why…), the entire crew of the vessel grabbed every bit of documentation they could and booked it on the Bukit. Gone. Audi 5000. Between the fines for illegal fishing and the cost of getting the boat off the reef, they were cutting their losses.

What next?

Update: The intrigue increases…

“The whole situation got even weirder today when rumor surfaced that the captain may have been murdered by his crew.”

And I’m selfishly rubbing my hands together at:

” … this could make running our events—the Rip Curl Padang Cup & Rip Curl Pro Search—there impossible … “

So maybe me having a bit of a whinge about it here will have some cosmic effect on the outcome.  There’s also the possibility that they’ll move the waiting period forward so it’s smack bang in the middle of my trip!  Blurg…

Silverstripe – Taking Mufti day to the next level

Posted by Streetdaddy™ on July 4th, 2008 filed in Geek
Comment now »

I’ve starting building yet another web app using Silverstripe, an open-source PHP CMS based on an MVC-like framework called Sapphire. I find it perfect for projects that require basic content management, have barely there specs, and tight timelines. Best of all, pants are optional!

FireStats icon Powered by FireStats