Scriptplayground Network

Archive for July, 2008

by mkeefe on Jul 29th, 2008

Lightroom 2 - Now Available

I was just informed that Lightroom 2 has been released. I read about this version a while back and of course played with the beta while on various outings. Version 2 really packs a wide array of new features, fixes and UI improvements. You can read more about the features and changes on the Lightroom blog.

Colin of PhotoshopCafe has released a new Lightroom 2 DVD that will walk you through the changes, as well as teach you some really awesome concepts and tricks. I highly recommend it.

by mkeefe on Jul 13th, 2008

iPhone 3g.. no, getting Bold

Blackberry Bold

After looking at the “updated” iPhone that was just released it just didn’t do it for me. The 3G is nice, but the new plan and contract is not. The battery life is even lower on 3G and from testing the apps while on the road on the iPhone this weekend they just suck that battery away.

So basically I am skipping iPhone 3G, installed 2.0 on my current iPhone and that will be good enough.

However I will be buying a Blackberry Bold (coming soon). After looking at the tech specs which includes WIFI I was sold. The removable battery and externally accessible memory card just sealed the deal.

If you don’t have an iPhone at the moment I do still highly recommend it.. its an amazing piece of hardware. Just the new one doesn’t bring enough “newness” to blow good pricing and terms I have now.

by mkeefe on Jul 10th, 2008

Putting a lock on the twitter timeline

Since I have gotten something like 30 spam requests and emails about things I have twittered (from random people), I have decided to follow the others and lock my timeline. It was also because my “tweets” appear in various searches/feeds.

In other twitter news, they upped the API call limit and just in time for things like “Twitterific (iTunes link)“, now available at the Apple App Store.. so now I can update you all on my random comments/thoughts while on the road.

If for some reason you have to hear what I’m talking about, please feel free to send a request.

Update: I also privatized my social network profiles for the same reason.

by mkeefe on Jul 3rd, 2008

When semi-random bugs attack

I have been working on a large Flex project for a while now which has been a ton of fun. The core of the application is built in Flex with a class to manage remote calling to PHP files. This is basically how the data comes and goes through the application.

While testing and developing it locally I continuously ran small tests to ensure all the data was working properly and everything was. I decide to upload a build to my online environment for the client to check out and all of a sudden the Remoting classes were returning the same error:

Client.Error.DeliveryInDoubt
Message: Channel disconnected
Detail: Channel disconnected before an acknowledgement was received

This is usually caused by a syntax error in the PHP, but it worked locally.

Charles to the rescue (again)
I opened up Charles and started looking at the response from PHP, to which I found the following:

Fatal error: Uncaught exception 'VerboseException' with message 'file_exists(): open_basedir restriction in effect. File(/models/Debug.php) is not within the allowed path(s): (/tmp)' in /PATH_REMOVED/amfphp/core/amf/io/AMFBaseDeserializer.php:380

That is saying the file can’t be loaded from the root of the server.. well obviously, but the question is, why is AMFPHP looking for it there at all?

After talking to some friends and looking around the AMFPHP files I came across a function within the “globals.php” file.

setClassMappingsPath();

This allows you to set the path, which I did, but for some reason it was still failing. After some more time spent troubleshooting I found the function definition which can be found in “amfphp/core/amf/app/Gateway.php”.

function setClassMappingsPath($value) {
$path = realpath($value . '/') . '/';
$GLOBALS['amfphp']['customMappingsPath'] = $path;
};

The realpath() function seems to be the culprit. I am not saying this is an AMFPHP error, it could be a configuration error on this web server, which I will investigate further once the project is complete.

All I did to fix the error was comment out the realpath() check and set $path = $value. That stopped the incorrect loading of the class files and “magically” my Flex application started working properly once again.

When Errors are Good
The errors in this case were not all that helpful at first, but after looking into the code they really did paint a picture. The “Delivery in doubt” error that Flex throws will prove to be your best friend if you wind up with syntax or file errors within PHP.