Archive for category Open Source
Introducing LavaPHP – Yet Another PHP Framework
Posted by Randy in Open Source, Programming, Web Development on April 13, 2012
I’ve used quite a few PHP framework to varying degrees, and like many other PHP developers, I’ve decided to make my own. Of all the current frameworks available, I prefer CodeIgniter, because it is easy to use, has great documentation, and generally stays out of your way.
Everyone has their opinion of the best PHP framework, but I like the ones that let me write PHP and don’t throw a lot of features that I don’t need into the mix. I found that no matter what PHP framework I was using, I was always creating a table for users. I was always creating login functionality for users. I was always creating email confirmation functionality for users. I was always creating an admin interface for working with my configuration. I was always creating classes that helped me work with web services/REST APIs. I always need a small web service of my own for Ajax functionality. I always needed to add curl functionality just in case the hosting provider had fopen disabled (which most do). A Managed Cloud VPS would be great for such purposes
Those were the things I needed. ORMs are great and all, but I really didn’t want to learn proper YAML syntax just so I could setup automatic object models for my database tables. Creating models for my database isn’t that much of a chore. Creating a complete user system can be.
So, I set out to create a framework that I can use for my own projects and have all the functionality that I find I usually need right out of the box.
Another thing about frameworks is that they are designed to make enterprise level sites. They aren’t designed to create software system which can be distributed. By that, I mean I wanted to create a software package that could be installed by end users and used by them to create their own websites (custom CMS system with a specific purpose). A normal framework doesn’t work well in this area because of the way views are usually handled. Mainly, I wanted third parties to be able to create themes for my CMS systems without much effort. With something like CodeIgniter, I could use a templating engine via a plugin or Codeigniter’s own minimalist template engine, but I don’t like take one piece of software and adding on a bunch of plugins.
First you have to learn how to use the plugin. Then you have to hope that there isn’t a bug in the plugin that will spring up in your app. Then if there is some small customization that needs to be made to the plugin, you could spend days trying to figure out a way to make it work with your system, when it would have taken less time to just write your own. Using plugins also feels a bit like cheating to me, as well. I want to know every little part of my system, so that if a bug comes up, I’ll know right where to look or at least have a decent idea where to look.
With all that said, I’m announcing my PHP framework. I’ve written it completely from scratch and I’m hosting it on Github. I also have purchased the dot com for it. I’m calling it LavaPHP. The motto will be “LavaPHP – Add a little lava to your LAMP” and it will have a lava lamp as it’s mascot/logo. If you’d like to help with the initial development, hit me up and fork the project here: https://github.com/lpcustom/LavaPHP
Resetting WordPress Passwords Manually
Posted by Randy in Open Source, SQL, technology, Web Development on January 10, 2010
I’ve had to do this for my wife and her mom both, so I thought I would share this with anyone who needs to reset a WordPress password. I personally love WordPress. You can build any type of site with it, not just a blog. If you have created a WordPress site but haven’t visited the admin dashboard in a while, you may have forgotten your password. I thought that WordPress would email you a lost password, but maybe they didn’t put in their correct email address. It could have also been the installation script they used through cPanel. Whichever the case, they couldn’t get into their dashboard and they needed their passwords sent to them.
There’s a very easy way to reset that password through SQL. Whether you are using phpmyadmin or some other SQL client to access your databases, you’ll want to use the following SQL statement to reset your password:
1 | UPDATE `wp_users` SET `user_pass`=md5('password1') WHERE `ID`=1; |
You can change password1 to whatever you want. I’m amazed that WordPress passwords aren’t stored with more encryption than a simple MD5 hash. It’s secure enough, don’t get me wrong. I’m just surprised that the WordPress developers didn’t opt for more.
Oh well, I hope that helps someone in a pinch.