Xcode 4.2 and SVN Authentication Fix

I was having issues with SVN for a long time after upgrading to Xcode 4+ from version 3.2+ when trying to commit file changes. No suggestion I found on the Internet solved them until I found a proper solution. After making my /etc/apache2/other/svn.conf file resemble this, I was finally able to get Xcode 4 to change all the red lights to green. Looks like I won’t have to switch to git after all.

 
<Location /repos>
     DAV svn
     SVNParentPath "/usr/local/svn/repos"
     Order deny,allow
     Deny from all
     Satisfy any
 
     AuthType Basic
     AuthName "SVN Repository Realm"
     AuthUserFile /etc/apache2/svn-auth-file
 
     #read-only access
     <Limit GET PROPFIND OPTIONS REPORT>
        Require valid-user
        Allow from localhost
        # Allow from another-ip
        Satisfy any
     </Limit>
     # write access
     <LimitExcept GET PROPFIND OPTIONS REPORT>
       Require valid-user
     </LimitExcept>
</Location>
VN:F [1.9.7_1111]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.7_1111]
Rating: 0 (from 0 votes)

Mac OS X Lion and MySQL Startup

After installing Mac OS X Lion and updated my PHP extensions, as well as installing the newest MySQL, I found that when I tried to use MySQL, it wasn’t working. Seems that MySQL wouldn’t start up do to owner settings.

MySQL was previously installed in Snow Leopard with file ownership set to mysql:wheel, which worked fine in Snow Leopard. In Lion it failed to start.

In Terminal, run the following:

sudo chown -R mysql:mysql data

After running this, and starting up MySQL in the System Preferences panel, everything worked again.

Notice, that your “data” folder is the MySQL data folder where it stores the database files. My is located at “/usr/local/mysql-data/data” so that I don’t have to worry about upgrades and moving the folder. Your location may vary.

Hope this helps anyone else.

VN:F [1.9.7_1111]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.7_1111]
Rating: 0 (from 0 votes)

Mac OS X Lion Upgrade PHP Extensions Tutorial: ImageMagick and More.

After upgrading my Mac OS X Snow Leopard to Mac OS X Lion, I noticed that some of my PHP extensions that I had compiled to work with the Apple PHP 5.3.6 binary had been removed. Some, not all. Which I assume is due to them having been compiled 4-way binary compatible (PowerPC and i386/x86_64). Since Lion no longer supports PowerPC, it seems that all the extension files that had PowerPC in them were removed. Xdebug was still there, but all the rest were gone. Below is the process I performed to get everything back.

Step 1:
Download and install MacPorts 2.0.0 for Mac OS X Lion.

Step 2:
In Terminal, run the following commands. The first one may take a while to update the binaries as it compiles them.

sudo port upgrade outdated
sudo port uninstall inactive

Step 3:
Download and install MySQL 5 (currently at mysql-5.5.15-osx10.6-x86_64 as of this writing) for Mac OS X.

You may not need to install MySQL, though I chose to do so as I wanted to update to the 64bit System Preferences panel, since I was running an earlier version of MySQL 5 previously.

Step 4:
I also noticed that my /etc/php.ini file was moved to /etc.php.applesaved and no longer called any of my PHP extensions I had set.

In Terminal, run the following:

sudo cp /etc/php.ini.applesaved /etc/php.ini
sudo apachectl graceful

Step 5:
Continue on to my PHP extensions tutorial for Snow Leopard and begin with Step 5 if you don’t have ImageMagick installed, Step 6 if you do.

VN:F [1.9.7_1111]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.7_1111]
Rating: 0 (from 0 votes)

ReformatCode Project on GitHub

About:

I have added an open source project to the GitHub.  The project, ReformatCode currently only supports reformatting JSON data to human readable format.  Though I hope in the future it can be extended to support CSS indentation structuring with intelligent parent – child relationship styles.   Formatting CSS can be a little complex if you want it to really show properly how the CSS works with other classes and what is a sub element or sub class of another.  So that would be a possible and welcome addition to the code base in the future if effort is put into it.

Download:

ReformatCode Project via GitHub

Usage:

Passing either a JSON object or string, will reformat the JSON to a human readable level.
Second param (optional) is an object of settings to override defaults.

Example:

ReformatCode.formatJSON({"key": {"sub_key": "sub_value"}}, {"indent": "spaces", "debug": true, "newline": "\r"});

Input:

{"key": {"sub_key": "sub_value"}

Ouput:

{
    "key": {
        "sub_key": "sub_value"
    }
}
VN:F [1.9.7_1111]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.7_1111]
Rating: 0 (from 0 votes)