Danny Kopping

This user hasn't shared any biographical information


Posts by Danny Kopping

XAMPP 1.7.2 Released

It’s finally here! The new version of the XAMPP stack has been released…

This new version includes PHP 5.3.0, Apache 2.2.12, MySQL 5.1.37 & phpMyAdmin 3.2.0.1 (amongst a myriad of other features). You can check out the new stack here. I wouldn’t recommend upgrading if you are using AMFPHP or CodeIgniter as the new version of PHP (5.3.0) will mess up quite a few things – i learnt the hard way.

I upgraded from 1.7.1 to the new version on my Linux Mint virtual server that i run within my Vista installation (damn you Adobe! Just release your software on Linux already!) and i came across an error in one of my AMFPHP installations on a project that i’m working on at the moment:

(mx.rpc::Fault)#0
errorID = 0
faultCode = “Client.Error.DeliveryInDoubt”
faultDetail = “Channel disconnected before an acknolwedgement was received”
faultString = “Channel disconnected”
message = “faultCode:Client.Error.DeliveryInDoubt faultString:’Channel disconnected’ faultDetail:’Channel disconnected before an acknolwedgement was received’”
name = “Error”
rootCause = (null)

I think that AMFPHP is still the simplest and easiest way to use Flex remoting with PHP (i recently wrote an article for FFDMag on this topic – look out for it in the September edition). However, it doesn’t have the greatest error handling mechanism ever…

Using Charles Proxy, i managed to find the real root of the error, and it appears that there is some sort of discrepancy with the dates/timezones in Gateway.php in the core of AMFPHP.

To resolve this issue, open the Gateway.php file in the core/amf/app folder in your AMFPHP installation and go to line 213. You need to tell PHP which timezone you’re in, and you can paste the following code:

date_default_timezone_set("Africa/Johannesburg");

above this line:

$dateStr = date("D, j M Y ") . date("H:i:s", strtotime("-2 days"));

I reside in Johannesburg, South Africa so that timezone will apply to me, but if you live anywhere else, you’ll have to find the pertinent timezone to use.

That should fix things up…