Web Programming

Contus Magento – Database Tables to Migrate

150 150 rhecht

Moving over to a new Contus website and need to transfer all data to one of their new installations? Here are a few table groups:

Admins: admin_role, admin_rule, admin_user

Catalog Products, entities and more: catalog_ – all tables

Sales: sales_ – all tables

Order Coupon Codes: ordercustomer

Newsletter subscribers: newsletter_ – all tables

Referral/Affiliate System: advert_ – all tables

Customer Information: customer_ – all tables

Caching options: core_cache_option

CMS Pages: cms_page and cms_page_store

CMS Page Blocks: cms_block and cms_block_store


I think that’s all, as far as I know.

Finding the Right CMS Solution

150 150 israelmoskowitz

Finding the right CMS is something that needs to be done right the first time. There is nothing that will be more important to a company than the choice of content management system (CMS). A company director will need to know what the company needs to effectively choose the right software to effectively manage daily business activities. Review some helpful tips below to help a company make its selection.

What Does The Company Need?

A company might understand why they need the perfect content management system, but not understand why or how a CMS can help a business. If a company would like to use tools such as social media integration and multi-language access, then a content management system should allow for this. Other needs a business must think about is if the CMS has the ability to organize all of its content. This should be one of the top factors in comparing content management systems.

Determine the right CMS for a company by looking at its current IT infrastructure. The CMS solution that is chosen must integrate itself seamlessly into the IT infrastructure a company currently uses. Remember that the right CMS solution will have a small learning curve and provide upgrades during the lifetime of the product.

Choosing Based On Price

Here is a helpful tip for a company that needs help with finding the right CMS; do not choose based on price. Our brains have been programmed to believe that the more expensive product is the best product for us. However, this does not apply to CMS solutions. There are a wide range of software in CMS that have mid-range prices. Some of the more expensive products can be “over-stuffed” with different features that most companies will not need or use. It is essential for a company to test products in different price ranges, before choosing the best for the business.

User Interface and Usability

The usability and the user interface of a content management system will be key. It is suggested that a company try demo versions of any CMS solutions they are interested in. Even though the back-end of a product might look great, it is not until employees start using the product that a company will be able to decide if it is a good fit. By using demos, a company can also determine if the product will integrate well into its IT infrastructure. The usability level of a CMS solution can be determined by a variety of factors such as how fast it loads, how easy it is to navigate and the amount of technical support it requires.

Customer Support

The amount of customer or technical support that is required to use a CMS is a good indicator for someone who needs help choosing a CMS solution. If a CMS product requires a company to constantly phone for support, then it will be time-consuming to operate. Remember that a CMS product should also provide customer support when you need it. The last thing a company needs is to experience technical difficulties with a software and not be able to contact the vendor’s technical support department.

HTTP Error 500 Internal Server Error

150 150 rhecht

Hypertext transfer protocol (HTTP) is an application-level protocol that is used to transfer data on the World Wide Web. It works on the request-response model i.e. a client, typically a web browser, makes a request to a server, which is hosting the web application, responds to the client with relevant details.

The first line of the response contains a status code and description. HTTP Error 500 Internal server error is one such error or status message that the server sends when it is unable to retrieve the page or perform an activity that the browser has requested.

Open System Interconnection

Open system interconnection well known as OSI was created by the International Organization of
Standardization (ISO) to define common networking standards and protocols to enable interoperability
between network devices and software. The OSI model for networking comprises 7 layers – physical,
data link, network, transport, session, presentation and application.

Set of Tasks

Each layer has a defined set of tasks that is performed on data packets in order to facilitate data transfer
in the network. Users have access to the application layer via software applications like browsers that
implement the relevant protocol, which in the case of a web browser is the HTTP protocol.

HTTP Language

The HTTP language is quite uncomplicated and uses requests like GET and POST to retrieve information from a server. The server attempts to locate the address, and if it finds the page, it sends data back, and else it will pick one of the standard error codes that it finds suitable, and send it back to the client. The message is simply trapped at the browser and displayed for the viewer.

Categories of Error Messages

Status or error messages are categorized under 5 types. The status codes are typically numeric, and 3 digit long. Codes under 1xx (eg. 100, 101) are informational, i.e. requests have been received and continuing process. 2xx status codes indicate that the requests have been processed successfully. 3xx indicate redirection and that the client is expected to take additional action to complete the request.

4xx codes are error codes – eg. 404 Not found. 5xx is a server error which means the server is unable to proceed with a valid request. Error number 500 is thrown, when the application realizes that the problem is at the server, but is unable to identify the exact reason for its failure.

Such errors are usually logged at the server, and the Web site administrators analyze them to understand what went wrong. Most often, the error 500 is encountered when scripts are malformed or improper, or ini files are found to be missing. Other reasons are the website could be shut down or restarted, authorization credentials at the server are improper, and configurations of the application are

Administrator’s intervention

All these issues require the intervention of the administrator of the website, and nothing much can be done by a user or viewer of the website. The best solution would be to intimate the web master of the problem. If the application has failed while in the middle of an online purchase, it would be advisable to recheck the status of the purchase before attempting it once again.

