Data Center Hub

Internet Data Center and Hosting News and Views

Hosted VOIP PBX or In-house?

Filed under: Internet and Phone — Bill Laakkonen at 12:51 pm on Friday, November 27, 2009

When does it make sense to use a Hosted or managed VOIP PBX systems or build a system in house? If you are new to the concept of a VOIP PBX, here is a nice video which should help you in the process.


Installing Modx on IIS 6, Server 2003

Filed under: Servers — Bill Laakkonen at 3:30 pm on Wednesday, November 4, 2009

I just installed Modx 1.0.0 on IIS 6.0, windows Server 2003 and had a few glitches. I’ve done several 1.0.0 installs under UNIX and they went without a hitch. These are just my notes for reference, not a “how-to”.

Prior to starting the install make sure the assets/cache/ Folder for the site has IUSR_MACHINE permissions or you will get errors like “failed to open stream permission denied” for siteCache.idx.php and the install will fail.

Make sure you enable mbstring (extension=php_mbstring.dll) in your PHP.ini or you will get an error from Ajax Search of call to undefined function, e.g. “Fatal error: Call to undefined function mb_strlen() in C:/directory/assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php on line 1090″. After you make the change, restart IIS and look for mbstring in the output of your PHP info page.

Following is another Ajax Search issue that I have not resolved yet. When you go to a page in the search results, you get:

« MODx Parse Error »MODx encountered the following error while attempting to parse the requested resource:

« PHP Parse Error »

PHP error debug

Error:     preg_replace() [function.preg-replace]: Compilation failed: lookbehind assertion is not fixed length at offset 11

Error type/ Nr.:     Warning – 2

File:     C:\location\manager\includes\document.parser.class.inc.php(746) : eval()’d code

Line:     120

This is repeatable on my CentOS box and now my windows box too. The issue on CentOS is PHP was compiled against a buggy version of PCRE- but- the version used in that web server is held hostage by Parallels and their poorly supported control panel Plesk, which is not upgradable and is not planned to be upgraded for some time yet. On the windows box, updating PHP is a little easier. My info.php shows PHP is compiled with PCRE Library Version 6.6 06-Feb-2006. So the issue is not with Modx or the Ajax Search- it is with the PCRE Library. This should be resolved on windows by upgrading PHP. On the Unix box, I did a workaround and simply turn off the ajax search results highlighting.

Add a “tweetthis” link to any page

Filed under: SEO — Bill Laakkonen at 11:37 am on Tuesday, November 3, 2009

Dave Child at AddedBytes.com created a really cool snippet for Modx 0.9.6.3 called “tweetthis” The tweetthis snippet will return a link to twitter for the user to tweet the current page. The URL is sent through TinyURL automagically and TinyURLs are cached indefinitely to assets/cache/tweetthis.txt. The Link is given the class “tweetthis” so you may apply some styling to it. Here is a link to download tweethis. It also works on Modx 1.0 (for me, at least).

Here’s how to add it to your Modx site:

  1. Login to your manager interface Go to Elements->Manage Elements->Snippets->New Snippet.
  2. Give your new snippet a name of “tweetthis” and copy and paste the text of the snippet file into the snippet code form- don’t forget to keep the PHP open and close tags, choose a category under “Properties” and tick off the “Lock snippet” box
  3. Save your snippet
  4. Open your desired template (e.g blog or default) and add a call to the snippet with your optional parameters.

    &name=`@Shopping_CartIt` Optionally use your Twitter ID by prefixing your ID with an @.

    &text=`Tweet This!` Optional label Text for the link. “Tweet This!” is the default text.

    &id=`5` Optional Document ID. If not specified it defaults to the current document.

  5. Example Snippet Call: [!tweetthis?&name=`Shopping_CartIt`!] Save your template.
  6. If desired, edit your CSS to style the link.
  7. Test your page, apply to additional templates.

Here is a site with the TweetThis snippet installed- try it out. If you’re not using ModX, check it out. I’ve built a dozen sites with it over the last few years and it is a powerful platform for SEO and content management.