FCKeditor Error: this.DOMDocument has no properties

In my prior post I ran into a problem with FCKeditor on Apache having to do with serving JavaScript files as the proper MIME type. I ran into a similar problem with XML files when trying to load multiple instances of FCK textareas:
Error: this.DOMDocument has no properties
Source File: http://www.mysite.com/FCKeditor/editor/js/fckeditorcode_gecko.js
Line: 43

This is easily fixed in the same way, by telling Apache how to properly serve XML files. Put this in your httpd.conf or an .htaccess file:
AddType text/xml .xml

FCKeditor in Firefox – Illegal Character JavaScript error

For some reason, FCKeditor would not load in Firefox 2.0 even though it loaded in IE just fine. Turns out Apache was serving up the javascript files as the wrong FileType, so Firefox would choke on some jibberish characters:
Error: illegal character
Source File: http://www.myserver.com/FCKeditor/editor/js/fckeditorcode_gecko.js
Line: 1, Column: 1
Source Code: /*

The fix is easy enough, simply add an .htaccess file to your dir containing the following:
AddType application/x-javascript .js
Now FCKeditor should work fine in Firefox.

Yum: Cannot find a valid baseurl for repo: core

I went to update my Fedora Core 5 machine today, and received the following error:
[root ~] yum check-update
Loading "installonlyn" plugin
Setting up repositories
core [1/3]
Cannot find a valid baseurl for repo: core
Error: Cannot find a valid baseurl for repo: core

I tried running yum clean all but it didn’t help. After looking around I found that all of my repo files in /etc/yum.repos.d/ had their baseurl values commented out. Don’t ask me how that happened, I have no idea. Simply un-commenting all the baseurl values in all my repo files fixed the problem, and yum is once again running as expected. So if you run into this problem, make sure everything is set up right in /etc/yum.repos.d/*.repo

Installing PDFlib Lite as a PHP module on Fedora Core 4

The instructions for doing so (here) seemed straightforward enough, but I ran into a few problems. So here’s how I got PDFLib working with my PHP install on Fedora Core 4.

First we need to build PDFlib Lite from Source. Download it from here. Unpack it, then:
./configure
make
make install

Easy enough. Now:
yum install automake
yum install php-devel
pecl install pdflib

(Note: php-devel is required because we need phpize which is used by the pecl command.)

The PECL install will ask you a question: “Path to PDFlib installation?” This is where I ran into problems. You must put /usr/local/ and NOT /usr/local/include because the script is hardcoded to look inside the include directory automatically. Once PECL finds pdflib.h it will continue and finish compiling our shared object, pdf.so. The script will install it for us in /usr/lib/php/modules/
Now we just have to tell PHP to load the SO. Open up php.ini and add the following line:
extension=pdf.so
Save & exit, and restart your Apache with apachectl graceful. Now browse to a file containing the phpinfo() function and check to see if PDFlib is now active. If you see it, you’re good to go!

NOTE: I ran into a problem with RPM GPG Keys at the automake install step. I was getting the following error:
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID db42a60e
public key not available for autoconf-2.59-5.noarch.rpm
Retrieving GPG key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
The GPG key at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora (0x4F2A6FD2)
is already installed but is not the correct key for this package.
Check that this is the correct key for the "Fedora Core 4 - i386 - Base" repository.

To get around this we need to import all the keys by run the following command:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
I found this solution in this thread.

Serving up a Windows Media Video (WMV) with Apache.

When trying to serve up a Windows Media Video file from my Apache webserver, I ran into the problem of Firefox being unable to handle the file properly. It would simply load it as a plain text file, resulting in a bunch of jibberish representing the machine code of the video (as if you had opened the video with Notepad). It turns out that with a stock install, Apache does not know how to serve this type of file, so it serves it as the default, which is plain text. It’s an easy fix, you simply have to tell Apache how to serve these types of files. Open up /etc/mime.types and add the following line:
video/x-ms-wmv wmv
You will also need to add the following to your httpd.conf file:
AddType video/x-ms-wmv .wmv
Save and exit, restart Apache, and your browser should now prompt you for how you want to handle the file (Open/Save).

phpList with crontab: Permission denied.

When processing your phpList queue with a crontab, you may get the following error:
bash: /home/yourname/phplist: Permission denied
This happens if your phplist script is not executable. It is an easy fix. Simply make the phplist script executable and it will run as expected:
chmod u+x /home/yourname/phplist