The time has come for many of our long-term customers to be migrated to our newest hardware! Luckily all of our clients on cp1-cp5 will be migrated by our team to a new virtual environment platform for free along with new IP addresses. These environments are being created to provide stronger and better server performance allowing your site to keep moving forward.
The new virtual environment platforms will provide you the following server configurations:
CentOS release 5.11 (Final)(x86_64)
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
MySQL - 5.1.68
Sadly, this means that several of the features of your current server will no longer be available. These features are being left out because of each one has reached the end of life with their original developer and have become a security risk for your server.
Note: Please remember that our team will migrate your content for you for free but are not responsible for updating any applications on your website. If you choose to not update your web development content to work with the new applications, your content may not load correctly or appear broken.
2. PHP Differences
PHP is a server-side scripting language that is used in website development. PHP4 and PHP5 are two different versions of PHP. PHP4 was first released in May of 2000. PHP5 was later released in 2004 and came powered by the Zend Engine II that is considered by the development community as an improvement over PHP4.
After various versions of PHP4, the last version titled PHP4.4.9 released in August of 2008. After the last release, it was announced that PHP4 would not longer be developed, including future security updates for the language.
With the lack of support for PHP4, many new servers are no longer supporting php4 and developers are having to make changes to their websites to support PHP5 instead of PHP4.
Here is a list of the major differences that you will notice between PHP4 and PHP5:
- Register_globals and safe mode have been removed from PHP5 because of their ability to open security holes by allowing runtime data injection.
- PHP5 uses Zend Engine II
- Magic quotes as been replaced with the addslashes() function.
- PHP5 is object oriented replacing the more procedure ordinated language of PHP4.
- In PHP5 can declare abstract classes.
- PHP5 uses static methods and properties.
- PHP5 incorporated a special function called __autoload()
- In PHP5, one can declare a class or method as Final.
- PHP5 added several magic methods such as __call, __get, __set and __toString.
- In PHP5 contains 3 levels of visibilities, Public, private and protected.
- PHP5 introduced exceptions.
- In PHP4, everything was passed by value, including objects. Whereas
- PHP5, all objects are passed by reference.
- PHP5 added interfaces with all methods defined in an interface must be public.
- PHP5 included new error level defined as ‘E_STRICT’
- PHP5 added new default extensions such as SimpleXML, DOM and XSL, PDO, and Hash.
- PHP5 added new reserved keywords.
- Additional OOP concepts have been added to PHP5 compared to PHP4.
- PHP5 adds a reduced consumption of RAM.
- Increased security against exploitation of vulnerabilities in PHP scripts.
- MySQLi added for developers using MySQL 4.1 and later. Also bundled with PHP5 is SQLite.
- PHP5 added the SOAP extension for interoperability with Web Services.
- The SimpleXML extension has been added to PHP5. SimpleXML is used to access and manipulate XML as PHP objects.
- Streams have improved inside PHP5 and now includes the ability to access low-level socket operations on streams.
Please beware that if you decide not to update your PHP5 and remain with PHP4, your website may not load correctly or appear down on the current generation of servers.
3. MySQL Differences
New updates in MySQL 5.1 applications, such as WordPress, Joomla, and other Content Management Systems, are requiring developers to move away from MySQL 4.1. With the move away from MySQL 4.1, it is best to have an understanding of what 5.1 offers you as a developer. Several new features of MySQL 5.1 provide a stronger and more secure database compared to MySQL 4.1. The following sections go over several of the new features provided to you in MySQL 5.1 and some other things to consider when upgrading to MySQL5.1.
Upgrading to MySQL 5 from MySQL 4
MySQL 5 is considered more reliable than MySQL 4 and is compatible with the majority of third-party applications currently in use. When using MySQL 5, older database utilities and scripts designed to run on MySQL 4 may not work correctly after you have upgraded to MySQL 5. Our team highly recommends that after you complete your upgrade to MySQL 5, you immediately review your entire site and all functionality carefully after the upgrade is complete. For developers who have written scripts designed to run on MySQL, please review your code carefully before upgrading to anticipate any issues you may face with MySQL 5.
Please be aware that the majority of problems faced during the MySQL database upgrade is caused by the collation, charset encoding, and syntax of the database. We recommend that you refer to your software manual (Drupal/Wordpress etc.) since they typically have the suggested steps to resolve these issues before they happen.
Here are some of the new features in MySQL5.1:
Partitioning was an innovation in MySQL 5.1 that allows better control over how tables are physically stored. With partitioning, tables can be distributed across a filesystem and into multiple partitions.
MySQL 5.1 introduced a new plugin API. This API enabled components to be loaded and unloaded while the server is running. The plugin API uses the INSTALL PLUGIN and UNINSTALL PLUGIN statements allowing it to be a reliable replacement for the older user-defined function interface.
With the upgrade to MySQL 5.1.4, the community was introduced to MySQL slap. Mysqlslap is a load emulator that runs like any of the other MySQL binaries but has been designed to emulate the load on a server, and provide feedback on the timing of each stage.
MySQL 5.1 provided new backup changes allowing users to use MySQL dump. Mysqldump allows the dumping of tablespaces.
One of the more exciting additions in MySQL 5.1 is the addition of event scheduler. Event scheduler allows you to create and run SQL statements at a particular time or other set intervals.
MySQL 5.1 provided some new tables allowing better metadata to be retrieved. These tables included ENGINES, FILES, EVENTS, PARTITIONS, PLUGINS, and PROCESSLIST. This useful information can be queried, and searched quickly inside the database.
MySQL 5.1 also added a number of XML functions. The ExtractValue() function provides XML information according to an XPath expression. UpdateXML() allows you to find and replace some of the XML information.
Note: Please remember that if you choose not to update your content and database to run on the MySQL 5.1 your website and content may not load correctly or appear down.
4. ColdFusion Changes
The process of moving applications from ColdFusion 5 or earlier releases (ColdFusion 4.5, ColdFusion 4, etc.) to ColdFusion 7 is complicated because ColdFusion 5 to ColdFusion 7 is not a compatible upgrade. ColdFusion 5 was built relying on C++ while Adobe changed ColdFusion 7 to no longer use C++ but to rely on Java instead.
You can migrate your ColdFusion applications from ColdFusion 5 to ColdFusion 7. However, please remember, unlike the valid upgrade paths available for moving from ColdFusion MX 6.x to MX 7.x, migrating from ColdFusion 5 to ColdFusion 7 does not allow for automated migration of your ColdFusion settings. All information regarding data sources, mappings, custom tag paths, and others must be migrated from ColdFusion 5 manually.
Known Differences in ColdFusion 5 and ColdFusion 7
Double-byte character storage in SQL Server
|Storing double-byte data in an SQL Server database that is not setup in Unicode in nchar, nvarchar, or ntext data types, you will need to convert your data to Unicode encoding.
||In CF 7, the cferror variable structure has changed. cfdump of the error variables (<cfdump var=#error#>), will show a single-level array in ColdFusion 5, ColdFusion 7 shows a multilevel array. To access individual error variables in ColdFusion 7, you must use additional array values. In ColdFusion 7 you can use <cfdump> to see all of the values.
|Variables with more than 3 dots in name
||In ColdFusion 5 you could have a variable with more than 3 dots in its name similar to this example:<cfset a.b.c.d.e = “foo”> <cfoutput> “#a.b.c.d.e#” </cfoutput> In ColdFusion 7 these variables will fail and provide the error:Element B.C.D.E is undefined in A The error happens because the new structure in CF 7 auto-creation functionality fails to create structures that are more than 3 levels deep. In CF 7 any variable with less than or equal to 3 dots in its name should work without issue.
||In ColdFusion 7, binary strings are represented as byte arrays, allowing you to manipulate them using standard CFML array logic. This is different from ColdFusion 5 where binary values are immutable.
|Columns with the same name
||In ColdFusion, when two columns that have the same name is returned from the database, the column choice selected for the result inside ColdFusion is undefined. Theoretically, the results provided by ColdFusion are random, however, in practice, you can predict the column selection in earlier versions of ColdFusion 5. In ColdFusion 7 you can no longer rely on a predictable range of identically-named columns; instead, you will have to use column aliases to remove all uncertainty.
|Duplicate URL parameters
||ColdFusion 7 handles duplicate URL parameters differently than ColdFusion 5. In ColdFusion 5, you had the ability to call Test.cfm?a=1&a=2 returns the value a=2 for the URL. Inside ColdFusion 7, the same call will return the value a=1,2.
|Reserved words in ColdFusion MX
||Currently in ColdFusion 7, you can create a variable with the same name as a scope. The variable is only visible if the Variables scope prefix is used explicitly. If a variable is not used, you will receive an error. However, scope names are reserved in ColdFusion 7, but Macromedia recommends that you do not use a scope name as the variable name. Also, if you are attempting to run a Query of Queries, you can no longer use SQL reserved words as a variable or as a column names unless you are using brackets ; for example, SELECT [count] FROM MYTABLE.
||Inside CF 5, all scheduler information is stored in the registry. Every registry key contain a name without spaces (EndDate). In ColdFusion 7, all scheduler information is stored in an XML file. Another change involves the registry keys. All compound variable names are separated using underscores (End_Date). Remember that this will only affect applications that use the scheduler information in the CF 5 registry.
|Use operating system logging facilities option in the ColdFusion Administrator
||Inside the ColdFusion Administrator panel you no longer have an option to Use operating system logging facilities, because ColdFusion 7 always uses the Windows logging services.
||If you added cfusion\bin or cfusion\verity\_nti40\bin to your system path for ColdFusion 5, it would have to be removed before upgrading to ColdFusion 7 for it to find the correct Verity DLL files.
|Literal values in COM methods
||In ColdFusion 5, you had the ability to use a literal value when calling a Component Object Model (COM) method. ColdFusion 7 has a stricter rule on how variables can be passed to COM objects, and no longer support literal value. Instead, now CF 7 uses a method argument that is passed by reference, forcing you to use a variable as the argument in your code.
|Japanese version, sort functions
||The ability to sort functions such as ListSort() and ArraySort() return items in a slightly different order in ColdFusion 7 than they do in ColdFusion 5. CF 7 now sorts characters by their Unicode char number, instead of CF 5 which sorts characters by their shift_jis char name.
||Inside ColdFusion 7, LsIsDate(“3-1-2002″) returns No, whereas in CF 5 it will return Yes. The LSIsDate function only accepts the hyphen character (-) as a date delimiter in the Dutch(Standard) and Portuguese(Standard) locales.
||If an invalid mask is passed through one or more of these functions, the function outputs the invalid characters in CF 5 and CF 7. However, CF 5 delimits each character of the output with an apostrophe (‘) character.
||ParameterExists() is deprecated in ColdFusion 7 you will have to use IsDefined() instead.
||When action=list is used, the cfdirectory will only report the ReadOnly and Hidden attributes. If additional information is needed it is recommended to use cfexecute.
||Gaining access to your status code header for a page that used the cfheader statusCodeattribute, you will have to use<cfdump var=”#cfhttp#”> or <cfdump var=”#cfhttp.statuscode#”>.Do not use<cfdump var=”#cfhttp.responseheader#”>.
The cfloop tag no longer returns struct keys in alphabetical order as it did in ColdFusion 5. ColdFusion 7 returns struct keys in no particular order.
Upgrading to ColdFusion 7
In 2005, Adobe understanding the massive change in their ColdFusion software, created a 60-page white paper called Migrating Applications to ColdFusion MX 7 to assist users in making the move to MX 7.
Please be aware that if you decide not to work through the Adobe migration resource guide, your website will not function on ColdFusion 7 and will appear down or broken.
5. ISAPI Rewrite Alternatives
If you are reading this article, you probably used to have or need some URL rewriting (for example clean SEO-friendly URLs or non-www to www rewrite) set up on your website. On IIS servers, this is mainly set up through ISAPI Rewrite service. However, our new control panels’ configuration does not allow ISAPI Rewrite to be installed and enabled since it conflicts with the hsphere control panel. The following information provided are possible alternatives to using URL rewriting on your IIS server.
Intelligencia Url Rewriter
Intelligencia Url Rewriter is an open source ASP.NET library that allows you to rewrite websites by adding rewrite rules into your web.config file.
Sadly, the official website for the product is no longer available, but a workaround has been described in this article. Also, to make your life easier Intelligencia.UrlRewriter.dll can be found at by visiting github.com.
Helicon Ape is a commercial library that allows you to purchase a single-site license that allows it to be installed in the same way as URL Rewriter*.
Note: Please understand that URL rewriter and Helicon Ape only work for ASP.NET. If you are trying to make either of them work for your entire site, you will need to add wildcard extension mapping to aspnet_isapi.dll with the "Check that file exists" option unchecked.
Switching to Linux Server
Built into all Linux servers is the Apache module mod_rewrite. If you are on an IIS server, but your applications only use PHP and mySQL (no Windows specific technologies ASP, ASP.NET, MSSQL etc.), it is recommended to move to a Linux server allowing for ease of use in configuring website rewrite rules using the .htaccess file.
6. Setting Up a Virtual Folder in IIS6
What is a Virtual/Application Folder?
A virtual directory is a directory name (also referred to as “path”) that you specify inside IIS to map to a physical directory on a server. Think of it as a pointer to where the files are. In other words, if you want to use, for example, ASP.NET scripts from a subfolder of your domain, you need to configure this subfolder as a virtual folder.
You may even specify a name for the virtual directory different from the physical directory, so it is more difficult for users to discover the actual physical file structure on your server because the URL does not map directly to the root of the site.
How to setup Virtual Folders /Directories
The new control panels (cp6-cp10) allow users to set up an application/virtual folder for ASP.NET applications on the server through a set of operations in Web Options of the domain. Please use the following step-by-step instructions to assist you in setting up a virtual folder:
- Open the “Domains” section of your control panel.
- Select the domain name in question.
- Find “Web Service” and click the “Edit” button.
- Find “Web Directories Settings” and click the “Edit” button.
- Click the “Add” button.
- Web directory name → Dir name.
- Web directory path relative to the user home → domainname\dir_name.
- Click on “Submit.”
- Verify that Web Application is turned to the “On” position.
It is required to enable language support for every application separately. Here is an example to enable ASPNET:
Web Directories and Web Applications → Web application -dir_name → Go → ASPNET → On.
Note: ASP scripts will not work in any application directory since ASP mapping is not installed and cannot be added to the control panel in any way. This can be added manually by our System Administrators, but the best solution is to split ASP and ASP.NET-driven pages and do not use .ASP in application directories.
7. ASP Upload Options
Currently, our servers offer the following ASP components installed on our Windows servers. These components can be used to upload files to your web server using ASP scripts. Below is a breakdown of the provided ASP components offered on our servers.
Current ASP components available
Remember that these ASP components are free for you to use for your web development needs. We also understand that sometimes you may need a different ASP component than is not currently on your server. In this case, please contact our support department with your request. Our team will review your application and how it may affect our shared hosting services for other customers and will inform you if it is possible to install the requested component to your server.
8. CDONT vs CDOSYS
As server technology advances, web developers gain access to better tools. This progress also means that as some components age, they become obsolete and are no longer supported. An example of this on Windows servers is CDONTS. Web developers primarily use CDONTS as a thin client for mailing web forms.
Microsoft already discontinued CDONTS on Windows 2000, Windows XP and Windows 2003 servers. Microsoft also recommends that any scripts using CDONTS be updated using the newer CDOSYS technology or JMAIL.
CDOSYS is the successor of CDONTS, an easy way to send emails from webpages. To test CDOSYS functionality, use the following code saved into a file with an .asp extension. CDOSYS is a built-in component in ASP, so using it from your ASP code takes no additional effort on your part:
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1"
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
Set objCDOSYSMail.Configuration = objCDOSYSCon
objCDOSYSMail.From = "firstname.lastname@example.org"
objCDOSYSMail.To = "email@example.com"
objCDOSYSMail.Subject = "This is my subject for my test message"
objCDOSYSMail.HTMLBody = "This is the body "
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
Your SMTP server information should always be “127.0.0.1″ or “localhost”. Default SMTP port is 25. If you are having issues sending out using port 25, port 587 can be used as an alternative.
More information on exactly how CDOSYS functions can be found on Microsoft’s website or at w3Schools.com.
As an alternative to CDOSYS, you may use JMAIL. Below you can find the code that you need to save with a .asp extension:
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "127.0.0.1"
JMail.Sender = "firstname.lastname@example.org"
JMail.Subject = "Contact Email"
JMail.ContentType = "text/html"
JMail.Body = Text
JMail.Priority = 1
Just as always SMTP server is “127.0.01″ or “localhost”. Default SMTP port is 25, but port 587 can be used as well.
Note: Please remember that if CDONTS scripts are not updated to either CDOSYS or JMAIL your pages may not work correctly or appear down.