Archive for the ‘PHP’ Category

MySQL Tool Review: phpMyAdmin

Tuesday, May 30th, 2006

One of the most popular MySQL management tools out there, phpMyAdmin has become widely used, but I’d have to say it’s one of my least favorites. I did use it back in the day and it wasn’t too bad, some of the features it offers are very useful. It’s one of the few tools to let you do things like rename a table simply, or other move-stuff-around type actions. My discontinued use of it started out with a particular update and there after performing horribly slow on my G3 server. I’m assuming this particular problem could possibly be gone now, but it made me ditch it quite fast. This could’ve easily been some other problem for all I know, but first reaction just was to ditch it and use CocoaMySQL instead at the time. I’ve never used it since partly because I got along fine with various other tools, and also my current employer does not use it due to security concerns. From phpMyAdmin being such a popular application, it’s prone to security holes way more frequently than other tools, mostly because of it being a public accessible tool for your MySQL database.

Shots of both phpMyAdmin themes/styles:

Overview of the ups and downs of phpMyAdmin:

Pros

  • Access from any machine, no installation of client software needed
  • Robust set of features
  • SQL file import and export with reasonable options
  • Table operations like renaming, moving data etc.
  • Simple tools for copying data or structure from database to database
  • Display of row data only limited to your browser ability to render that much html (or just use the pagination)
  • Full suite of tools covering querying to privleges

Cons

  • Uses frames for it’s interface, can be funky sometimes (would be better with no frames, ajax, even iframes maybe)
  • Font sizes of default themes bit wonky on latest one I tried, fixable of course (big on default, tiny on dark)
  • UI can be a bit sluggish due to it being a web application, depending on connection speeds etc.
  • Can be prone to security holes due to popularity, updates are usually quick though
  • Can’t do ‘quick edits’ like some desktop clients allow

The power and versatility of phpMyAdmin puts it at the top for MySQL client tools, but mostly out of personal preference I choose to remove it from my list of clients. The problems with phpMyAdmin are pretty slim, and if you don’t mind a web-based MySQL client, then you probably are already using this, or will at least find it suitable. So far I’m pretty convinced that a web-based MySQL management tool is just not something that will ever jive with me, I yearn for the snappier and cleaner UI of a desktop application when it comes to managing my MySQL databases. Unfortunately most of those bring in their own set of problems as seen in MySQL Query Browser Review and soon to come with reviews of YourSQL and CocoaMySQL.

Technorati Tags: , , , , ,

Modified TextMate PHP Bundle

Tuesday, May 23rd, 2006

I was having a improve-my-TextMate-experience moment and along with making some small snippets to help smooth my coding when using TextMate, I also went thru TextMate’s PHP bundle and applied my preferred formatting to all the snippets in it. It has formatting for conditionals like so:

if(conditional) {
// code
}
else {

}

and require/include sans () (like PEAR standards):

require_once ‘filename.php’;

and some other various cleanups like the random occurrence of # comments and extra tabs & spaces where they shouldn’t be, or at least I don’t think they should be.

So if you have similar coding style, check it out see if it’s an anal enough style for you or not.

“Download Jerome’s Anal PHP TMBundle”:http://jeremyknope.com/files/PHP-tmbundle.zip

Technorati Tags: , , ,

PHP Debugging Bookmarklet

Wednesday, May 10th, 2006

I just created a simple bookmarklet to invoke Zend Studio’s debugger from a browser with the page I’m currently viewing, I can even do this on a different machine if I have it setup to allow other hosts to do remote debugging. Here’s the code, you just have to replace debug_host= value with your Zend Studio machine’s IP. You can just drag this to your bar and edit it to match your setup or just copy the href.

Debug PHP

Install PHP with Extensions Howto

Monday, March 13th, 2006

I decided to write up a post about how to compile & install PHP with support for using extensions to provide all the functionality instead of building everything in. Compiling in everything seems to be pretty common, with the windows PHP install using extensions to enable anything like mysql, pdo, curl, and more.

These instructions will apply to linux or OS X, where OS X has one minor problem which is with “PDO”:http://www.php.net/pdo, therefore if your doing this on OS X, compile PHP with PDO + PDO drivers you need instead of trying to install them as separate extensions.

If you have any comments, thoughts, or questions, feel free to comment or email me(You gotta look for my email :-P ).

*Update:* Soooo apparently majority of the extensions fail to even try to compile on OS X, the makefile isn’t generated properly so nothing compiles so nothing can be installed. I had to build in curl, pdo, and xsl since they failed to build separately. These all worked in debian linux.

(more…)

Lightbox, super cool

Monday, February 27th, 2006

So I just implemented the usage of “Lightbox”:http://www.huddletogether.com/projects/lightbox/ on a work project since I wanted to make a full-image-viewer from clicking on thumbnails but did not want to have to go dig up the javascript for it etc. I then realized lightbox would be perfect since it’s usage on my blog. Lightbox isn’t anything new but it’s damn cool I must say. This just after being psyched about implementing “Ajax-powered drag & drop”:http://php.macsaresexy.com/sort/ on the same project, downside is the drag & drop doesn’t have a non-javascript method yet.

Zend Certified, officially framed!

Monday, February 13th, 2006

So I’m now definitely Zend Certified now that I got my framed certificate, seems kinda silly but kinda cool at the same time.

Check it out:

Dsc03202

Database migrations, ActiveRecord:Migration wannabe

Tuesday, January 24th, 2006

I just recently finished a ‘beta’ version of a ActiveRecord:Migration wannabe database schema migration system in PHP at work. It allows me to version the database schema/structure easily and allow for easy database structure updates when updating an install of a web app on some site. Eventually it could do downgrades like the rails version too but that’s not something I’ll worry about right away. It does function, isn’t as elegant as AR:Migration but it does the job which is pretty cool. It might join PHPFlash class as one of my most useful chunks of code.

Geeked out site with ZCE Logo

Wednesday, December 7th, 2005

I just made a ’sidebar’ plugin for the Typo blog engine to display the ZCE logo stating I’m a Zend Certified Engineer, I couldn’t resist adding it to the site ‘properly’ so I made the plugin with 2 config fields that take the candidate ID and registration ID. Yeah it’s simple and kind of pathetic but wanted to be ‘cool’ and show that I passed :-P

I’m Zend PHP Certified

Wednesday, November 16th, 2005

Yay I passed the Zend PHP Certification exam, wonder when I’ll show up in the directory

p. *Update:* When I do show up in the directory it should be here: “PHP Professionals in Maine”:http://zend.com/store/education/certification/yellow-pages.php?cid=1&sid=ME&submit=search&orderby=ID&form_name=Zend_VUE_Search_Form

PHPFlash - Message Display Class

Wednesday, October 26th, 2005

p. While working on a project at work I made a simple PHP class that I’m sure some people could find useful. A common thing I always have to do is error display, or even notices of something doing what someone expected to do. ‘New user created’, ‘failed to login’, etc. After learning and using Ruby on Rails I wanted their ‘flash’ utility that provides a simple way of posting messages to be displayed on the next page. So if you submit a form, process it, set a message, and redirect, the message will be displayed and only after that one redirect. So if your interested check it out.
See contents for example, index.php when loaded in a web server with PHP 5 will show you how it works and give an example.

p. Requirements: PHP 5 (Standard PHP Library used among other PHP 5 only things)

p. Download PHPFlash-v0.1

Technorati Tags: , , , , ,