Tag Archives: WordPress

Amazon S3 and WordPress Video Site – 2 Hour Project – What A Debacle

About a month ago, I wanted to test using Amazon’s S3 service, for storage. I couldn’t think of any quick, easy projects to use it for, then it hit me, how about video/photos?

I decided to see how long it would take for me to make a video site, with comments, views, etc, on a small budget.

My first thought was maybe to use a hosted WordPress.com blog, and just redirect the domain, which is about 10 dollars a year, and then use S3 for the video/photo hosting. That idea was nixed because hosted WordPress.com blogs can’t embed flash, javascript, or iFrames, etc.

My next idea was just getting a WordPress hosted blog at HostMySite, which is what I went with (which eventually I will move to my own server). This was 45$, and the domain was roughly 10$, so 55$ so far.

Now, to get videos working, and a cool theme. First the theme. I just searched free WordPress theme sites, and found one that looked cool. I set it up, slapped up some Google AdSense and Google Analytics, and changed the logo, rearranged a few things.

As for getting video to work. I was having issues embedding jscript (for the flash video embeds) in WordPress. It would work, but then screw up the formatting of the rest of the page, etc. I knew iFrame would work, so I went that route. Since I am a .NET dev at heart, I made a page where it will take some params on my www.stevienova.com site, and grab the file from S3 and play it. So on WordPress, I just iFrame that site with the right params. I suppose later I could make a PHP page to do the same thing and keep it all self enclosed. Probably will do that once I move it to my server.

For video I found a nice little flv embed, which has a ton of options, even can do pre and post roll ads if I want. What is nice with the setup I have is that there really isn’t and bandwidth being eaten by my webhost. Just the theme images. Everything else is on S3. The videos, thumbnails, etc.

Pricing for Amazon S3 is pretty good.

  • Storage Used: $0.15 per GB-Month of storage. This fee applies to all object data and metadata stored in buckets that you created under your account.

    It does not matter who created the objects in your buckets, so think twice before you give somebody the right to write objects to your bucket!

  • Network Data Transferred: $0.20 per GB of data transferred. This fee applies anytime data is read from or written to one of your buckets. It does not matter who is reading or writing the data, so consider this when you give public access to one of your objects that may become popular.

With the site just starting, the storage and transfer is really low. Less than a dollar.

So, in about 2 hours and less than 60 dollars later, I created a self managed Funny Video site, from the ground up. I can now use Windows Live Writer to post to it, and I use a S3 tool to upload files to S3.

I also have other people putting videos on it, so that is cool as well. I am not sure where it will, because it really was just an experiment to see how fast I could get a video site up, and for how cheap.

Not sure how funny the videos are or will be, but if you want something up, I will put it up. Once nice thing, is that I can just iFrame YouTube as well, so if there is something there that might be Copyrighted by a YouTube uploader, I don’t have to worry about that, since its just the YouTube player which you can embed legally.

Fun stuff :)

Check out the site.

whatadebacle

http://www.whatadebacle.com

 

Windows Live Writer – API Open (not really) – I Want To Download Existing Posts

So, I am sitting here scratching my head again. I use Windows Live Writer (WLW) to post to my blog. I like it, it rocks. There is a plugin architecture, which is cool, and some other API’s for doing things.

WLW saves drafts and posted posts as .wpost files to a directory in your My Documents. The files are in a proprietary binary format. It is cool though as all your posts are saved and you can open existing ones, edit, and republish easily.

I want to go through my posts and add WordPress tags. Not technorati tags, but WordPress tags, so I can have a cool little tag cloud. WP 2.5 support WLW tags by default, WP 2.3 (which I am running) can get tags from WLW through a little REG hack which I have applied and it works for new posts.

What I want to do, is update all my historical posts through WLW instead of WordPress web interface.

Since I have reformatted, changed computers, started blogging before WLW came about, of course I don’t have all my posts on this machine. So I thought, why not download them from my blog and create .wpost files so I have them?

