setting up osx as web server

By default OSX comes with the industry standard apache web server , only OSX server comes with a mysql server however and none are configured my default for php.

Fortunately enabling both php and installing mysql is trivial on OSX compared even to linux
1 – enable php in apache (basically edit the config file uncommenting php module)
type in terminal

sudo pico /etc/apache2/httpd.conf

press the down arrow untill you see this line

#LoadModule php5_module libexec/apache2/

delete the “#” at the start of the line by pressing right arrow and delete
press ctrl+x
press y
press enter
(you need to use console to edit this file because osx has no way to access that file in a open file window from any program)
2- install mysql
go and download the package for your architecture and osx version , install it and the pref pane
open System Preferences and click MySQL > Start MySQL Server
open terminal and type :

/usr/local/mysql/bin/mysqladmin -u root password “MYPASS”

/usr/local/mysql/bin/mysqladmin -u root -h MYHOSTNAME password “MYPASS”

change MYPASS to what you want your mysql password to be and MYHOSTNAME to the machine’s hostname (it is shown in terminal along with your user name like this [myuser@myhostname:~])
3 – done , you are the owner of a AMP (apache/mysql/php) server , now you can harness the huge amount of free web software running on this ,
as a test that everything worked fine you can install phpMyAdmin as you will probably need it anyway , go to and extract it to /Library/WebServer/Documents/phpmyadmin
open /Library/WebServer/Documents/phpmyadmin/ in a text editor

$cfg[‘Servers’][$i][‘host’] = ‘localhost’;

and replace localhost with your hostname

save the file as /Library/WebServer/Documents/phpmyadmin/
done , open http://myhostname/phpmyadmin and login with user: root , password:what you set before

The Confidence of the Incompetent The Peter Principle and Hagakure

I was baffled but not really surprised by a relatively new discovery by Dr. David Dunning that the most likely persons to overestimate their skills in a area are the ones that do not have any skills in that area.

The logical explanation seems to be that the skills required for competence often are the same skills necessary to recognize competence.

Interesting is the fact that unlike their unskilled counterparts, the most able subjects in the study, Kruger and Dunning found, were likely to underestimate their own competence.

The researchers attributes this to the fact that, in the absence of information about how others are doing, highly competent subjects assumed that others were performing as well as they were — a phenomenon psychologists term the “false consensus effect.”

This brings in mind a book that dates back to 1969 by Dr. Laurence Johnston Peter , The Peter Principle which largely states that every person in a organization strives to reach and eventually gets promoted to their incompetence level , at which they remain from thereafter.

In my opinion Dr.’s Dunning study sheds new light on the The Peter Principle , because now we can assume that a explanation to why the person never gets put off its incompetence level is that he appears to be at his most competent level only while being utterly incompetent.

Now let us go way back to 1716 and see exactly the same thing portrayed in a old japanese writingHagakure

In one’s life. there are levels in the pursuit of study. In the lowest level, a person studies but nothing comes of it, and he feels that both he and others are unskillful. At this point he is worthless. In the middle level he is still useless but is aware of his own insufficiencies and can also see the insufficiencies of others. In a higher level he has pride concerning his own ability, rejoices in praise from others, and laments the lack of ability in his fellows. This man has worth. In the highest level a man has the look of knowing nothing.

Astonishingly how the insight on the human nature from almost 300 years ago is still as valid and revealing as the modern studies.

Intrigued by these new perspectives i have started to a little survey by myself on a much smaller scale , more exactly i am asking the users that take my PHP Skill Test and the Common Knowledge Test to average their competence for that test before seeing the test results


In the above graph notice how big is the difference at the end of the chart between the many with lots of confidence and the few with lots of knowledge


In the above graph a small scale number reflects a minority while a big number a majority , the distance between the two lines reflects the proportion between knowledge and confidence , a equal amount of them is reflected where the lines entwine.

The 2000 Ig Nobel Prize was awarded to David Dunning of Cornell University and Justin Kreuger of the University of Illinois, for their report, “Unskilled and Unaware of It: How Difficulties in Recognizing One’s Own Incompetence Lead to Inflated Self-Assessments.” ( published in the Journal of Personality and Social Psychology, vol. 77, no. 6, December 1999, pp. 1121-1134 )