Archive for 2013

From Snow Leopard (10.6) to Mavericks (10.9) – Clean install

mercredi 20 novembre 2013

Since my iMac had had a lot of OS updates, I’d decided to clean install Mavericks on my new iMac (i5). Without using Migration Assistant, the manual data migration was a bit of a pain, especially Mail and Address Book.

Here is the log :

Installing OSX 10.9 Mavericks (It’s free!)


Installing OSX 10.9 Command Line Tools

Installing Apache2

Copy virtual hosts
Copy /etc/hosts
Apache started, no websites work

  • Change NameVirtualHost IP
  • LogLevel debug

Test the config

  • $ apachectl -S
  • $ sudo apachectl -t
  • $ sudo apachectl configtest

Everything seems OK, bug Console shows:

  • 2013-11-07 13:16:58,354[1]: (org.apache.httpd[5829]) Exited with code: 1

Move all vhosts outside config, apache restart:

  • OK
  • Found an error (error in log path) inside a vhost.

Add « staff » group on apache user « _www »

  • $ sudo dseditgroup -o edit -a _www -t user staff

Testing a Symfony 2 project

$ cd site/
$ rm -rf app/cache/*
$ rm -rf app/logs/*
$ sudo chmod +a « _www allow delete,write,append,file_inherit,directory_inherit » app/cache app/logs
$ sudo chmod +a « `whoami` allow delete,write,append,file_inherit,directory_inherit » app/cache app/logs

Fatal error: Maximum function nesting level of ‘100’ reached, aborting! in /Library/WebServer/SGL/Temps/site/vendor/twig/twig/lib/Twig/Node/Expression/Array.php on line 31

  • $ sudo nano /usr/local/php5/php.d/50-extension-xdebug.ini
    xdebug.max_nesting_level = 1000

Testing a Symfony 1.4 project

Using LIIP PHP 5.5.5, I first got apache segfaults, error_log : [notice] child pid 1432 exit signal Segmentation fault (11).
Looking at the Console, the crash reports showed apcu extension (APC) was crashing.
I had to disable it in /usr/local/php5/php.d/50-extension-apcu.ini
Follow the issue on Github


Could not send email through PHP. Let’s use my ISP SMTP :
$ sudo nano /etc/postfix/

  • relayhost =

Creating/coping original bash profile

$ touch ~/.bash_profile
$ nano ~/.bash_profile

Installing PHP : LIIP OSX PHP


$ nano ~/.bash_profile

  • PATH=/usr/local/php5/bin:$PATH
    export PATH

Library directory hidden

$ chflags nohidden ~/Library/

Installing MySQL 5.6.14

Download from DMG x86, 64-bit
Server version: 5.6.14

$ nano ~/.bash_profile

  • alias mysql /usr/local/mysql/bin/mysql
  • alias mysqladmin /usr/local/mysql/bin/mysqladmin

$ mysqladmin -u root password ‘my-password’


Delete blank user
$ mysql -u root -p

  • use mysql;
  • delete from user where User= »;

$ mysqladmin -u root -p reload

Databases migration

$ sudo /usr/local/mysql/bin/mysqldump --user=root -p --all-database --add-drop-database --skip-comments > all_db.sql
$ sudo /usr/local/mysql/bin/mysqldump --user=root -p --all-databases --add-drop-database --skip-comments > all_db.sql

$ ./mysql < all_db.sql

ERROR 2013 (HY000): Lost connection to MySQL server at ‘sending authentication information’, system error: 32

$ /usr/local/mysql/support-files mysql.server stop

$ sudo cp my-default.cnf /etc/my.cnf

  • bind-address =

$ sudo nano /usr/local/mysql/data/i5Mac.local.err

  • but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure
  • InnoDB: Error: Table « mysql ». »innodb_table_stats » not found

[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use –explicit_defaults_for_timestamp server option (see documentation for more details).
[ERROR] Can’t open the mysql.plugin table. Please run mysql_upgrade to create it.

Let’s start again…
$ sudo rm -rf mysql data/*
$ sudo ./scripts/mysql_install_db
$ sudo chown -R _mysql:wheel data
$ ./bin/mysqladmin -u root password ‘new password’
$ cd mysql-test
$ perl

Remove ‘mysql’ database from sql-dump to not overwrite Mysql 5.6 « mysql » database.
All databases/tables privileges will have to be granted again.

  • $ sudo /usr/local/mysql/bin/mysql -p < ~/Documents/all_db.sql ### dump without ‘mysql’ table
  • $ sudo /usr/local/mysql/bin/mysql_upgrade -u root -p


$ sudo ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql

Copy /Library/WebServer (my http server root)

Connect to old iMac wirelessly

$ cd /Volumes/Macintosh\ HD-1/Library/WebServer
$ sudo cp -p -R some-project /Library/WebServer/some-project

Copy all shell scripts ~/Scripts

Copy iPhoto Library

Copy only ~/Images/iPhoto Library
open iPhoto while holding  <option> key : Choose new library > Convert library

Copy iTunes Library


Copy ~/Music/iTunes
Copy /Users/Shared/Music/iTunes

Copy Documents/

Copy Desktop/

Copy Videos/

Copy Downloads/

Copy Library/Mail

  • $ sudo cp -R * ~/Library/Mail/

Copy Library/Preferences/


  • Mise à niveau des mailbox…
  • Mailbox empty, nothing imported

Close Mail
Move ~/Library/Mail/* > ~/Desktop
Open Mail again
Create new email account
Import all copied mailbox on the Desktop

  • File > Import mailbox

Will have to re-create all email accounts 🙁

Signatures : now it uses .mailsignature, was .webarchive

  • Open original webarchives files in Safari, copy paste content in a newly created signature

Address book

Had an original bug since I synced my contacts iMac > iPhone, hadn’t had time to fix it: lots of duplicate contacts.

Start again:
Get my original Address Book cleaned
Delete all contacts from (
In Address Book: selected all contacts > Export >  vcards
Browse / import vcards export file
Will have to re-create groups again 🙁

Import Fonts


Install Evernote

Install BBEdit

Install phpStorm

  • Install Java SE 6 Engine
  • Copy ~/Library/Preferences/WebIde70/*

Install Adium

Install Sequel Pro

  • Import preferences :
    Create one favorite (to activate Import… menu)
    Import favorites (using the « Gear » menu just below the favorites list), you can now select your old .plist file, and it’ll import your favorites from there, adding them to your current list.


Install Git

Install wkhtmltopdf

    Download wkhtmltopdf-0.9.9-OS-X.i368 (latest are buggy)
    $ sudo ln -s /Applications/Utilities/ /usr/local/bin/wkhtmltopdf

Install subversion (well no.)

  • OSX 10.9 native
    See Command Line Tools


  • copy ~/Download/bt
  • Application Support
  • Preferences


  • Application Support
  • Preferences

Photobooth photos

  • Copy original photos to Photo Booth Library > show package contents > Pictures
  • Copy original Recents.plist from ~/Library/Application Support/Photo Booth/Recents.plist to ~/Pictures/Photo Booth Library (show package contents)

Apple Ipod classic (2006) appears in finder but not in iTunes.

vendredi 12 avril 2013

I hadn’t connected my ipod classic on my computer for 6 months. Recently I wanted to sync it. It appeared in finder but not in itunes.
I tried on others computers and usb ports : no success.

I checked iPod with Diagnostics Mode (see turingtest2 answer on Apple Support Communities )

  1. Hold Center button + Menu button for 6 seconds.
  2. As Apple logo appears, immediately hold Center button + Left button 6 seconds
  3. Release all buttons as Diagnostic Mode Boots
  4. Go to : Manual Test > IO > HardDrive > HDSMARTData

Everything seems OK.

Since I didn’t care to lose ipod data as everything is on my mac, the solution was simply to erase the ipod with Disk Utility.
When erase was done, iTunes showed my brand new iPod :