First I looked for a plugin, no dice, doesn’t even seem that anyone has wanted to do this. I searched forums, blogs, Google, whatever. Found little info.

Next I dug into the API, nothing there that would really help me. What I would do is just access my posts through the XML-RPC interface WordPress has and create new .wpost files in my directory, you wouldn’t think it would be that tough..but it is.

It would be nice if the .wpost file was open and had a documented spec, that way I could do it easy as 1,2,3. Even if there was some API with WLW to create new posts and save them (you can create new posts, but only by programmatically opening WLW).

Well, I guess I will keep my eyes open for anything that comes along that will make this possible, until then, it is using the WP web interface. I suppose I could write an app to just directly edit the post tags through the XML-RPC API, and save them, but I want them on my machine as well. Just another good backup I suppose.

WordPress on IIS 6.0, Windows 2003 – Some Tweaks (URL Rewrite and SMTP)

OK so I lied. Everything wasn’t working after I set up my WordPress blog on IIS 6.0 on Windows 2003. Two things were broke: SMTP (email from the blog) and URL Rewrites/Permalinks.

SMTP worked through IIS just fine, I could telnet and send email out, but from WordPress, it was getting a 501 error. From what I could tell, it was the way that WordPress was formatting the outgoing “mail from” with <From Name>from@address.com . IIS was bombing on the <> in the string (I am pretty sure). I tried some tweaking on WordPress, some plugins for SMTP, couldn’t get them to work. I tried MailEnable, I couldn’t get that to work either. I did fine hMailServer and that does work after configuring it. Like IIS, I have it just set to local, and port 25 is blocked anyway so outside relays won’t work.

The other thing that wasn’t working was my permalinks. By default WordPress doesn’t use permalinks with a rewrite, it just uses ?p=<post id>, but I have mine changed to year/month/day/title. In Linux/Apache, there is mod_rewrite for rewriting URLs, but in IIS 6.0 there isn’t anything (IIS 7 has more functionality). I could have gotten a rewrite DLL and wrote rules, but I found a sweet plugin that does it for me, especially for WordPress permalinks – http://www.binaryfortress.com/wordpress-url-rewrite/

Other than that, everything seems to be working fine. On other news, I have been looking into other blogging engines, comparing/contrasting, etc. Not sure where I will go with that though.

Server Move: Hosting My Own Site(s)

Well, I have been on HostMySite for a few years now, and I just wasn’t liking it. I didn’t have control, and couldn’t do everything I wanted to. Last week I signed up with ServerBeach and I have my own dedicated server. I am running Windows 2003, IIS, SQL, MySQL, PHP, etc.

I changed for now my DNS to GoDaddy from Active-Domain, since GoDaddy has SPF records (for Google talk federation, etc). I might change that up here in the future as well.

Transferring a domain takes way to long! Took like 4 days overall. Also, I first went with EasyCGI , a VPS solution, but the box couldn’t get to the Internet! I put in tickets, etc, they just wouldn’t fix it, so I canceled and went to ServerBeach. I am liking them so far, they had the server provisioned in about 4 hours.

One thing I can do now as well, is write a site for myself and import all the log files (Firewall, SMTP, All the Sites, FTP, etc) and have a nice little reporting solution.

