New Railo and Mura installer for the Microsoft Web Platform

Railo 6 Comments »

 

Some weeks back I was talking with HeliconTech after they kindly donated a license for their Helicon APE product for use on cfmldeveloper.com my free CFML developer hosting community. And the topic of Railo came up as they noticed I also support Railo on cfmldeveloper, and they were telling me how they like to support niche technologies like this on Windows/IIS and were looking to add some new Java solutions, so we started discussing the requirements of a new Helicon ZOO module for Railo and what it lacked on the IIS platform. 
I explained to them how ColdFusion worked out of the box and the disadvantage of Railo requiring all the extra manual config of a Jakarta vDir, isapi Plugins, handler mappings and virtual hosts in the Servlet engine in order to make it work, and how a simpler ColdFusion like solution was needed, ideally using the Microsoft Web Platform Installer
They also asked for a popular open source app that they could also build an installer for and bundle with Railo, so I suggested Mura CMS.

After only 1 month and a few more email exchanges, I am excited to announce that HeliconTech have already completed the new Installer module for both Railo and MuraCMS and added them to the Web Platform Installer, now that is fast work I must say, I was impressed..... cont...


 

Read more...

CFMail automatic respooler

ColdFusion , Projects No Comments »

When ColdFusion mail fails to deliver it will sit in the undelivr folder forever unless someone copies it back to the spool folder for another try. Mail that is actually invalid will just keep ending up back in the undelivr folder forever unless someone deletes it.

I am quite surprised Adobe have still not addressed this, especially considering they added a new feature to CF9 allowing you to view and manually respool failed mail, which is ok if you only have a few emails, but as it only displays like like 10 emails at a time, it is useless on a server that processes hundreds of thousands of emails per day.

Up till now I used a little VB script and a windows scheduled task to handle this, but I decided it was time for a CF solution that I could easily just plugin into the cfadmin.

So here it is, a custom extension for your ColdFusion administrator which allows you to specify how often you want to respool your undelivered mail and how long you want to keep trying for, after the retry limit is reached the undelivered mail will just get deleted.

FYI Railo retries sending mails by default.

respooler

DOWNLOAD HERE

readme.txt file in the download contains installation instructions.

I may also add the option to send a failure notice to the sender for failed mails that get deleted.

If you want the ability to manually view/edit failed mail and send back to the spool then try Ray Camdens Spoolmail.

Change log

1.0.1  - 01/01/2012

Added logging with CFLOG
Added ability to edit/save scheduled task url

Mangoblog on Railo

Railo 7 Comments »

I have just migrated this blog from Coldfusion to Railo today and thought I would share the process for anyone else who needs to get MangoBlog workign with railo.

Initially I thought it had all worked without a hitch, but then I found a couple of things broke. None of the links worked anymore as Railo (or rather Tomcat) does not support search engine friendly urls out of the box.
In order to get the SEO urls to work you need to make some changes to the c:\railo\tomcat\conf\web.xml and insert the following in the servlet mappings section.

<servlet-mapping>
<servlet-name>GlobalCFMLServlet</servlet-name>
<url-pattern>/page.cfm/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GlobalCFMLServlet</servlet-name>
<url-pattern>/post.cfm/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GlobalCFMLServlet</servlet-name>
<url-pattern>/archives.cfm/*</url-pattern>
</servlet-mapping>

Then restart tomcat and all should be good. If you have any app that has something.cfm/other stuff then you will need to do the above with any other filenames as well.
I did try using the following

<servlet-mapping>
<servlet-name>GlobalCFMLServlet</servlet-name>
<url-pattern>/*.cfm/*</url-pattern>
</servlet-mapping>

but sadly it doesn't work.

This is one of things that sucks with Railo, there is a lot of tweaking and manual config to get it to do all the things that ColdFusion just does out of the box.

One other thing that I found during this migration is that the caller scope does not work properly in Railo, if you are trying to use caller scope to set variables in other scopes it simply does not work.

For example, say you have the following code in a custom tag called mytag.cfm

<cfset Caller[Attributes.returnVar] = foo>
and you called the tag as follows
<cf_mytag returnvar="request.foo">
or
<cf_mytag returnvar="local.foo">
or
<cf_mytag returnvar="someStruct.foo">

it simply doesn't create the variable, this however works fine with Coldfusion.

In or order to fix this I had to use a simple variable

<cf_mytag returnvar="foo">

This was the only format that worked,

Plugin updates fail on wordpress and other PHP apps resulting in locked files.

WEBBY STUFF , Windows 2008 Server No Comments »

If you are running windows 2008 server with IIS 7 then you may have noticed a problem with your PHP apps such as Wordpress or Joomla when you try to perform updates.

The problem occurs when the old files are deleted, the delete fails to complete leaving the files/folders in a locked state and you are then unable to do anything with them at all.

this problem has been plaguing me fore a few months and solution has been to use a file unlocker tool to release the lock.

I have recently found the cause for this to be the Wincache extension for PHP, you can find more details and a fix HERE.

Windows Live Writer "blogger.getUserBlogs" error

WEBBY STUFF No Comments »

I run numerous blogs, one of which is Wordpress, and I prefer to post to them using Windows Live Writer.

However after a recent update to Wordpress I found I could no longer post with Live Writer or even connect at all in any way, I would get the following error.

 

the response to the blogger.getUsersBlogs method received from the blog server was invalid

I spent ages Googling for a solution to no avail, but the general consensus is that the problem is caused by an extraneous space or newline in one of the PHP files outside of the <?PHP> tags. I searched all of the suggested files to no avail. So I decided to try and work out the cause myself.

I use a tool called Fiddler to monitor HTTP traffic to and from my computer, so I used this to look at the request and response going from Live Writer to Wordpress.

So with fiddler running I tried to update my account settings, this returns the entire HTML of the entire blog, so is not helpful in determining the cause of the problem, next I tried making a post instead, this returned something more useful and showed me the cause of the problem. To do this yourself, try to post to your blog and then check the result in fiddler in the Inspectors/TextView tabs.

Here is the response that came back from wordpress.

 

<?xml version="1.0"?>
<methodResponse>
 <params>
 <param>
 <value>
 <array><data>
 <value><struct>
 <member><name>isAdmin</name><value><boolean>1</boolean></value></member>
 <member><name>url</name><value><string>http://blog.bluethunder.co/</string></value></member>
 <member><name>blogid</name><value><string>1</string></value></member>
 <member><name>blogName</name><value><string>BlueThunder Blog</string></value></member>
 <member><name>xmlrpc</name><value><string>http://blog.bluethunder.co/xmlrpc.php</string></value></member>
 </struct></value>
 </data></array>
 </value>
 </param>
 </params>
</methodRespons

 

As you can see the final tag is not closed properly, it is missing 2 characters "e>".

So it would appear that indeed some extraneous characters are indeed being added somewhere which means that the content is not matching the content length, so I decided to see if there was anyway I hack a fix for this as finding these extraneous characters was clearly impossible.

After a lot of searching I finally found a solution.

In the wp-includes folder there is a file called class-IXR.php, and around line 472 you will find the following code which sets the content length.

image

now as the content is 2 characters shorter than it should be, we want to add 2 to this by changing the highlighted line like so.

 

header('Content-Length: '.$length+2);


If your content is missing more than 2 characters then add the appropriate value.

Voila, my Live Writer is now able to post to Wordpress again.

Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds