Chris Jean
Linux, WordPress, programming, anime, and other stuff
  • Home
  • Linux
  • Development
  • Random Ramblings

Archive for Development – Page 3

Generating MIME Type in PHP is not Magic

by Chris Jean
February 14th, 2009

Sorry about the late post everyone. I had a long week and went to bed before making sure a post was queued. Hopefully you’ll forgive me. :)

I’m working on a project where I needed to generate a MIME type given a file name. Not only did I need to create a solution that worked, I also needed the solution to be compatible with PHP 4/5 and not require any additional software to be installed on the host. I thought this would be a simple matter of finding a PHP function that does this. Unfortunately, things were not as simple as this.

Read More→

Categories Development, Tips 'n Tricks
Comments (18)

PHP Regular Expression Syntax References

by Chris Jean
January 30th, 2009

Since beginning work on my DNS Yogi site, I’ve had to do numerous regular expressions to matching all sorts of string bits. I quickly ran into problems when I realized that I need to add support for Unicode characters since certain TLD registrars support registrations with non-Latin characters.

The main issue is that there are multiple regular expression engines. PHP uses a flavor of the PCRE (Perl Compatible Regular Expression) engine. Each engine and varient of an engine has a slightly different way of handling regular expression syntax. I needed to find out exactly how the PHP regular expression engine worked, and finding that information was not easy.

Read More→

Categories Development, Tips 'n Tricks, WordPress
Comments (0)

DNS Yogi: A True Alternative to DNSStuff

by Chris Jean
January 28th, 2009

A while back, I posted about how I wanted to find an alternative to DNS Stuff. Since then, I haven’t found much to get excited about. In addition, I continue to get search traffic where people use terms like “free dnsstuff”, “dnsstuff alternative”, or “dnsstuff coupon code”. So, it seems that I’m not the only one that wants a real alternative to DNS Stuff.

Introducing DNS Yogi. My goal is to provide a set of tools that can compete with the quality of DNS Stuff while remaining free. Here is what I plan to launch the site with:

Read More→

Categories Development, Random Ramblings, WordPress
Comments (0)

WordPress as a Web Application Framework

by Chris Jean
January 26th, 2009

WordPress may at its core be a blogging platform. I know that Matt Mullenweg, creator of WordPress, wants to keep all development of WordPress focused on blogging. I also know that WordPress is and will always be primarily used for blogging. However, as I work more an more with WordPress, I’ve come to see WordPress in a different light.

There are those that want to use WordPress as a full web publishing platform and not just a blogging platform. With the right kind of theme and plugins, using WordPress in this way can produce great results. Again, I see WordPress in an even more abstract view than as just a web publishing platform.

How do I see WordPress then? Frankly, I see it as an incredibly-flexible web application framework that can be used to develop seemingly unlimited type of applications.

Read More→

Categories Development, WordPress
Comments (18)

Auttomatic Releases WordPress Video Solution Framework Code

by Chris Jean
January 14th, 2009

I didn’t see a lot of fanfare, but the release of the WordPress Video Solution Framework plugin, also called the WordPress.com Video Server, has the potential to be huge.

Some of you may wonder why I was interested in getting FFmpeg installed again. This is the reason why: Auttomatic has released code that makes it possible (with some work and knowhow) to turn a WordPress Mu platform into a video solution.

Features

  • Video-Uploader: A program that will load raw video files into the transcoder without making the user wait
  • Video-Transcoder
    • Takes in raw video from the Uploader
    • Transcodes the video into h.264
    • Stores the video into an mp4 container
    • Creates thumbnails
    • Sends the files and meta data to the file server
  • Video-FinalTouch
    • Receives files and data from the Transcoder
    • Copies the files into the source video’s folder
    • Updates the database tables with new video information
    • Can be customized to replicate or load files into a CDN (Content Delivery Network)
  • Video-XML
    • Reads in information from the video such as: caption, duration, and format
    • Returns this information in XML format
    • Caches information to ensure quick performance
  • Video-AJAX: Displays the video when the transcoder has not completed processing the raw video data
  • Includes a player written in ActionScript 3 that will handle proper display of the video based upon your configuration

Final Thoughts

The notes indicate that at least some work must be done in order to make everything function. Since I have yet to try everything out yet, I don’t know exactly how much work that would be. I’ll be sure to post about my experiences and hopefully have some examples soon.