Generating ASP.NET Images on the Fly

150 150 afischer

ASP.NET is a highly efficient framework by Microsoft, primary used for interactive web and app development. It is quite easy to generate dynamic graphics with the ASP.NET framework even on the fly. With classic ASP (Active Server Pages), on the other hand, it had been a tedious task to produce images. The .NET framework has brought the much-appreciated change.

With classic ASP, programmers had to use third party components such as “ASPPicture” and “ASPImage” to generate dynamic images. The ASP.NET is now extremely helpful in generating images through a few simple steps. Developers can just fabricate lively images via a set of image manipulation capabilities, which are directly embedded to the .NET framework classes.

The Technical Origins Behind the Dynamic Image Manipulation

Microsoft develops and markets the ASP.NET framework for developing dynamic web sites, web apps and services. The Redmond software giant launched the framework in 2002 with version of 1.0 of the .NET framework. The ASP.NET is developed on the Common Language Runtime (CLR). Hence, it is possible for developers to write ASP.NET code with any .NET supported languages. Thus, it is very easy to get dynamic images generated with the ASP.NET framework.

Technical Requirements to Create Images on the Fly

In order to create images on the fly using ASP.NET, the developer is expected to install IIS and the .NET framework on the system. To write the .NET code, applications like Visual Studio.NET or Notepad can be used. Further, the programmer needs to build an ASP.NET page to create a bar chart with three bars. The programmer should select height of the bars to generate a GIF image and to display it on a webpage.

The Process

In brief, the process contains four major steps.

1. The programmer has to create a blank Bitmap object with right dimensions.
2. A bar chart (image) should be drawn on the Bitmap. For this Graphics and information from user can be accepted.
3. The programmer can convert the finished image to GIF format.
4. The GIF can be sent to the output stream and the browser.

The default content-type value of the output will be “text/html.” But, if the programmer wants to output an image, the content-type will need to go like “image/gif.” The most important thing is that after drawing an image, the programmer should save the Bitmap to an output stream. So as to send the image to the browser, the Bitmap should be saved to “HTTP” output stream.

Of course, ASP.NET presents an easy way to create dynamic images on the fly. Developers can instantly manipulate graphics with better results. Many programmers feel that ASP.NET offers lots of performance benefits over other script-based frameworks which includes the previous Classic ASP. The .NET framework is such useful that it can compile the server-side code to several DLL files on the web server. As a whole, ASP.NET is the best way for one to get dynamic images designed instantly.


Valuable Resources:

Generating ASP.NET Images on the Fly – By Sitepoint

How to Open CakePHP Files in Dreamweaver

150 150 rhecht

Thanks to James Fairhurst on this.

I primarily use Adobe Dreamweaver to create and code all of my websites, mainly because of the code highlighting and the way I organise my sites in separate folders. I realise that there are loads of text editors out there but Dreamweaver is what I’m comfortable with and it does the job.

When starting out with CakePHP I quickly found out that Dreamweaver doesn’t open .THTML and .CTP files automatically and I had to do a bit of hunting on the web to get the problem solved. The solution is pretty easy so this is just a quick post to get Dreamweaver opening .THTML and .CTP files.

THTML and CTP Files

Although I’m using CakePHP 1.1 which uses .THTML files I’ll also add the latest .CTP files which CakePHP 1.2 use. This is just saving time and when I do cross over and start using version 1.2 I don’t have to fiddle around with Dreamweaver again.

Modifying the Necessary Dreamweaver files

There are ultimately 3 files that you need to edit. The first two are located in the folder that you installed Dreamweaver, in my case this is “C:Program FilesAdobeAdobe Dreamweaver CS3configuration” although I’m using the latest version of Dreamweaver previous versions also have a “configuration” folder so go there.

Open up “Extensions.txt” and on the first line at the very end add THTML and CTP separated by commas, so the line should read:


Similarly add these two extensions to the “:PHP Files” line.


Next open the “DocumentTypes” folder and edit the “MMDocumentTypes.xml” file, just open it up using notepad or wordpad. Search for the line which has an id “PHP_MySQL” and add the THTML/CTP file extensions to both the “winfileextension” and “macfileextension” so the line should read:



The final file is another version of the “Extensions.txt” which is located in your “Documents and Settings” Folder in my case this is “C:Documents and SettingsJamesApplication DataAdobeDreamweaver 9Configuration” just add the very same things you inserted earlier.

Wrapping Up

Restart Dreamweaver and you should now be able to open up and edit .THTML and .CTP files with everything nicely colour coded. A short post but a needed one for those who use Dreamweaver.

Drupal – Restore Your Password for 6 and 7

150 150 rhecht

“Help!!! I need the admin password for a Drupal site!!!” Some people who get a Drupal site to test from their end don’t get password access. Here are a couple of ways to change a password.

Drupal 6 and 7

Update the email field for the admin user (user 1) in the “users” table. Unlike the password field, you can directly edit the email field without consequence. Once you’ve updated your email address for the admin user, simply go to the request password page to have your password emailed to your email address.

Drupal 6

