Nathan leads Arkansas lawyers for new trademark filings

I wrote some custom software to automatically update a database of trademarks I file for my clients. This software notifies me daily of any changes to the status of my clients’ trademark applications. It also notifies me when deadlines get close or when renewal affidavits need to be filed. It’s a big help to my practice, and it helps me keep my clients informed in a timely fashion.

My software also analyzes statistical information about my clients’ trademark applications, such as average pendency, so I can give clients accurate estimates of the time it will take for various things to happen during the application process.

I recently wrote some new software to analyze statistics about all trademark applications naming Arkansas owners, and I’ll be featuring some of the insights on this blog going forward.

One of the first questions I asked was, “Who files the most trademark applications in the state?” The table below shows the answer:

I’m proud and pleased to be the attorney handling the most applications in the state over the last 12 months.

What would you like to know about federal trademark filings for Arkansans?

Enabling mcrypt for PHP

When working on database-intensive projects, like Intelection, I sometimes use phpMyAdmin. It’s capable of using mcrypt, which is cryptographic software. However, after upgrading to Mac OS X Mavericks, my mcrypt installation was broken. I kept getting an error on printed SQL reports, and the following image would appear on each screen:

Here’s how to fix it. First, install command line developer tools so that the proper PHP libraries are in place. Use this command:

xcode-select --install

Then, download and install autoconf, which is required to install the PHP extension for mcrypt:

cd /tmp
curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
tar -zxvf autoconf-latest.tar.gz
cd autoconf-2.69/
./configure --prefix=/usr/local
make
sudo make install

Next, install libmcrypt. You can download it from sourceforge.net here. Use these commands to install:

cd /tmp
mv ~/Downloads/libmcrypt-2.5.8.tar.gz ./
tar -zxvf libmcrypt-2.5.8.tar.gz 
cd libmcrypt-2.5.8
./configure
make
sudo make install

The next step is to install the PHP mcrypt extension. In order to do that, you’ll need to download the correct PHP that you have installed on your system. To figure this out, run these commands:

which php --(mine showed /usr/bin/php)
/usr/bin/php -v

Go to PHP’s historical website and download the correct version. Mine’s 5.4.17. Then, install the extension:

cd /tmp
mv ~/Downloads/php-5.4.17.tar.gz ./
tar -zxvf php-5.4.17.tar.gz
cd php-5.4.17/ext/mcrypt/
phpize
./configure
make
sudo make install

Next, PHP must be configured to use the mycrpt extension. This is done by editing the php.ini file, as follows:

sudo vi /etc/php.ini

Use the following regular expression in vim to find the extension part of the file:

:/^;extension

Add this line to the file:

extension = mcrypt.so

Finally, restart the web server to commit the changes:

sudo apachectl restart

With that, mcrypt is working properly again with phpMyAdmin.

Perl, MySQL, and Mac OS X

I use MySQL, Perl, and PHP running on Mac OS X for various projects. When I install an operating system update, the Perl/MySQL link invariably breaks, as the packages necessary to connect the two aren’t installed on Mac OS X by default. Instead of googling the fix every time I update, I figured I’d post it here for future reference.

  1. Download and install XCode from Apple’s website (v.3.2.6) or the App Store.
  2. Download the header files for the built-in version of MySQL from Apple’s website (here’s a link to the support article for 10.6 Server). Note that this is installed using the command-line tool tar, rather than double-clicking the archive file you download.
  3. Run CPAN to install DBI and its dependencies by executing the command sudo perl -MCPAN -e ‘install DBI’ .
  4. Download a version of DBD::mysql and expand it to a source directory somewhere (such as ~/src/).
  5. Open the MySQL Support page “2.4.5. Using the Bundled MySQL on Mac OS X Server”, which identifies the locations of files in the bundled MySQL version that comes with Mac OS X Server.
  6. Execute perl Makefile.PL from the source directory mentioned above without any flags, which will give you the default settings. This will error out because the MySQL header file locations are wrong (this is why I haven’t been able to figure out how to use CPAN to install DBD::mysql).
  7. Execute perl Makefile.PL again, this time substituting the header file locations on the MySQL page referenced above for the —cflags, —lib, and —testsocket flags. Remember to copy the remaining system-dependent defaults for the —cflags and —lib flags. You may need to change other flags as well, depending on your installation. (For instance, on Mac OS X 10.6 server, the command I used was: perl Makefile.PL —cflags ‘-I/usr/include/mysql -fno-omit-frame-pointer    -pipe   -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT’ —libs=’-L/usr/lib/mysql -lmysqlclient -lz -lm’ —testuser=test —testsocket=’/var/mysql/mysql.sock’ “).
  8. Execute make, make test, and sudo make install as you normally would.

This should get MySQL and Perl talking to each other using the bundled Mac OS X MySQL package.