Current Server Stats

Link 1 VPS from vpslink.com. $7.95 a month.

CPU: Intel Core 2 Duo 4400 (2.0 GHz) (not sure what percentage I get)
Memory: 64 MB RAM (no swap, should’ve gotten Xen)
OS: Ubuntu 7.10
Server: lighttpd w/ PHP via fastcgi
DB: MySQL 5
Hard Drive Space: 2.5 G (1.4G - 57% used)
Avg load avg: 0.01, 0.00, 0.00
Avg MemFree: 16768 kB
Current access.log lengths: 45081 (lighttpd) + 7589 (apache2 - not in use anymore) = 52670 lines
Current bandwidth used: ~ 500 MB (50 MB / day)
Max down speed: 5.37 MB/s (4.86 MB/s avg for full file)
No FTP server

They say the Link 1 & 2 are good only for hosting static files, but PHP and MySQL seem to be working pretty well… with lighttpd. With apache2, not so much. It would run out of memory occasionally, and unlike with lighty, the only way to lower it was to restart the server, though I was able to get it working, which a lot of people apparently couldn’t do.

If you want any other information, just comment. Also, if you want to me to post my lighttpd.conf, my.cnf, or apache2.conf, I can. I might write up a how-to in the future, maybe in the vpslink wiki. If someone actually wants it, I actually try to make sure I do do it.

Netfirms to Me. You Thought You Could Cancel Your Service?

Here’s a screenshot of the account page on Netfirms:

Which one do you think will allow you to turn auto-renew off?

Product Renewal? Nope. I can renew it early if I feel so obliged.

Billing Profile? Think again. I can change my credit card, it must be valid, to be able to still renew my account.

User Profile? Haha, no. I can change where I live though.

Upgrade account? Hey, maybe there’s a way to downgrade. But no. I can upgrade to my current account plan, somehow.

None of the other things have anything to do with renewing, so let’s try the support section.

“turn off auto renew”? Nope. How to do I renew my domain or Plan?

“cancel”? How do I transfer my hosting from my existing Provider to Netfirms?

Damn. I guess I’m going to have to contact them. Oh yeah, they have a horrible form. Oh yeah, they have to make sure you checked the FAQ. Yes, inquiry sent.

Hmm. Since it’s almost 2 AM here, and tomorrow is Thanksgiving (though I don’t know if there’s some sort of Canadian Thanksgiving, but no matter, I’m sure they’ll take off tomorrow), and they don’t like working of Fridays or weekends, I guess I might hear from them on Monday, which is 2 days before it automatically renews it again. Uggh.

Update: Damn. Got my email much earlier than expected.

We are sorry to hear that you have decided not to continue hosting with Netfirms.
We would like to inform you that we process all cancellations by phone. Simply call our toll free number 1- 866 - 973 - 4664 Monday-Friday between 9:00 am and 9:00 pm Eastern Time, so that we may assist you.

Yeah, that’s right. You have to call them. A place that completely relies on web-based service requires you to call them to cancel. What the hell? Guess I’ll call them tomorrow (want to download a complete backup before it’s canceled) and hopefully it’ll be over (no wait, I also have to cancel my other one in a month or so), though I’m not sure if they’ll give me my 14 days I still have left on it.

Exposing PHP is a Security Risk

In php.ini, there is this:
; Misc
;
; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header). It is no security
; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not.
expose_php = On

What this means is that for every request that calls on PHP, it sends an additional header that looks something like this:

X-Powered-By: PHP/5.2.3-1ubuntu6

Since I installed this via apt-get, it added a 1ubuntu6 to the end, which I think is a slight security risk in and of itself, but that’s not what this is about.

But what it always does, no matter how you installed it, is show the PHP version. In this case, 5.2.3, 2 revisions ago (Hooray outdated repositories! Seriously, it’s from May. Though you do have Debian beat.).

Now, in the perfect world, this wouldn’t be a security risk, since everyone would have the most updated version of their software, but as everyone knows, that just doesn’t happen. Mine was just installed, and it’s already out of date.

