Does your WordPress media library look like this photo? Maybe you don’t have the same affinity for the BMW 1M that I do, but if you’re missing thumbnails, I might be able to help.
After upgrading an important installation to WordPress 3.4, I suddenly noticed that many thumbnails had disappeared, specifically the earlier uploads. After posting to WP support forum and WP StackExchange group and receiving minimal response, I decided to take a look at the database myself.
I ended up finding the problem in the wp_postmeta table. It turns out that prior versions of WordPress didn’t insert the _wp_attached_file meta key when uploading a photo, and the latest version requires it. Since this key doesn’t exist for some uploads, the system defaults to showing the media icon, and refuses to display resized images in other posts.
The solution is to run through the list of attachments and insert this meta key where it doesn’t exist. I wrote code to do so, and it worked for me, but when another user requested it in a more useable format, I wrapped it in a basic WordPress plugin.
Download it here
I can’t provide much in the way of support for it, but if it fixes your problem, leave a comment.
My Ubuntu file server is almost complete. With multiple terabyte hard drives in place, software for sharing files among computers on the network, it provides all the services a modern home network requires. However, one of the things it is missing is PVR functionality, which MythTV provides.
MythTV is one of the premier software packages to come out of the open-source movement. It has been developed by hundreds of individuals who work in their free time to generate software that useful to an even greater number of people. Built for the Linux platform, it is very robust and feature filled. This power comes at a price, however, and MythTV is famous for being stubborn to install and maintain. Originally I wanted to write a blog post about how I installed a TV tuner card and conquered MythTV to create an amazing home server package, but instead I need help.
After adding a Hauppauge HVR-1600 to a PCI port in my mid-tower, I installed the drivers and firmware and set about installing MythTV. This has proven impossible because I cannot run the setup program. As shown by the image at the top, whenever I run mythtv-setup through an Xserver session on my MacBook Pro, no video is output and the interface becomes unbearably slow. I’ve consulted with many different forums and no one has been able to offer advice, so now I want to get help from the internet at large. Has anyone see this while installing MythTV and knows how to solve it?
Here’s my hardware setup to clarify things.
- OS Ubuntu 9.04 CLI
- TV Tuner Hauppauge HVR-1600
- Network Gigabit
- Remote terminal OS Mac OS X 10.6.4
- Remote terminal hardware MacBook Pro 13″ Dec 2009 GeForce 9400m
Since getting my PS3, then setting up my Ubuntu file server, I’ve really enjoyed watching movies on my TV. To get the media from computer to Playstation requires the use of software that employs the UPnP protocol, in the form of a DLNA server.
If there are too many acronyms in there, just remember the name Mediatomb. Mediatomb is an open-source, cross-platform DLNA server that streams a variety of media formats across a local network to whatever compatible device you happen to have running at the end. It can stream video, music, photos in numerous formats, and will even transcode others so that they can stream as well. All this tinkering comes at the expense of user-friendliness, though. In most cases, the regular binaries for each operating system will do most of the cool tricks I mention here. To get the most out of the system, however, requires you to compile from source.
As mentioned in my previous file server post, I’m running Ubuntu 9.04 Jaunty Jackolope on a “headless” Intel server, which I control via the terminal. Since the computer doesn’t restart, I wanted it to run as a daemon, which was where I ran into a problem. For some reason, Jaunty didn’t play nice with the standard daemon package, so I had do a little digging to find the solution.
- Create a temporary working directory by issuing this command
$ mkdir temp
- Install the ffmpegthumbnailer libraries by installing libffmpegthumbnailer. Use the command
sudo apt-get install libffmpegthumbnailer and enter your admin password when prompted.
- Compile ffmpeg using the tutorial at Juliensimon.blogspot.com but include the configure tag
--enable-libffmpegthumbnailer. Don’t move on until the configuration confirms thumbnailer installation.
- Compile and install the Mediatomb binaries from source — again, I used the excellent tutorial at Juliensimon.blogspot.com
- Check the functionality of Mediatomb to issuing the command
$ mediatomb then opening a web browser to http://ip_of_server:49152/
- To make the daemon work, first download the daemon package by issuing this command (one line)
$ wget http://mirrors.kernel.org/ubuntu/pool/universe/m/mediatomb/mediatomb-daemon_0.11.0-3ubuntu2_all.deb
- Now extract the files in the package to the temporary directory created earlier
$ dpkg-deb -x mediatomb-daemon_0.11.0-3ubuntu2_all.deb temp
As you can see, the daemon package is just a collection of configuration files, so installing it properly is just a matter of copying the files back.
- Change to the temporary directory with the files by typing
$ cd temp_directory_name
- Type these commands one line at a time to copy the files back to their rightful place. The commands with two lines should be printed as one single command.
$ sudo cp etc/mediatomb/config.xml /etc/mediatomb/config.xml
$ sudo cp etc/default/mediatomb /etc/default/mediatomb
$ sudo cp etc/init.d/mediatomb /etc/init.d/mediatomb
$ sudo cp etc/logrotate.d/mediatomb /etc/logrotate.d/mediatomb
$ sudo cp usr/share/doc/mediatomb-daemon/README.Debian usr/share/doc/mediatomb-daemon/README.Debian
$ sudo cp usr/share/doc/mediatomb-daemon/changelog.Debian.gz /usr/share/doc/mediatomb-daemon/changelog.Debian.gz
$ sudo cp usr/share/doc/mediatomb-daemon/changelog.gz /usr/share/doc/mediatomb-daemon/changelog.gz
$ sudo cp usr/share/doc/mediatomb-daemon/copyright /usr/share/doc/mediatomb-daemon/copyright
If the copy comes back with errors about directories, you’ll likely have to use the mkdir to create the requested folders.
- Now the important step is setting the proper permissions of the folder /var/lib/mediatomb. Change into that directory by issuing
$ cd /var/lib/
- The folder /var/lib/mediatomb should contain 3 files:
$ ls mediatomb
- Change the ownership of the folder and its contents.
$ chown -R mediatomb:mediatomb mediatomb
- Change the permissions of the HTML file.
$ sudo chmod 666 mediatomb/mediatomb.html
- Change the permissions of the remaining two files:
$ sudo chmod 644 mediatomb/sqlite3.db
$ sudo chmod 644 mediatomb/sqlite3.db-journal
- Make the script run at startup.
$ update-rc.d mediatomb defaults
To start the server, simply issue the command
sudo /etc/init.d/mediatomb start. If the server doesn’t start, view the Mediatomb log file to see what else is happening.
$ vi /var/log/mediatomb.log
Exit with :q. I’ve been running this setup since I first built the server, and it has worked exceptionally well.
This is a quick tip about WordPress blog emails. Ever since this blog was started, I received emails about comments from my webhost default address. It was ugly looking and didn’t provide any details about who really sent the comment.
The solution is to create an email account on your server with the address
domain.com is, of course, the domain of your website. Once this change has been made, comment moderation notifications will be from WordPress <email@example.com> and new comment details will be sent from the actual person emailing.
Just like the dreaded Blue Screen of Death, a kernel panic can strike fear into the heart of even a seasoned computer user. This black and grey screen suggesting that you restart your computer in multiple languages signals that the computer has done something that just does not compute.
Rather than pass it off as a single event and move on, it is in your best interest to determine what is causing the problem and banish it to the land of /dev/null (that’s Nerdspeak for garbage can).
Here are some suggestions for ridding your computer of this evil.
According to Apple, computer memory is a common cause of kernel panics, so it is suggested that you test your computer. A free utility to do this is Rember. It tests the RAM and can often find errors. If you are using third-party memory, double check the specification as incompatible RAM can cause unusual behaviour.
Can you recreate the error?
The whole idea from this post came from the fact that my computer gave me a number of kernel panics whenever I unplugged my USB hub that had an external drive on it. I still have yet to pinpoint the exact problem, but knowing approximately what could be causing the problem can go a long way to finding a solution. Once you have the hardware picture, you can search through Google to find other users who may have the same problem, and possibly offer a solution.
Any new software?
If the kernel panic comes shortly after a new piece of software was installed, it is quite possible that is the problem. Of particular concern is programs that install themselves in the startup items folder for launch at login. The startup items folder is located at Startup drive / Library / StartupItems and needs to contain ArcanaStartupSound as this is the computer boot sound. Anything else that looks unfamiliar can be moved outside the folder. Restart the computer, and see if the problem occurs again.
No one likes it when their equipment malfunctions, but like many other computer-related problems, a little thinking and troubleshooting can restore your computer to its former condition.