source: (http://drupal.org/node/44164)

Since Drupal 6 and under is MD5 hash encoded, all you need to do is to execute the following query with direct database access:

UPDATE `users` SET pass = MD5(‘newpwd’) WHERE uid=1;

Drupal 7

1. source: (http://drupal.org/node/1023428)

Execute the following commands from the commandline, in the Drupal root directory:

./scripts/password-hash.sh newpwd or for Windows:

php .scriptspassword-hash.sh newpwd Of course, change “newpwd” to the desired password. If the password contains special characters such as a space, * or ? you must escape them, or wrap the password in quotes appropriate for the shell used.

The script will output a password hash that is valid for the site. Copy this to the clipboard or write it down somewhere; you’ll need it for the next step. Be careful not to include more or less characters as the hash. These hashes look somewhat like $S$CTo9G7Lx28rzCfpn4WB2hUlknDKv6QTqHaf82WLbhPT2K5TzKzML

Then execute the following query on the Drupal database:

UPDATE users SET pass =’thepasswordhash’ WHERE uid = 1; To execute this query it will be necessary to login to the database. This is typically done through the command line or through a GUI interface such as phpMyAdmin.

2. The user_hash_password() function, which, as its name suggests, generates a hash of your supplied string (this time using SHA512 and a salt). The output of this function is what should be used as the new password in the users table. For example, user_hash_password(123); returns $P$CD6Nf2aDgnBZZElo/teVOO2.h6sNT9/ as the hash. Replace the existing hash value in the database with this new hash (of a known string!) and you’re good to go!

3. Simplest way: Use the following Hash:


This is the hash code for the password (case sensitive – all uppercase letters):


That’s it!

Rent a CMS Powered Website for Cheap With Website Tenants

150 150 rhecht

Oh, the drama. The headache. The way that a website project that starts off so well goes to hell in a flash because the consultant you hired half-finished your website and never returned. Once the consultant does get back to you, he demands more money out of you that you simply don’t have, since you’re paying for everything else on top. Sounds familiar?

Well, worry no more! Website Tenants does all the hard work for you! Website Tenants provides low-cost CMS powered website solutions for your small business, non-profit, or hobby site. They provide full email support, custom design, and plugins support.

Website Tenants provides 30 free design themes to choose from, as well as a suite of default plugins to make your website configurable and user-friendly. It brings users into the user-friendly and intuitive WordPress Content Management system to have them build their own SEO-friendly websites within minutes. Everything is scalable and easy to use.

Want to learn more? Visit Website Tenants today!

4 Different “Web Guy” Roles

150 150 rhecht

What is a “web guy?” This is a loaded question that I get all-too-many times.

After hearing other small business owners’ frustrations about one designer not knowing Javascript for website purposes, and a web programmer not knowing how to use Flash, I decided that it was necessary to lay out some different “web guy” roles so one knows what to realistically expect when hiring “the right person” for the job. No one in this world knows everything, get used to it.

1.       Graphic Designer

  • Knows Adobe Photoshop, InDesign and Flash cold.
  • Focus is more on Print than on Web.
  • Very basic level of HTML and CSS.

2.       Web Designer

  • Knows Adobe Photoshop, InDesign and Flash enough to create a decent looking website on the client side.
  • Knows Javascript and CSS in addition to advanced HTML knowledge.

3.       Web Programmer

  • Focuses on server-side and “back-end” coding with database knowledge.
  • Knows PHP/ASP/ASP.net/Java (not Javascript), with database knowledge like MySQL, SQL Server, and/or Oracle.
  • The web programmer generally doesn’t know, nor cares to know, Flash, and has a basic understanding of Photoshop.

4.       UI (User Interface – for Web Applications) Web Developer

  • Can create themes and/or plugins for web applications like WordPress, Joomla, and Magento.
  • Can create themes for frameworks like CodeIgniter and CakePHP.
  • A significant amount of knowledge of either PHP and/or ASP.net and the applications’ classes and functions is essential.

I feel that it’s necessary to define some of these roles since I’m constantly asked why someone knows this and not that. There are many more roles, but this is for starters.help.

DHTML Dropdown Over Flash Issue: Hiding Behind

150 150 rhecht

Solution for a DropDown Menu hiding behind Flash:

<param name=wmode value=”transparent”>

Also, don’t forget the embed tag for netscape (although who uses it anymore), “transparent.”

How to View Your Website Mobile Theme On Your Desktop Browser

150 150 rhecht

This is how to view your website mobile theme on your desktop browser. This in essence will make the website “think” you’re using a mobile browser to view the site.

It’s a very simple Firefox plugin called the User Agent Switcher.

After installing the plugin and restarting your Firefox, go to “Tools -> Default User Agent -> iPhone”.

To add more agents, like the Android agent to the list, go to “Tools -> Default User Agent -> Edit User Agents”.

Click the “New -> New User Agent” button and enter the following:

Description: Android
User AgentMozilla/5.0 (Linux; U; Android 2.2; en-gb; Nexus One Build/FRF50)
AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1

The remaining entries you can keep them at default value.

(For iPad, the user agent is Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10)