December 12th, 2009 | Tags:

I had a strange problem with the recent upgrade of Ubuntu. I originally did the upgrade at home in Oklahoma on AT&T’s network and never noticed any problem. But then I went to Minnesota for the holidays and started having crazy internet problems. Most of the time I could not get any websites to pull up but I could always open up a console and ping it. I did some digging around and apparently if your ISP does not fully support IPv6 you will run into similar problems. There are also a few things you can do to disable IPv6 from your system. But if your like me and do not like to disable things that should not need to be disabled you can try my solution.

I registered for a free account on OpenDNS. This is not an advertisement for them. But it is an awesome service, and their domain name servers do support IPv6. Although there were many cool features even in the free account I still stopped using it as soon as I got back home. It is just a few milliseconds faster to resolve through AT&T than OpenDNS when you are on their service.

So if you upgrade to Ubuntu 9.10 or any release after this I’m sure. And if your start having problems resolving hostnames. Consider OpenDNS before modifying your system configurations.

October 2nd, 2009 | Tags:

Check it out, my friend Chris Pierce is running for state representative here in Oklahoma. I don’t know if many people around the Durant area read my blog. But if you do I would highly encourage you to vote for him. He’s a great guy and would make an awesome state representative. :)

January 28th, 2009 | Tags: , ,

There are two different methods of FCKeditor integration to choose from with CakePHP: PHP and JavaScript. I will cover both of them here but I think my personal choice would be using the JavaScript method and replacing the textarea. That way there is a fall back for people with JavaScript turned off. For this example I will be using my previous post about creating a CMS using Cake and adding the famous rich text editor to the add and edit content pages.

The first thing you want to do is download the latest version of FCKeditor. At the time of this writing the current stable version is 2.6.3. You could try the beta version or the nightly build if you feel adventurous but personally I like sticking with stable versions.

Read more…

January 27th, 2009 | Tags: , , ,

I have recently been working on a way to create a simple CMS (Content Mangement System) for my CakePHP websites that will allow the site owners to log in and maintain their own website. I needed a way for them to create, edit and delete pages. So I came up with this content controller and route component system. It isn’t anything plug-n-play like WordPress but I don’t always need a very advanced setup.

It basically allows you to create nested pages that have content stored in a MySQL table. Then creates custom routes to keep the URLs looking nice. When requested the content is retrieved and placed inside a very basic view and sent to the end user.

Read more…

January 24th, 2009 | Tags: ,

I wrote this component for a simple content management system that I was building for a customer that I will go over in another upcoming post. It can be used to create and remove routes on the fly.
Read more…

December 20th, 2008 | Tags: ,

There are a lot of tutorials out there on how to use the Auth component in CakePHP but everything that I’ve found so far has been lacking for my need – so I wrote my own. Recently I needed a way to set up a simple authentication mechanism I could use for customer websites in order for them to log in and manage their content. Since I use CakePHP for everything these days one of the simplest solutions was to utilize the built in authentication component which can be a little tricky to set up since the documentation is a little vague and scattered over the Internet.

Read more…

December 20th, 2008 | Tags: , ,

I needed .ctp files to open with PHP syntax highlighting in gedit. After searching around online for a while I found the answer on the ubuntu forums.

Add

<glob pattern="*.ctp"/>

to the

<mime-type type="application/x-php">

declaration in the /usr/share/mime/packages/freedesktop.org.xml file and then run:

update-mime-database /usr/share/mime

in the console. Restart gedit and now everything works great!

December 20th, 2008 | Tags: ,

I will admit I tend to be a little picky when it comes to how my code looks, HTML included. I hate having to go through all my PHP to try and make sure all my included files are outputting in the same structure as everything else so that when I view the source of the final product it is all nice and readable. Most people probably don’t care. There are others that don’t want any formatting at all believing that it saves load time not having all those extra tabs and spaces. Which is true by the way…remove all formatting from your html and you won’t believe how much it lowers your file sizes, especially with large web sites. But when it comes to maintaining the site (if you aren’t using some wysiwyg) you will curse the day you removed all that nice structure.

Read more…

December 20th, 2008 | Tags:

This is just a list of octal modes for Linux file permissions. If you know what I’m talking about you may find this useful. If not then never mind ;)

0 None
1 –x Execute
2 -w- Write
3 -wx Write/Execute
4 r– Read
5 r-x Read/Execute
6 rw- Read/Write
7 rwx Read/Write/Execute
TOP