lab-y

 

>> Skip to the content.

Lab-Y Menu


Lab-Y Content

Like an escape tunnel in prison I started from scratch

Posted: Apr 12, 2004, 10:21pm CDT

I just realized that tomorrow, LAB-Y turns one year old. And it still hasn't made me a dollar. ;) I started this site mostly as a place to house old college class content and a project to drive me to learn PHP and Smarty. I posted my first entry on LAB-Y one year ago tomorrow. I've since ditched Smarty and wound up with a content-management system written from scratch in PHP, designed to run on Freeshell, powering the least read blog ever.

[ Posted by dast — laby, blogging, php ]

"I'm having a website emergency."

Posted: Jan 11, 2004, 8:21pm CST

Technology is wonderful. It really is. It is the one thing in my life I can always count on to bring new possibilities of emergency situations. Year after year, with a robotic certainty, I wind up with some heretofore unknown catastrophic failure of some bit of technology. What other human institution can do the same for your life?

When Ford invented the automobile, within years I'm sure we discovered its cousin, the automobile accident. Yep, you could end your life in an all new, grisly way. (Don't get me started on Ford just yet. I've got beef with him and I'll have to let him have it shortly—I don't need it anyway, as I'm a vegetarian.) Then, when the Wright brothers took their pioneering flight, they probably only narrowly avoided the previously unknown airplane crash. With each new technology, the human race learned about a new way for it to go all kinds of wrong.

And, dear readers, I apologize, as I am the victim of the technological failure of created by the age of bloggers—the website emergency.

