Scriptplayground Network

Archive for the 'Randomness' Category

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.

by mkeefe on Jun 18th, 2008

Digital Hollywood needs a designer

After looking at digital Hollywood’s web site I quickly realized they need a designer, and quick. For an organization that is about digital content, they cleary missed the meeting on usability and overall presentation.

Its not even mediocre, it just downright sucks.. sorry to say, but its true. See for yourself.

The concept behind the events are interesting, but if this is the presentation layer, it really scares me as to what the training/sessions will contain.

This is a paramount example of putting your best in anything you do, web site for event included.

by mkeefe on May 13th, 2008

Buy a house for $100 and an essay

Update: The contest has been cancelled due to legal restrictions, you can read more on the contests web site.

The $100 house contest is both interesting and sad. Not sad because of the idea, but clear proof at just how screwed this economy is and how it is affecting the housing market.

You can check it out here:
http://100housecontest.com/

.. as well as Digg it:
http://digg.com/travel_places/Sell_my_home_for_100_and_an_essay

by mkeefe on Apr 28th, 2008

Miley Cyrus Vanity Fair Photo Shoot Upset

I am sure at this point you have read about the recent Vanity Fair photo shoot that had Miley topless (but covered by a sheet)? If not, look on Google or You Tube because its not important at this point.

My main issue with this “news” if you could call it that, is the photographer is the one getting the blame here. Granted she set up the shot and maybe even had the original idea, but I actually blame her dad.. and no, not because of who he is, but more importantly because he was there. In fact I can’t believe the entire shoot, its just wrong.. however, blaming the photographer seems to be a stretch in this case.

I do understand this isn’t a normal topic I would talk about, but it is loosely photography related.. right?

by mkeefe on Mar 9th, 2008

Spell Check

In this day and age with project managers and copy artists, why do so many ads have misspelled copy? The latest one brought to my attention by my designer cousin, in Florida, can be seen on the Project Runway web site.

On top of that I can count at least another dozen times where something was not spelled correctly. Whether it be a URL, business name or body text. Most of these studios have computers, probably have Word and excluding proper names, could stand to use it sometimes.

Here is the ad on Bravo’s site, should still be there as well.
christian_bravo.png

Next »