The notes also indicate that you’ll need to have a working install of FFmpeg and qt-faststart (the readme.txt file says qu-faststart, but it’s actually qt-faststart). To install FFmpeg, see Install FFmpeg and ffmpeg-php on CentOS Easily.

Categories Development, WordPress
Comments (6)

Install FFmpeg and ffmpeg-php on CentOS Easily

by Chris Jean
January 13th, 2009

FFmpeg is an amazing collection of open-source tools that can record and stream video and audio. However, it can also transcode video and audio (convert the files to different formats), and that is what has me so excited. There’s also a great PHP package called ffmpeg-php that allows for easy use of FFmpeg from inside PHP scripts. Today, I’m going to see if I can’t help you get both of these set up on your system.

Admittedly, it’s been a while since I’ve tried to install FFmpeg, about two years. I recently thought up some ideas on how I’d like to use FFmpeg, so I thought it was time to give it a try yet again. Today, I’m proud to say that installing FFmpeg is so much easier to install compared to the past, that I dare say it’s simple.

Here is my experience with installing FFmpeg on my server and how to fix the pitfalls that I encountered.

Read More→

Categories Development, Linux, Tips 'n Tricks
Comments (32)

Convert XML to Associative Array in PHP

by Chris Jean
January 12th, 2009

I’m working on a project where I needed to convert an XML doc into an associative array in PHP easily. I hadn’t done any work with XML in PHP yet, so I started digging around the usual places.

Soon, it looked like my best option would be to create a completely-custom XML parsing engine out of PHP’s built-in XML Parser. I started working on a set of code based off of the External Entity Example since that is the only example that actually incorporates the ability to retrieve data and not just attributes. My results were slow and very error prone. Why is this so tough? XML isn’t exactly new, and it is very widespread. Similarly, PHP is an extremely popular language. So, why is it so hard to combine the two and work with them easily? I shouldn’t have to create a custom syntax parser just to be able to read a standard format document into a PHP data structure.

Read More→

Categories Development
Comments (22)

I Still Don’t Like Fancy Programming Editors

by Chris Jean
October 27th, 2008

For about eight years now, I’ve been hapily using Crimson Editor. At its simplest, Crimson Editor is nothing more than a fancy Notepad; however, it is so much more than that. While it doesn’t have all sorts of fancy tools that some editors have, it does support customizable syntax highlighting, customizable colors, line number, visible whitespace characters, basic smart indenting, a file/directory navigation pane, project support, and a MDI interface. Those features aren’t really the reason why I use it as almost all programming editors support such features. I use it because it gives me tools that help me program without doing things that hinder my productivity.

Read More→

Categories Development, Random Ramblings
Comments (4)

Tool to Optimize MySQL Configuration and Performance

by Chris Jean
October 23rd, 2008

Web applications developers such as myself often have a hard time keeping up with everything that’s going on. There’s always some new programming or scripting language, new standards, new browsers, new technologies, new paradigms, new social networks, and on and on. Every day, something new happens. The end result of all of this always ends up being very similar: people demand faster applications that deal with ever-increasing amounts of data which end up putting massive stress on the server architecture.

As we toil to improve the performance of the applications and their snappy response times, it becomes easy to forget about how we can tweak settings on a low level to provide massive speed improvements on the front-end. For example, most people don’t know that you can configure MySQL to take better advantage of the resources that the server has available.

By default, MySQL is configured to consume a relatively limited amount of memory resources. Start giving MySQL more memory to work with, and your application’s performance can improve greatly.

Read More→

Categories Development, Linux, Tips 'n Tricks
Comments (1)

Empty uploaded files with Perl

by Chris Jean
July 30th, 2008

I work for a company that has a proprietary CMS software package written in Perl. We have a number of servers that run this code, and everything has been fine for a number of years and many different versions and customizations.  A few months back, something changed. One of our servers started producing completely empty files for all uploads. This affected all of our code, all of our versions, and every site.

After some time debugging and testing, I finally found the problem. Apparently some code was updated, either Perl itself or one of its packages, and that caused my CGI object to be recylced before the upload code ran. When the CGI object gets recylced, all the file handles are closed resulting in reading and saving an empty file.

The solution was deceptively simple. All I had to do was store the CGI object in a persistent variable that has scope throughout the end of the program execution.

Categories Development
Comments (0)
« Previous Page
Next Page »
Chris Jean
Copyright © 2012 All Rights Reserved
iThemes Builder by iThemes
Powered by WordPress