Looks like the admin of Freeshell decided to push through the PHP changes, leaving my entire website down and misbehaving. I just got home from visiting my girlfriend, late Sunday night, and before I even put away my groceries (still haven't), I noticed my my website had taken a nose-dive. Broken scripts galore.

After a about 40 minutes of recovery, I have my front page working. None of the links into /blog, /section, or /gallery, work. As of 8:16pm CST, I am about to set up a small (working, hopefully) script to redirect all of these links to the frontpage, so everyone can read this explanation. Sorry for the outage, folks.

Update

As of 8:53pm CST, things seem to be actually somewhat working. A bit of digging through the suphp source turned up a bit of apache magic to save the day. (I hope.) More on this later.

[ Posted by dast — web, blogging, php ]

LAB-Y back up now.

Posted: Jan 8, 2004, 8:37pm CST

LAB-Y is now back up after about 40 minutes of unscheduled maintenance. I upgraded to a new version of backend code I've been working on. For the most part, you shouldn't notice anything different, but if anything appears broken, please send a note my way. My email address is "obfuscated" in the footer of every page.

Sorry for the inconvenience and thank you for reading LAB-Y.

[ Posted by dast — laby, blogging, php ]

Fun with Apache Handlers

Posted: Dec 15, 2003, 9:03pm CST
Modified: January 7, 2004, 7:18:00 pm CST

Pursuant to the recent CGI changes at Freeshell, I'm slowly moving the backend of this site to CGI powered by PHP, instead of PHP scripts running inside mod_php. For most people, this is the exact opposite of what they want.

However, at Freeshell, the admin recently enabled the usage of suexec, letting us run our CGI scripts under our normal user accounts. This opens up all kind of goodies, like secure file writing, not needing to mark all files readable by the nobody user, etc. However, suexec doesn't work for PHP scripts running in mod_php.

So everything here must be converted to CGI scripts—running PHP. For the most part that works nicely, except one small bit that gave me trouble. I use a technique with Apache to fake the appearance of directories inside URLs. It uses some mime magic to force the webserver to execute a script that does not have a file extension. That let's me execute the script 'search' in an URL like http://foo.bar/search/apache to search for articles related to Apache (foo.bar is not a real site, of course).

Well, mime magic doesn't work for CGI scripts. So you can use this bit of Apache magic in your .htaccess file.

<Files search>
    SetHandler cgi-script
</Files>

And it's like, wa-lah! Instant fix for crappy URLs. Just check the $_SERVER["REQUEST_URI"] variable in PHP, which will return to you everything after the hostname in the URL, to determine what content to display.

For more fun, read up on Apache Handlers.

[ Posted by dast — internet, web, blogging, php ]

CGI/PHP changes and trackbacks disabled at LAB-Y

Posted: Dec 13, 2003, 3:55pm CST
Modified: January 7, 2004, 7:18:00 pm CST

First off, I have disabled trackbacks here at LAB-Y. As I am on the farthest edge of the blogosphere, probably qualifying mine as the least read blog ever, nobody used the feature anyway.

My reason for deciding to turn it off is due to the recent CGI policy change at Freeshell, giving me more freedom in generating dynamic content. Eventually, I'm going to redo the way I handle trackbacks. Expect the same changes in comments as well, when I decide to get off my lazy ass and get rid of my Squawkbox service.

[ Posted by dast — php, laby, freeshell ]

Fixed a small bug in the blog calendar.

Posted: Dec 6, 2003, 8:52pm CST
Modified: January 7, 2004, 7:18:00 pm CST

I noticed a small bug today in my calendar that it seems a few people have fallen victim to recently. The month of December was being linked to in the archives as 'decg' instead of 'dec'. Looks like I fat fingered it and that mistake propagated itself into several different files. Should be fixed. Please mail me if you find any other broken links—my email address is at the bottom of the page, obfuscated against spam.

I've also noticed that someone from Japan has been giving what look like relative paths to my trackback script. Not funny.

[ Posted by dast — laby, php ]

Log_2_rss available under the GPL

Posted: Dec 6, 2003, 6:28pm CST
Modified: January 7, 2004, 7:18:00 pm CST

Today I released a set of PHP classes called Log_2_rss under the GPL. You can find them available for download on my software page. These classes can be used to generate RSS 1.0 reports from web server log files, specifically from Freeshell logs, which use a specialized format. While it isn't currently supported, Log_2_rss could be easily extended to support the standard Apachelog formats, or any other format. Download and enjoy.

[ Posted by dast — software, php ]

LAB-Y Reworked and Revamped

Posted: Sep 4, 2003, 8:50pm CDT
Modified: January 7, 2004, 7:18:00 pm CST

Well boys and girls, I've finished reworking most of the code here at LAB-Y, which now amounts to my own, home-grown, content management system. I've cleaned up all of the old bits of code that were hardwired, hackish, and dirty. The result is a much more elegant, maintainable CMS. I love PHP. Easiest language I've ever tried to learn, it is as powerful as you could ask for. It has a wealth of prewritten code like Perl with clean, understandable syntax like C. The content freeze is over.

Sanyo-Linux Update

I finally got my Sanyo SCP-4900 in the mail and got it activated. So far so good. Next step is getting the data cable and testing that out with my workstation.

A word of advice to anyone dealing with Sprint PCS personnel. The representatives that do nothing but activate phones are foul-mannered sacks of shit. Their general customer service reps are more helpful. They will, however, sign you up for things you don't ask for.

[ Posted by dast — laby, php ]

Busy Day

Posted: Aug 25, 2003, 8:36pm CDT
Modified: January 7, 2004, 7:18:00 pm CST

Damn it has been a busy day and I've been up to quite a bit. You'll probably notice that all of the blog entries at LAB-Y now have category links. Follow any of them to search for entries that fall under the specified category. Just a smidgen of PHP and another feature falls out of the sky.

USB is nifty.

I went ahead and ordered my Sanyo SCP-4900 to eventually have wireless internet access under Linux from anywhere. It only set me back $170 (which included tax and an inflated shipping cost, fsck websites charging tax) and it is on its way.

To get this setup tested, I finally got around to getting USB working on my workstation. I've had the capability for quite some time but I've never used the kernel modules, partially because I don't have any USB devices. The only exception to that is a keyboard PS/2 to USB adapter that I have for use with my Playstation 2. It works great with any PS/2 keyboard I can dig up on the PS2 so I used it for testing USB under Linux.

I already had all of the appropriate modules compiled and installed, they just never got inserted into the kernel. A few insmod's later, I was up and running with a USB keyboard, no sweat. Now I'm waiting for the phone to get it activated. Then I'll buy the data cable and I should be good to go.

[ Posted by dast — life, web, php, linux, wireless, cellphones ]

New Image Gallery Mode

Posted: Aug 8, 2003, 2:36pm CDT
Modified: January 7, 2004, 7:18:00 pm CST

I just finished coding up a new mode for my image galleries, showing long descriptions with image floats. This let me move my POV-Ray art gallery over to the new code and eliminate an old section. You can also view any of the other image galleries in this way. This will work out nicely when I get the photos from my vacation scanned in (nobody took a digital camera) and put up.

Update: Moved RIP Gallery Over

I also moved over the image gallery of my car to the new gallery code. Head over to the gallery and check it out.

Update: Oct 11, 2003

Updated some links in this entry.

[ Posted by dast — laby, php ]

User Friendly URLs

Posted: Jul 30, 2003, 7:14am CDT
Modified: January 7, 2004, 7:18:00 pm CST

Simon has a new article up about quality news site URLs. I've been doing a lot of work here to convert URLs to something readable, including section links, gallery links, and other miscellanea. I've used a trick I picked up over at evolt.org that uses Apache and PHP to clean up my links. Makes things a lot cleaner. If you have access to Apache and PHP, I suggest using it to make your URLs that are really CGI requests look like simple, readable, memorable directories.

[ Posted by dast — php, apache, web ]

New and Old Photos

Posted: Jun 7, 2003, 9:17pm CDT
Modified: January 7, 2004, 7:18:00 pm CST

For anyone who would find such things interesting, which would be all of nobody but myself and my girlfriend, I just posted some images of the two of us. A couple were from Xmas of last year and a few are from today. At some point, I promised myself that I would whip up some sort of PHP previewer for my images but at the moment, you just have to browse the directory as presented by Apache. Sorry.

Somehow, we always seem to take pictures at the same place--on the couch at my parents' house. What's up with that?

Update: Oct 11, 2003

Updated some links in this entry.

[ Posted by dast — photos, php, laby ]

Removed Smarty

Posted: May 20, 2003, 7:15pm CDT
Modified: January 7, 2004, 7:18:00 pm CST

Well, I've come to find out that running Smarty here on freeshell is a terribly bad idea, so I removed it completely from my site, which was no small task. I quited liked Smarty but because of security issues, using it with freeshell's current setup is unwise. This has slowed my efforts to fully restore my old website, so please hang in there while I get things updated.

[ Posted by dast — php, freeshell ]

 

Validate XHTML 1.0 Strict

Validate CSS

Copyright © 2003, 2004 Dast <dast _-=(a t)=-_ freeshell.org>. All rights reserved.

Powered by PHP on servers graciously provided by freeshell.org.