Archive for May, 2012

Get PHP up nice and quick on osx

Monday, May 14th, 2012

Posting this for myself mostly as a reminder but useful for others who may want PHP up and running in a specific directory quick on osx.

1. (First time only) Open /private/etc/apache2/httpd.conf. Uncomment the line that says
“LoadModule php5_module libexec/apache2/”
2. Search for DocumentRoot. Change the path in quotes to match the local folder you want to be your www folder.
3. Open system preferences->Sharing. Turn on “Web Sharing” checkbox.

jQuery mobile page duplication

Saturday, May 12th, 2012

We decided to use jQuery mobile for a recent project and were very happy with the results until we ran into a weid issue with the ajax loading. It appears that whatever page you come into the site on will hold onto it’s content no matter what. This becomes an issue when you link back to that page. Depending on the situation you may or may not end up with duplicate content getting dynamically injected into the page. Where this gets sticky is that if you are trying to get an element by it’s id you might get he shown content or some sort of hidden cached content. It seems to vary from situation to situation, but we kept having all the javascript in our homepage break. Our solution ended up being to set $.mobile.ajaxEnabled = false; which essentially breaks what we were trying to use the framework for.