This means that for 80% of the PHP population (98% of statistics are made up on the spot), PHP is advertising itself as an outdated, and probably vulnerable, version. Most likely you aren’t even using any of the vulnerable functions, or even knew they existed, but there’s still a chance you are. During the month of PHP bugs, there were more than a few functions with vulnerabilities that I used on many occasions.

Wordpress also does something of the same. It gives out your Wordpress version in meta tag on every pageload, with the only way to get rid of it is editing your template. Wordpress is even harder to upgrade than PHP, so expect to find them outdated in a much higher frequency.

Apache, and pretty much every other server out there, does pretty much the same thing with their Server header, but Apache gives you the options on how to display it. Apache/1.3.37 (you have to show all of that from the 1337 though) or Apache/1.3 or Apache/1 or maybe just Apache.

With PHP, it’s all or bust. Not PHP/5 or just PHP. You can overwrite every version by doing something like:

<?php
header("X-Powered-By: Love-Cookies-and-Hamsters/2.4");
?>

Or something similar, but you have to do it manually for every script. There isn’t really a server wide override.

Now, this point can almost be moot, since it’s just so easy to find phpinfo()’s.

Old Server Stats

Since I moved my most trafficked sites to this server, I’ve decided to post stats about my last server.

These were all generated from awstats starting in June 2007.

Summary:
Visits: 44232
Pages: 259259
Hits: 664952
Bandwidth: 10.27 GB

Day of Week:

Day Pages Hits Bandwidth
Mon 842.61 2222.57 31.52 MB
Tue 806.11 2184.85 28.89 MB
Wed 839.24 2143.33 30.84 MB
Thu 827.17 2133.07 33.32 MB
Fri 831.13 2045.18 35.90 MB
Sat 779.13 1906.13 29.03 MB
Sun 762.24 1948.62 41.35 MB

Bots:

96 different robots* Hits Bandwidth Last visit
Googlebot 101512+910 2.71 GB 15 Nov 2007 - 18:16
Unknown robot (identified by ‘robot’) 31241+1371 597.93 MB 15 Nov 2007 - 17:59
Yahoo Slurp 10248+2986 402.40 MB 15 Nov 2007 - 17:31
Feedburner 11440 20.12 MB 12 Nov 2007 - 23:58
Unknown robot (identified by ’spider’) 10245+71 361.48 MB 15 Nov 2007 - 02:46
Feedfetcher-Google 8717 93.68 MB 15 Nov 2007 - 17:29
MSNBot 4425+2269 157.01 MB 15 Nov 2007 - 11:22
MSNBot-media 5659+471 190.48 MB 14 Nov 2007 - 23:07
IRLbot 5640+16 117.78 MB 31 Jul 2007 - 11:02
Alexa (IA Archiver) 4705+302 136.18 MB 13 Nov 2007 - 10:37
Others 20306+2820 656.65 MB  

File Types

File type Hits Percent Bandwidth Percent
gif Image 171157 25.7 % 286.27 MB 2.7 %
php Dynamic PHP Script file 161938 24.3 % 2.65 GB 25.7 %
png Image 123239 18.5 % 940.24 MB 8.9 %
html HTML or XML static page 71254 10.7 % 1.35 GB 13.1 %
jpg Image 41547 6.2 % 1.81 GB 17.6 %
css Cascading Style Sheet file 36671 5.5 % 209.12 MB 1.9 %
js JavaScript file 32797 4.9 % 975.10 MB 9.2 %
pl Dynamic Perl Script file 17603 2.6 % 3.37 MB 0 %
zip Archive 3065 0.4 % 671.79 MB 6.3 %
Unknown 2996 0.4 % 73.20 MB 0.6 %
xml HTML or XML static page 693 0.1 % 11.13 MB 0.1 %
gz Archive 455 0 % 38.98 MB 0.3 %
pdf Adobe Acrobat file 432 0 % 345.18 MB 3.2 %
txt Text file 303 0 % 27.62 MB 0.2 %
swf Macromedia Flash Animation 281 0 % 8.06 MB 0 %
mp3 Audio file 205 0 % 11.31 MB 0.1 %
htm HTML or XML static page 146 0 % 898.08 KB 0 %
src   47 0 % 209.57 KB 0 %
htc   44 0 % 75.37 KB 0 %
exe Binary runtime 15 0 % 12.73 MB 0.1 %
tar Archive 14 0 % 140.00 KB 0 %
rss   14 0 % 16.77 KB 0 %
rar Archive 12 0 % 776.26 MB 7.3 %
iso   7 0 % 12.14 MB 0.1 %
tgz Archive 4 0 % 155.69 MB 1.4 %
java   3 0 % 6.54 KB 0 %
200707   2 0 % 1.06 MB 0 %
php5   2 0 % 116.60 KB 0 %
com   2 0 % 6.85 KB 0 %
200706   1 0 % 11.11 MB 0.1 %
org   1 0 % 6.85 KB 0 %
xpi   1 0 % 19.93 KB 0 %
bmp Image 1 0 % 812.58 KB 0 %

