Category Archives: Mac - Page 2

Telnet in OSX High Sierra?

Yes they decided to remove the Telnet client in High Sierra (10.13). So, what to do? I have found 3 solutions that have worked for my machines

  • Move your old telnet client from /usr/bin on a Sierra machine and to /usr/local/bin on you High Sierra machine
  • Install the ‘inetutils’ package from Macports (sudo port install inetutils) . This contains a Telnet client, among other utilities
  • Switch to the built in nc (netcat) client on High Sierra. Netcat seems to be similar to Telnet but I have only done some simple tests like connecting

Charset problem in Play framework after upgrading OSX

This is such a strange problem that I just have to write it down for future reference.
Involved systems:
* One Ubuntu 14.04.2 LTS on AWS (Amazon Web Services)
* One MacBook Pro 2010 with 10.7.5 with iTerm 2.1.1
* One MacBook Pro 2015 with 10.10.3 with iTerm 2.1.1
* One Play framework 2.3 application

Problem description:
After starting the Play application with the MacBook that has the 10.10.3 version all files that were written to disk had all non-ascii characters shown as ??. When starting the Play application with the old computer (10.7.5) these characters where displayed correctly.

After quite a lot of trial-and-error I found that the command ‘locale’ on the remote AWS server complained about:
“locale: Cannot set LC_CTYPE to default locale: No such file or directory”
“locale: Cannot set LC_ALL to default locale: No such file or directory”
when using the newer computer but not with the old

The ‘locale’ command error lead me to the following solution in iTerm:
Untick the Terminal option “Set locale variables automaticly” in Preference

This option is AFAIK default on in iTerm

After this was done the ‘locale’ error was gone and all files had the correct charset

Example virtual host and .htaccess configuration for Zend application on OSX Lion

I usually work with the backend of web applications so I do not get enough training in setting up virtual hosts, so I thought I better put an example up here. At least to have something to start with.

I use the built in apache server on OSX and I usually put my virtual hosts in the <username>.conf (/private/etc/apache2/users/<username>.conf) where <username> is simply your username 🙂


<VirtualHost *:80>
        DocumentRoot "/Users/<username>/Sites/myzendapp"

        <Directory "/Users/<username>/Sites/myzendapp">
                Options Indexes FollowSymLinks
                AllowOverride FileInfo
                Order allow,deny
                Allow from all


To get to work we need to put an entry in the hosts file like this:

# Host Database
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##       localhost broadcasthost
::1             localhost 
fe80::1%lo0     localhost

To reach your new zendapp go to:

If you want to use instead just add the public part to the DocumentRoot:

DocumentRoot "/Users/<username>/Sites/myzendapp/public"

and the Directory:

<Directory "/Users/<username>/Sites/myzendapp/public">
                Options Indexes FollowSymLinks

NOTE! Depending on your choice in urls you may need to change the .htaccess (/Users/<username>/Sites/myzendapp/public/.htaccess) file accordingly:

For long url (

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ /public/index.php [NC,L]

For short url (

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ /index.php [NC,L]

Tested on OSX 10.7.4 and Zend Framework 1.10.8