- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
I’m using Zend-AMF to connect from Flash to PHP .
I’m ripping my hair out over the simplest thing 
The following works perfectly when echo’d in php
$thedate = date("d-m") . "-20" . date("y") . date(" H:i", time());
It should output: 01-10-2009 11:55 (or similiar).
However, when I try wrapping it up in a function within a PHP class:
public function getDate()
{
$thedate = date("d-m") . "-20" . date("y") . date(" H:i", time());
return $thedate;
}
and call that function using ZendAMF I get an error indicating there is an error in my PHP class 
Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.BadVersion
Ive tried simplifying it down to:
public function getDate()
{
$thedate = date("d");
return $thedate;
}
but it still gives the error
anyone have any ideas? 
edit: love the new code (pre) blocks 
- Author was Featured
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Grew a moustache for the Envato Movember competition
- Has been a member for 4-5 years
- Item was Featured
- Microlancer Beta Tester
- Referred between 10 and 49 users
i think you have something wrong with your AS code… NetConnection.Call.BadVersion
may be about the amf version? i dunno… and i really suggest AMFPHP .. that rocks!
- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
i think you have something wrong with your AS code… NetConnection.Call.BadVersion may be about the amf version? i dunno… and i really suggest AMFPHP .. that rocks!
i’m using ZendAMF which is the version of AMF -PHP supported by adobe…
My AS code is fine because if I change the php function to:
public function getDate()
{
$thedate = "01-10-2009: 12:25";
return $thedate;
}
then it works and returns the value to flash as it should do so there is something going on with the date function 
- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
ARGHHHHHHHHHHHHHH !

- Sold between 100 000 and 250 000 dollars
- Author had a File in an Envato Bundle
- Has been a member for 4-5 years
- Author had a Free File of the Month
- Won a Competition
- Author was Featured
- Item was Featured
- Bought between 10 and 49 items
try to set date 2nd optional parameter:ARGHHHHHHHHHHHHHH !
![]()
![]()
$thedate = date("d",time());
- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
try to set date 2nd optional parameter:ARGHHHHHHHHHHHHHH !
![]()
![]()
$thedate = date("d",time());
yeah still wont work 
works on its own, its when used within the ZendAMF it breaks 
- Sold between 100 000 and 250 000 dollars
- Author had a File in an Envato Bundle
- Has been a member for 4-5 years
- Author had a Free File of the Month
- Won a Competition
- Author was Featured
- Item was Featured
- Bought between 10 and 49 items
works at all if you swap “date” with other functions ? like “strtoupper”
public function getDate(){
return (date("d-m") . "-20" . date("y") . date(" H:i", time()));
}
- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
works at all if you swap “date” with other functions ? like “strtoupper”
yeah, works with all string functions, its just the date that wont work 

- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
I don’t know a lick of PHP but have you tried returning the string as is like in the following snippet:
public function getDate(){
return (date("d-m") . "-20" . date("y") . date(" H:i", time()));
}
yeah that wont work either, seems any date call just breaks it 