Operating Systems:

  Operating Systems Hits Percent
Windows 484878 72.9 %
Macintosh 66143 9.9 %
Unknown 63796 9.5 %
Linux 47928 7.2 %
BSD 524 0 %
Sun Solaris 366 0 %
Unknown Unix system 331 0 %
Sony PlayStation Portable 219 0 %
BeOS 196 0 %
RISC OS 165 0 %
  Others 406 0 %

The full breakdown is actually kinda interesting. I’m not going to post the table, just the top few.

Windows XP 386962 58.1 %
Mac OS X 65371 9.8 %
Unknown 63796 9.5 % (Note: these are mainly bots that aren’t know or labeled as bots, like montastic, which does about 4-5 requests every 15-60 minutes)
Windows Vista (Longhorn) 52904 7.9 %
Linux 47928 7.2 % (All ditros)
GNU Linux (Unknown or unspecified distribution) 26244 3.9 %
Windows 2000 21199 3.1 %
Ubuntu 17156 2.5 %
Windows 2003 10032 1.5 %

The rest are under 1%.

Couple interesting parts. XP clearly is the leader. Mac OS X is beating Vista. Linux isn’t that far off from Vista.

Browsers:

  Browsers Grabber Hits Percent
Firefox No 279462 42 %
MS Internet Explorer No 250935 37.7 %
Unknown ? 54960 8.2 %
Safari No 25913 3.8 %
Opera No 15350 2.3 %
Netscape No 13341 2 %
Mozilla No 11977 1.8 %
Konqueror No 3104 0.4 %
Camino No 2356 0.3 %
K-Meleon No 1587 0.2 %
  Others   5967 0.8 %

Yay, Firefox is the leader, though that could partially be since this site doesn’t always render correctly in IE.

Anyways, that’s it. You might find them interesting, you might not.

Switching Servers

I should be doing really soon now, like tonight, though it might take till tomorrow or so, so I might be going away for a bit, and hopefully for just a bit, possibly more though, because I’m not sure what this is going to entail. I know what I’m doing, just not what I’m doing with these people.

Update: Got it working, kinda. mod_rewrite seems to not be working, though it was earlier. And since this is running on a very low memory system, there might be some memory errors, which I’m working on lowering the memory usage of everything.

Quick Update: 15 minutes after last update, I got mod_rewrite working. Yay! I’m hoping WP-Cache will keep memory usage low. I’ll keep checking on it periodically to make sure it’s still good.

Started at 8:30 PM yesterday (domain transfer occurred at 9:00 PM. Server bought at 9:30 PM). It’s currently 7:52 PM. Little under 24 hours to get it working. Not great. It would’ve only been a couple if I had realized I can’t override the default host’s actions by a new VirtualHost, or something like that.

Update 3: I’m going to try to switch this to lighttpd instead of apache probably later tonight. I’m also going to see if I can switch to Xen virtualization instead of OpenVZ.

Update 4: Going to try to switch over to lighty. So expect things being weird or not working probably for the next couple of hours.

