Skip to main content

Posts

Installing phpMyAdmin and removing the popup authentication in CentOS 6

Installing phpMyAdmin is a snip in CentOS, but there is a little trick that most tutorials skip out. For some reason the default setup (using standard repositories) does not like you having a null password for your mySQL root account. I know that you are supposed to be able to set a blank password in the pma config file and set the option to allow blank passwords to true, but this did not work for me until I set a root password. I kept getting a popup box that looked exactly like a .htaccess Apache protect but was actually just a Javascript prompt. So here goes: Step One - enable your EPEL repo: $ cd /tmp $ wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm # rpm -ivh epel-release-6-5.noarch.rpm Step Two - Install phpMyAdmin # yum search phpmyadmin # yum -y install phpmyadmin Step Three - optionally edit your Apache conf If you get Apache forbidden errors (should not be the case) you can try editing your .conf file...

Role based authentication in Cake 2.x

I do not like reinventing the wheel so really just want to build on existing tutorials and provide some background information and experience.  Firstly make sure you understand the difference between ACO and ARO. To put it in very simple terms an ACO is something that is protected by ACL and an ARO is something that uses ACL to access the ACO.  It might help to think of ARO as users (groups) and ACO as controller actions. You will be marking your user and group models as requester objects and setting ACO on controller actions across the board. The Cake manual really is good in explaining the concept of ARO, ACO, ACL. Please make sure you read it and understand it before continuing.  Unless you understand what ARO, ACO, and ACL mean at this point the rest of this post will make no sense. Please RTFM before continuing. Okay, now read through the Cake page that introduces the ACL shell ( here ). Ignore the sections "Create and delete nodes" and "Grant and...

Adding a cross-browser transparent background

Adding a transparent background that is cross browser compatible is relatively simple.  It does not rely on CSS3 and so this method works for the current versions of Chrome and Firefox as well as IE8 and above. Add this to your template: <div class="container"> <div class="content"> Here is the content. <br /> Background should grow to fit. </div> <div class="background"></div> </div> Then add this to your CSS: .container { position:relative; } .content { position:relative; color:White; z-index:5; } .background { position:absolute; top:0px; left:0px; width:100%; height:100%; background-color:Black; z-index:1; /* These three lines are for transparency in all browsers. */ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; filter: alpha(opacity=...

Adding a prefix to all files in a directory using DOS

A quick way to prefix all files in the directory is to run this command from your shell in the directory where your files are: for %a in (*) do ren "%~a" "prefix_%~a" The part of the command "prefix_" can be replaced with whatever prefix you want to swap with.

Getting XAMPP to use Microsoft SQL server

Scary Microsoft employee makes your life hard This post just builds on the post found here and gives you some shortcuts to solving the issue. Before visting that link run phpinfo() to check the compiler that was used for your version of PHP. Next thing to remember is that nts is short for "not thread safe" and ts is short for "thread safe". The 53 or 54 in the file names of the dll's you download from ( Microsoft correspond to the version of PHP you're using (5.3 or 5.4). Finally if you get the error about "This extension requires the Microsoft SQL Server 2012 Native Client ODBC Driver to communicate with SQL Server" you can download the native client from Microsoft . There is an .msi installer for just the client down the page if you don't want to download the whole package.

Giving up Facebook

Giving up Facebook was difficult. I had to face up to the fact that I was thinking about it pretty much whenever I was taking a break.  I started to realize that Facebook took up a fair amount of headspace and time.  Since I don't smoke I don't go outside.  Left with the choice of drinking yet another cup of unhealthy coffee or finding a distraction on my PC I found Facebook curiously addictive. What did I like about Facebook?   Well I analyzed this carefully and thought about the value proposition.   Ultimately I realized that Facebook offered two things - lots of  shallow electronic interactions and meaningless flash animation games.  Since I earn enough to buy a decent PC (or console) and really hot games the games on Facebook offer little.  The only game that meant anything to me was Fairyland and that only because it promised to save the rainforest.  PC games are better without Facebook.  As for meaningless social interaction ...

Three steps to create a self-signed certificate in Apache for Ubuntu 11.10

It is very simple and quick to create a self-signed certificate on your development machine. Of course you would never use this on a production server because self-signed certificates are vulnerable to man in the middle attacks.  You will need to make sure that you have the ssl-cert and libapache2-mod-gnutls packages installed. Step One : Use the ssl-cert package to create a self-signed certificate.  This will create the certificate files in /etc/ssl which is where the Ubuntu default Apache configuration expects to find them. make-ssl-cert generate-default-snakeoil --force-overwrite Step Two : Active the SSL module and the default SSL site using the convenience wrappers: a2enmod ssl a2ensite default-ssl Step Three : Restart Apache service apache2 restart