brettbrewer.com

Programming + Design

Home
Using the PHP DBG extension with Ioncube Loader
Written by Administrator   
Friday, 08 August 2008

If you just want to know how to load the DBG module with IONCUBE loader, skip to the bottom of this post. 

I hate encoded PHP files. I mean I REEEEEEAAAAALY hate them. Not only does it make it infinitely harder to modify an application that relies on obfuscated PHP files, but it also tends to make it impossible to debug the non-encoded parts of your site, so you end up having to do ridiculous things like diabling all your encoded scripts so you can run a debugger on your own files. What a tragedy for PHP programmers everywhere who have to deal with this BS! Every time I do a project that requires me to work around encoded PHP files, it literally adds hours upon hours to the development time...so much so that I could often have rewritten the encoded funtionality myself from scratch faster than I can code around it (I will actually probably start releasing my own free drop-in replacements for some very popular x-cart mods soon if I can't get the authors to release the source).  My advice as a PHP developer is, steer clear of encoded files whenever possible. If you must use them, put pressure on the developers to release unencoded versions, possibly for an additional fee, or ask them to at least document all the internal functions so you know what the heck is happening inside scripts that your own scripts will need to coexist and sometimes interact with.

Read more...
 
Firebug 1.2 beta released
Written by Administrator   
Wednesday, 25 June 2008
I've been loving the new Firefox 3.0 release, but missing the hell out of Firebug for Javascript debugging. The seemingly offical firebug web site is a bit out of date. The 1.1 beta version download on their homepage doesn't work and they don't list the newest 1.2 beta release for Firefox 3.0. After a brief search I stumbled across the Firebug 1.2.0b3 release which is the current recommended version for use with Firefox 3.
Last Updated ( Wednesday, 25 June 2008 )
 
Admin operating as a user in X-Cart
Written by Administrator   
Wednesday, 28 May 2008

Sometimes in X-Cart you may want to view something as a specific customer would view it. To temporarily access customer pages as a particular user you need only to be logged in as the admin and then pass the variable $HTTP_GET_VARS['operate_as_user'] to the customer page you are trying to view. So you would just add something like this to the querystring of your requested URL....

&operate_as_user=username_to_operate_as

or if you're trying to be all nice and XHTML compliant you'd use:

&operate_as_user=username_to_operate_as

Not an earthshattering bit of info, but useful to know nontheless.  

 
FedEx Package Type for International Addresses in X-Cart
Written by Administrator   
Tuesday, 27 May 2008
I just completed a simple X-Cart mod that will let you specify a different default FedEx package type for international addresses in X-Cart. Normally, when using the FedEx Direct integration method with X-Cart you can only specify a package type for FedEx Express and FedEx Ground service. I ran into a situation with a client who needed to specify FedEx ExpressPak as the package type only for international addresses, so I whipped up this simple mod which you might find helpful...
Last Updated ( Tuesday, 27 May 2008 )
Read more...
 
Why Javascript Arrays Suck
Written by Administrator   
Thursday, 24 April 2008
I've been writing a new AJAX based POS system for a client and lamenting the horrible state of javascript array manipulation which has consumed the bulk of my time. It seems that there is a major problem with trying to iterate over arrays with arbitrary numerical indexes. The problem is, there's no good way to iterate over a javascript array to achieve a typical "foreach" type of loop such as what you would commonly do in PHP. One of the best uses for this is to gain access to the name or number of the index for the array element you are currently iterating over so you can use the array index in some kind of programming logic. To achieve this same functionality in Javascrtip, most people use (for...in) loops to "enumerate" the properties of an array. This works if you have created a "sparse array" that contains only numeric indexes, but the problem is that Javascript library creators (Scriptaculous, Prototype, and many others) modify the Array prototype at runtime and add all sorts of properties that get added to your array and end up being enumerated in your for...in loop. This tends to break the hell out of legacy javascript code that relies on for...in to loop over an array. Not cool. Javascript gurus will tell you this is normal behavior and that's what a for...in loop is for, but lazy programmers like me will tell you this sucks because it makes something that should be extremely simple, extremely difficult. Anyway, this article on DHTML Kitchen explains it better than I do. If you're trying to iterate over a Javascript array like you do your PHP arrays, read the article to see why your life is such hell.
Last Updated ( Thursday, 24 April 2008 )
 
Fixing .NET framework problems when all else fails
Written by Administrator   
Wednesday, 09 April 2008
Microsoft products are quickly becoming famous for showstopping update problems. I just spent 4 hours trying to fix a .NET problem caused by a failed .NET update, which was in turn caused by a Quickbooks update. It's hard to put either company at the top of my "most hated" list when they both really deserve to share the #1 spot. It's also very hard to believe that massive software installation problems with .NET can sometimes only be fixed by downloading a 3rd party program to do a REAL uninstall of all traces of .NET so you can perform a clean reinstall. Microsoft certainly does nothing to make this an easy task. Fortunately for everyone, there IS such a tool from someone name Aaron Stebner. Check out Aaron Stebner's .NET removal tool which quickly and easily removes ALL traces of ALL versions of the .NET frameworks. Mad props to Aaron Stebner for this incredibly necessary tool!
Last Updated ( Wednesday, 09 April 2008 )
 
Spicebird: How I Learned to Stop Worrying About MS Outlook and Uninstalled Office
Written by Administrator   
Tuesday, 08 April 2008
I did something recently that I'm quite proud of. One day a few months ago, MS Word suddenly started refusing to open or save documents, complaining constantly about not being able to write to my Temp directory. After a couple of weekends of fruitless troubleshooting, the problem had spead to MS Outlook, making the situation critical. I was so fed up with trying to troubleshoot my MS Office installation that I finally just uninstalled it all and installed OpenOffice.org as my general MSOffice replacement and Mozilla Spicebird as an Outlook replacement. I'd been casually using OpenOffice.org for a couple of years, so it was no surprise to me that it could easily replace most of my MS Office apps, especially since I don't generally care about using or maintaining any custom formatting in my Word or PowerPoint docs. Spicebird however, has turned out to be a pleasant surprise.
Last Updated ( Wednesday, 09 April 2008 )
Read more...
 
Modifying the httpd.conf file on a WHM/CPanel server
Written by Administrator   
Sunday, 06 April 2008

For those that do not know, the httpd.conf file is that special file on your Apache web server that controls all the fun stuff. It's where you enable modules, set default behaviors for web directories and create your "vhosts" which are the configuration containers that turn your specific web sites on and off. Depending on how your server is set up, you may need to take special things into consideration simply to make edits to this file because some types of servers build this file automagically and will destroy some types of changes. This is apparently true on WHM/CPanel servers. There are certain things you can and can't modify by hand in your Apache httpd.conf file on a WHM/Cpanel based server. The following info applies to Apache 1.3.41 and may not work for Apache2. Some options, such as enabling gzip output compression should be done from the WHM/CPanel apache updater, which will make the necessarry configuration file changes for you after you have recompiled apache with new modules or new PHP options. Sometimes you may need to manually modify the httpd.conf file to customize some things, but if you don't run a few extra commands after you are done, your config changes will be lost the next time apache is recompiled.

Last Updated ( Tuesday, 08 April 2008 )
Read more...
 
<< Start < Prev 1 2 3 4 5 6 Next > End >>

Results 1 - 8 of 44

Search

Who's Online


Brett highly recommends...

Get Your War On: The Definitive Account of the War On Terror 2001-2008

My favorite comic is getting ready to be relased as a single volume. You can preorder now. If you hate the war and love to laugh, do yourself a favor and order this. You can also read all the GYWO comics online for free here.

BBS The Documentary

This is by far the most comprehensive and entertaining documentary I have ever seen regarding the early BBS system. If you're serious about knowing your internet history, or you just want some extra geek-cred, this is your new favorite documentary.

The Nada Chair "BackUp"

The best alternative I have found to overpriced ergonomic office chairs, especially for very low pain around the sacral joint. Works better than my Aeron chair ever did. Also, it comes in navy blue and black, in case you're not into the whole pregnant woman aesthetic (pictured).It's really not meant for sitting on the floor, it's really better for seats that offer poor back support, and works great at sporting events to make sitting in bleachers much more comfortable.

Antec Quiet PC Case

At just under $120 including a 500 Watt power supply, this "quiet pc" case has worked great for me for over 2 years. In fact I now own two great Antec cases/PSUs. For the money, it's hard to beat this combination.

Valid XHTML 1.0 Transitional

© 2008 www.brettbrewer.com

Spam bots check out this page.

Joomla! is Free Software released under the GNU/GPL License.