Update 5: Got lighty working. Still will be doing some modifications. It seems to run out of memory actually quicker than apache was, which I’m finding kinda odd.

Python Random Show Player

This is a pretty simple little script I coded a while back that will play an n amount of randomly picked shows from a collection of shows.

Like, “randomshow.py 5″ will play 5 randomly picked episodes back to back. I usually use this to cue up some shows right before going to sleep. It’s better than flipping through channels trying to find something to watch.

By default, it uses a gui-less mplayer in full screen to play the videos. You can edit the playback command to use a different video player or use different settings.
Note: It expects the video player to exit after finishing playback. Mplayer does this by default (without the gui), but VLC, Xine, etc. don’t.

To use, edit the first part of the file with the location(s) of your video files and the commands if needed. Run python randomshow.py rescan to generate your collection file. Then run python randomshow.py to play a random show.

This was made and used on linux, but it should also be compatible on Windows, though you might need to edit the commands.

I’ll probably edit this to have better control over collections, a playlist option that’ll just generate a playlist so you can use VLC or other video players. If you have any suggestions, let me know.

I’m also making a movie version, that will also support browsing of the collection (probably just via a web interface), and support multiple CD versions and archives. It’ll be more like MythTV, but allowing less overhead.

Download randomshow.txt (rename to randomshow.py) or randomshow.tar

randomshow.py –help

Random Show 1.0 - James Wilson

randomshow.py [option] [count]

For 1 random show
randomshow.py

For n random shows
randomshow.py n

Rescan your collection
randomshow.py rescan

Use different collection and play 1 show. If collection doesn’t exist, it will use default. latenight.txt can be any collection text file.
randomshow.py latenight.txt

Use different collection and play n shows
randomshow.py latenight.txt n

Rescan different collection
randomshow.py rescan latenight.txt

Create new collection
randomshow.py create latenight.txt “/media/tv/”

Example rescan output:

From location(s)
[’/media/My Book/downloads/tv/’, ‘/media/hdb1/Documents and Settings/User/My Documents/My Videos/tv/Futurama’, ‘/media/hdb1/Documents and Settings/User/My Documents/Fastlane’]
Clearing collection file
Added 113 King of the Ant Hill.avi
Added 110 Keeping Up With Our Joneses.avi
Added 104 Luanne’s Saga.avi
[…]
Added Fastlane - 120 - Asslane.avi
Added Fastlane - 121 - Dosed.avi
Added Fastlane - 122 - Iced.avi
Collection built - 696 files

Example collection file:

Random-Show-Collection-1.0;shows.txt;/media/My Book/downloads/tv/,/media/hdb1/Documents and Settings/User/My Documents/My Videos/tv/Futurama,/media/hdb1/Documents and Settings/User/My Documents/Fastlane
/media/My Book/downloads/tv/koth1/113 King of the Ant Hill.avi
/media/My Book/downloads/tv/koth1/110 Keeping Up With Our Joneses.avi
/media/My Book/downloads/tv/koth1/104 Luanne’s Saga.avi
[…]
/media/hdb1/Documents and Settings/User/My Documents/Fastlane/Season 1/Fastlane - 120 - Asslane.avi
/media/hdb1/Documents and Settings/User/My Documents/Fastlane/Season 1/Fastlane - 121 - Dosed.avi
/media/hdb1/Documents and Settings/User/My Documents/Fastlane/Season 1/Fastlane - 122 - Iced.avi

WordPress YouTube Sidebar Video Plugin

This is a plugin based on the YouTube widget. It’ll display a YouTube video, most likely in your sidebar, by calling the youtube function which you can specify the url, width, height, and if it’ll autoplay. It’s not much, at all, but meh.

Download youtube-plugin.zip (youtube-plugin.tar.gz)

This plugin is one function called youtube that will display a YouTube video. It’s pretty much the same as copying the embed code from YouTube, but will allow you to change the width and height much easier.

I’m not going to go too much into this, so here’s the whole calling it premise. You would place this in your template in php tags.

youtube(uri[,width,height[,autoplay]])