ServerBeach is good, very professional. If you want to sign up, use referrer code BW27Q37B6D  (http://www.serverbeach.com/)

To get PHP/MySQL/WordPress, I loosely followed these three tutorials

How to Install PHP on IIS 6.0
How to Install MySQL On IIS 6.0
How to Install WordPress on IIS 6.0

For my ASP.NET Site, it was just copying over files and configuring IIS a little. For my blog, I used this dbbackup plugin (http://www.ilfilosofo.com/blog/wp-db-backup/) and then once I had my WordPress files over, and MySQL/PHP running, I connected to the instance of a DB I created and ran the SQL backup script, which created everything the way I needed it for WordPress.

For Mail, I use the built in SMTP in Windows 2003. I just had to turn on relaying, but yeah, spammers, so I just allowed the local server to send mail, and it works. Tested it using this (http://support.microsoft.com/kb/323350) and it worked.

Other than that, its pretty much basic server admin stuff. Firewall, FTP, etc. Everything is running smooth… for now :)

I will just have to make sure I have backups!

 

WordPress 2.3.3, PHP, Windows Live Writer, Allowed memory size of 8388608 bytes exhausted

After I updated to WordPress 2.3.3, I was seeing some pages in my admin screens getting errors like this:

Allowed memory size of 8388608 bytes exhausted

WTF? So, pages still worked though. I cleaned out everything I wasn’t using (themes, plugins, etc) in my WordPress directories, still getting it.

So researched a little, had to edit my php.ini in the etc directory of my webhost. I changed memory_limit from 8M to 16M. Pages started working again. cool!

Anyways, Windows Live Writer was getting an error on posting after I upgraded "Invalid response document returned from XmlRpc server" and the post would save as a draft in WLW (but still post to my blog)  After posting to the WLW groups on MSN, Joe Cheng at Microsoft wrote me to send me the WLW log file. (Help->About->Show Log File). After looking at the log file myself I noticed the same "Allow memory size…" errors and realized that the php.ini fix probably fixed the posting problem.

After I fixed the php.ini, my posts now go through with no issue.

I know some people have just updated the xml-rpc.php and they are having issues. I recommend just updating your whole WordPress installation. If you are using a custom theme you are ok. Just disable your plugins and re-enable after updating the files. the wp-config.php doesn’t get overwritten, so you are ok.

Upgrade Your WordPress Installation – ASAP!

There have been a few security related fixes for WordPress released. The are currently on 2.2.3

http://wordpress.org/development/2008/02/wordpress-233/

I use HostMySite.com for my hosting and they won’t upgrade your WordPress installation for you, so you need to do it yourself. Pretty simple, just follow the directions here:

http://codex.wordpress.org/Upgrading_WordPress

I backed up my WordPress instance, then disabled my plugins, then uploaded the files to FTP over my existing files, then hit the upgrade link on my site, and it all worked.

I already had Akismet plugin but they have a new version in the 2.2.3 zip file, everything worked after, I just re-enabled it. As for my other plugins, some work, some have new versions that I need to update..

Viper’s Video Tags causes errors with class-snoopy.PHP , I have tried numerous things to fix it but it seems that the only one at this point that I can get to work is to disable the plugin, which means all my YouTube videos are not working at this point – ugh…

Technorati Tags: ,,,

Cool Blog Trick: Crosspost WordPress to MSN Spaces

I use MSN Windows Live Messenger as my main IM client, I have most of the people I IM with on there, all my contacts in my mail.live account, it syncs with my T-Mobile Dash running Windows Mobile 6.0, etc. But, as you can see, I am using WordPress instead of MSN Spaces (Windows Live Spaces) or whatever they are calling it these days (they change the names of this stuff like monthly, I swear).

Anyway’s, in Windows Live Messenger, when a contact updates their space, you will see on your contact list in Messenger a little yellow star next to their name and you can go to their updated space/blogs/photos, whatever.

I wanted this to happen for me, but I don’t want to use MSN Spaces. Did some digging and found a WordPress plugin that will do it all for me – cool!

You can find the plugin here: http://privism.org/blog/live-sync/

There were a few tweaks, I had to modify the PHP so that the sync all would work with WP 2.0, and also the sync all timed out once, so I had to re-run, but it picked up from where it left off.

Now, anytime I post here, it will cross post to my space: http://stevienova.spaces.live.com  and people that are on my Windows Live Messenger list will see that I updated it. Just another way to get your updates out to people who might not know what RSS is, or a Feed Reader, etc.