Display a video with default width and height (250×165)
youtube("http://www.youtube.com/watch?v=AYxu_MQSTTY")

Display a video with custom width and height (500×330)
youtube("http://www.youtube.com/watch?v=AYxu_MQSTTY",500,330)

Display a video with default width and height (” will cause it to default), but autoplay
youtube("http://www.youtube.com/watch?v=AYxu_MQSTTY","","",TRUE)

Display a video with custom width and height and autoplay
youtube("http://www.youtube.com/watch?v=AYxu_MQSTTY",500,330,TRUE)

Download youtube-plugin.zip (youtube-plugin.tar.gz)

Database Problems

For the past couple of days, with today being the worse, the database server has just been completely horrible. Not sure why, but I keep getting “MySQL Server has gone away” errors. Lots of them. So pages might only load partly or not at all. And It’s really starting to annoy me.

I dispatched a support ticket to netfirms support hours ago and haven’t received a response. No surprise there.

I added the line @mail("[my_email]",
"WordPress Database Error",
"Error:$str\r\n
Query:$query\r\n
IP:".$_SERVER['REMOTE_ADDR']."\r\n
Page:".$_SERVER['REQUEST_URI']."\r\n");
in the error section of wp-db.php, and within 4 hours of adding that, I’ve gotten over 40 emails. Uggh. And they don’t stop coming.

So I think it’s time to switch to at least a VPS. I’m thinking with either GoDaddy or 1and1, unless there’s something I should know or there are better options.

But this leads me to something I don’t really want to do, but it’s much better than the alternative of ads, or think will work. If you found this site useful or just want to help out, feel free to make a donation. Just click the PayPal icon below.


You can donate whatever amount you want, just know that PayPal takes a certain amount for their blood money.

If you add your site to comments, I’ll most likely subscribe to it if it’s full content.

No Sponsored Links in Themes? Fine.

Weblog Tools now says it won’t show sponsored themes. That’s fine. I just thought, good for them, when I read it. Then ol’ Matt nuts everywhere and jumps on the bandwagon. Then ol’ shoey says fuck matt. And now I’ve had to form an opinion about this. Dammit. I didn’t feel like doing that today.

All links in my footer are now gone. That includes that nice little link to wordpress.org. Hey, I guess you’re sponsoring all the themes, and since we can’t have sponsored links, it’s gone. Link to the theme? Also gone. Link to the famfamfam icons? Also gone. But the last two don’t have to worry, I added them to the about page.

Now, they might be meaning just the themes sponsored by Joe Shmoe Auto Care that has nothing to do with the theme or wordpress. But you know what? Fuck it. All the links are benefiting someone. The theme makers gets links back to their site, which could make money by showing some advertisement. Wordpress gets exposure so more people might sign up for a wordpress.com account.

But I’m not going to discriminate against links. Either all or none are there. Even though I’ll never download and use a theme that’s advertising for Janson’s Brother’s Funeral Home, some people might. But if they’re censored like this, very few people will.

And it’s not that I condone those kind of sponsored links, I would just rather do it out of spite toward Matt. There’s just something about him that just makes me hate him.

(Re: )?(H(e|a)llo|Hi|(P|p)ic(ture)?s)

Hello! I am (bored|tired) tonight. I am (nice|23 yo) girl that would like to chat with you. Email me at [A-z0-9]@[A-z0-9].info only. (You will see some of my private pics|Don’t miss my naughty pictures|I would like to share some of my pics).

Is anybody else getting a lot of email consisting of just this? For the past week or 2, my spam folder, thankfully not my inbox, is getting filled with these emails. They all follow the same template, with nothing straying from one another. It’s always bored or tired, nice or 23 yo, and it’s always a .info domain for the email. Maybe I’m weird, but it just seems weird. They aren’t trying to make me buy some stock, click their referral/ad link, steal my credentials from wherever, make my p3n15 huge or have a rich, dead uncle in some random country. They want me to send an email to a different email address than the one that was sent (It’s usually a Yahoo address, that actually looks to be sent by Yahoo). I just don’t see the usefulness in it.

Close
E-mail It