Re: [flexcoders] AMFPHP Security?

2010-08-12 Thread Clark Stevenson
Thanks everyone for your help on this.

I was hoping for some ideas but now i have loads of them!

We will look into these replies in more detail in the coming days. Its
interesting to know the different approaches available.

Im starring this!

Clark.

On 11 August 2010 14:57, Imap.gmail.com jmitchell@gmail.com wrote:



 Use a token system. Accessing the entry page, preferably by the submission
 and validation of a username and password, have the server randomly generate
 a token and store it in php (or whatever your server side language is
 written in) session variables. For any other data request of any kind, query
 the session token and validate it prior to accepting any data or executing
 any other code. This, of course, should be in addition to any sql injection
 correction you do on data received (side note).

 Happy coding!

 Jm

 Sent from my iPad
  



Re: [flexcoders] AMFPHP Security?

2010-08-11 Thread Oleg Sivokon
You shouldn't send sensitive data to begin with, you need to calculate it on
server and call saveHighScore() without parameters, so only server will know
what the score was. No matter what your client technology is, the client
cannot be trusted.


Re: [flexcoders] AMFPHP Security?

2010-08-11 Thread hamann . w

Clark Stevenson wrote:
Hi all.

I am new to AMFPHP.  Lets say you have a class and a function:

SomeClass.saveHighScore(304958);

For me, the way i see it, is that anyone using Charles can call this
method? Whats to stop anyone from calling it directly?

SomeClass.saveHighScore(20394948548438484).


Can any one advise me on ways i could secure this method?

Hi Clark,

first of all, there is no secure method; you can just make it harder.

Consider this scenario:
the website uses a server session. When the game starts, or just prior to
sending highscore, the movie asks the server for some token (which will
be stored in the serverside session data)
Now the movie performs some calculations with the token and the value,
and sends result of calculation.
Server can verify that the client was indeed using the token matching its
session ID. The calculation is sort of a crypt thing, obviously

Wolfgang


Re: [flexcoders] AMFPHP Security?

2010-08-11 Thread Imap.gmail.com
Use a token system.  Accessing the entry page, preferably by the submission and 
validation of a username and password, have the server randomly generate a 
token and store it in php (or whatever your server side language is written in) 
session variables.  For any other data request of any kind, query the session 
token and validate it prior to accepting any data or executing any other code.  
This, of course, should be in addition to any sql injection correction you do 
on data received (side note).

Happy coding!

Jm 

Sent from my iPad

[flexcoders] Amfphp Error

2010-06-16 Thread Christophe
Hello, 

I have this error: 
AMFPHP runtime error

Do you have such an error ? 

Thx,
Christophe, 



Re: [flexcoders] Amfphp Error

2010-06-16 Thread K~SATHYAN~M
Hi,

Use this http://localhost/amfphp/browser/ and check whether your class
is error free or not.. otherwise replace it with amfphp 1.9 version from
www.amfphp.org


- - - - - - - - -
With Regards,
Sathya Moorthi K



On Thu, Jun 17, 2010 at 3:18 AM, Christophe
christophe_jacque...@yahoo.frwrote:



 Hello,

 I have this error:
 AMFPHP runtime error

 Do you have such an error ?

 Thx,
 Christophe,

  



[flexcoders] Amfphp and require_once

2010-03-31 Thread Christophe
Hello, 

When I use a foreign class in my Amfhp service part, with the line:
require_once(myclass.php);

Amfphp does not work anymore. I have the error message:
Channel disconnected.

What can I do?

Thx,
Christophe, 



Re: [flexcoders] Amfphp and require_once

2010-03-31 Thread Oleg Sivokon
Either one of these:
Required file cannot be found.
Required file was found but contained errors. Try Charles HTTP proxy - it'll
display what the response contained. It'll have some PHP generated error /
warning text in the message - easier to diagnose the problem.

Best.

Oleg


Re: [flexcoders] AmfPhp Version Question

2010-01-01 Thread Sajid Hussain
AMfphp now knows as ZendAMF , which is more good even with complete zend 
framework support , 

if you lookiing for ZendAMF , I have its code generator which generates zendamf 
services with CRUD with propel  let me know I will share to u 

Sajid 





From: Dan Pride danielpr...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Mon, December 28, 2009 6:56:54 PM
Subject: [flexcoders] AmfPhp Version Question

  
The only download up on amfphp.org seems to be 1.9beta which is two years old???
Isnt' there anything since then ??

Thanks
Dan pride


 


  

[flexcoders] AmfPhp Version Question

2009-12-28 Thread Dan Pride
The only download up on amfphp.org seems to be 1.9beta which is two years old???
Isnt' there anything since then ??

Thanks
Dan pride


  


Re: [flexcoders] AMFPHP problem

2009-11-11 Thread Pete
As you probably know, NetConnection.Call.BadVersion means that an error 
was thrown in the php script, usually a syntax error, but your script 
runs fine on other servers.


I would suspect something in the php config on the server is causing you 
trouble.


I have the same problem every time I move to a new server because I try 
and transfer too much info and not enough memory is allocated ro running 
php scripts on the server.


Check your php.ini

HTH
Pete

gotgoose09 wrote:
 

I have been running my Flex applications just fine on my local 
computer and a remote server. I have been tasked with transferring 
them to a new server. Now whenever I execute a RemoteObject call I get


[RPC Fault faultString=Send failed 
faultCode=Client.Error.MessageSend 
faultDetail=Channel.Connect.Failed error 
NetConnection.Call.BadVersion: : url: 
'https://server/path/to/gateway.php 
https://server/path/to/gateway.php']


I know my PHP code works locally. I know it works on the old server. 
Even the AMFPHP service browser does not work and gives me the same 
issue. I know that the gateway.php works since I can view it in a web 
browser with no errors. I am wondering if the HTTPS is causing the 
problem, but I'm not sure.


What can I do to solve this or figure out how to solve this? Any help 
would be greatly appreciated!


- Ben






[flexcoders] AMFPHP problem

2009-11-10 Thread gotgoose09
I have been running my Flex applications just fine on my local computer and a 
remote server.  I have been tasked with transferring them to a new server.  Now 
whenever I execute a RemoteObject call I get 

[RPC Fault faultString=Send failed faultCode=Client.Error.MessageSend 
faultDetail=Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: 
'https://server/path/to/gateway.php'] 

I know my PHP code works locally.  I know it works on the old server.  Even the 
AMFPHP service browser does not work and gives me the same issue.  I know that 
the gateway.php works since I can view it in a web browser with no errors.  I 
am wondering if the HTTPS is causing the problem, but I'm not sure.

What can I do to solve this or figure out how to solve this?  Any help would be 
greatly appreciated!

- Ben



[flexcoders] Amfphp and images

2009-10-29 Thread mixmi2004
Hi.  I cant load images, can you help me.
 code:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute creationComplete=init();

mx:Script
![CDATA[
import mx.controls.Image;
import mx.rpc.events.ResultEvent;
import flash.net.*;
import mx.collections.ArrayCollection;

[Bindable]
private var nodes:ArrayCollection;

[Bindable]
private var _img= new Image();

  private function onResult(result):void{
trace(result);
_img=result;
 nodes=new ArrayCollection(result);

  }

  private function onFault(result):void{
trace(onFault:  + result);
  }

  
public var rr:FBTileList= new FBTileList();

private  function init():void{
var conn:NetConnection = new NetConnection();
conn.connect(http://localhost/amfphp/gateway.php;);
var folderResponder = new Responder(onResult, onFault);
conn.call(MyService.readFolder, folderResponder, images);


//  rr.x=91;rr.y=55;
//rr.dataProvider=nodes;
} 
]]
/mx:Script

mx:Image source={_img} /
!--   mx:TileList  x=50 y=50 id=iii dataProvider={nodes}  
itemRenderer=TitleListRender  width=50% height=50%/--


/mx:Application?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute creationComplete=init();

mx:Script
![CDATA[
import mx.controls.Image;
import mx.rpc.events.ResultEvent;
import flash.net.*;
import mx.collections.ArrayCollection;

[Bindable]
private var _img= new Image();

  private function onResult(result):void{
trace(result);
_img=result;
 nodes=new ArrayCollection(result);

  }

  private function onFault(result):void{
trace(onFault:  + result);
  }

private  function init():void{
var conn:NetConnection = new NetConnection();
conn.connect(http://localhost/amfphp/gateway.php;);
var folderResponder = new Responder(onResult, onFault);
conn.call(MyService.readFolder, folderResponder, images);
} 
]]
/mx:Script

mx:Image source={_img} /
/mx:Application


and  PHP

public function readFolder($folder){
$d = dir($folder) or die(Wrong path: $image_file_path);
while (false !== ($entry = $d-read())) {
if($entry != '.'  $entry != '..'  
!is_dir($dir.$entry))
$images[] = $entry;
}
$d-close();
return $images;
}
}



I have array of images and need to display the images.



[flexcoders] Amfphp inside module

2009-08-04 Thread yonghan79
Hi all,i want to ask.Does anyone ever before creating application using amfphp 
within modules?Right now i'm trying to create an aplication using amfphp,and 
access the methods within modules..When i run try to save data,i got errors 
like this :

TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
at modules::Kategori/addKategori()[C:\Documents and Settings\handoyo\My 
Documents\Flex Builder 3\administrator\src\modules\Kategori.mxml:56]
at modules::Kategori/___Kategori_Button1_click()[C:\Documents and 
Settings\handoyo\My Documents\Flex Builder 
3\administrator\src\modules\Kategori.mxml:109]

Can someone point me please?Thanks a lot..




[flexcoders] amfphp and https

2009-06-14 Thread christophe_jacquelin
Hello, 

Amfphp does not work when I use https.

I have set SecureAMFChannel.

I have tested on port 443, 80 and 8080.

Do you have any solution ?

Thank you,
Christophe, 




Re: [flexcoders] AMFPHP release project security problem

2009-03-31 Thread soulflow132

How can i resolve that problem please ?
-- 
View this message in context: 
http://www.nabble.com/AMFPHP-release-project-security-problem-tp22784941p22804324.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] AMFPHP release project security problem

2009-03-30 Thread soulflow132

Hi am new to flex 3.
/br I've created a flex application that connects to database using
amfphp./br
When i compile it and run it on flex builder environement it simply works
./br
So i wanted to export it as release and i've done so./br
As result i got a bin-release folder that contain the swf html file and
other files./br/br
When i try to open the index.html file i got an error warning like/br 
http://www.nabble.com/file/p22784941/erreur.jpg 
/br/br/br
so PLEASE HOW CAN i resolve this problem./br
Thank you alot and have a nice day
-- 
View this message in context: 
http://www.nabble.com/AMFPHP-release-project-security-problem-tp22784941p22784941.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] AMFPHP release project security problem

2009-03-30 Thread soulflow132

No i dont. i only have the service-config.xml file which is given with amfphp
/br
its something like this/br/br
services-config
services
service id=amfphp-flashremoting-service 
 
class=flex.messaging.services.RemotingService 
 
messageTypes=flex.messaging.messages.RemotingMessage
destination id=amfphp
channels
channel ref=my-amfphp/
/channels
properties
source*/source
/properties
/destination
/service
/services

channels
channel-definition id=my-amfphp
class=mx.messaging.channels.AMFChannel
endpoint 
uri=http://localhost:80/Workspace/amfphp/gateway.php;
class=flex.messaging.endpoints.AMFEndpoint/
/channel-definition
/channels
/services-config
/br
/br
/br
/br
/br

valdhor-3 wrote:
 
 Do you have a crossdomain.xml file on your server?
 
 
 --- In flexcoders@yahoogroups.com, soulflow132 sfood00...@... wrote:

 
 Hi am new to flex 3.
 /br I've created a flex application that connects to database using
 amfphp./br
 When i compile it and run it on flex builder environement it simply works
 ./br
 So i wanted to export it as release and i've done so./br
 As result i got a bin-release folder that contain the swf html file and
 other files./br/br
 When i try to open the index.html file i got an error warning like/br 
 http://www.nabble.com/file/p22784941/erreur.jpg 
 /br/br/br
 so PLEASE HOW CAN i resolve this problem./br
 Thank you alot and have a nice day
 -- 
 View this message in context:
 http://www.nabble.com/AMFPHP-release-project-security-problem-tp22784941p22784941.html
 Sent from the FlexCoders mailing list archive at Nabble.com.

 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/AMFPHP-release-project-security-problem-tp22784941p22796037.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] AMFPHP Question

2009-03-21 Thread Alan K
Last time I made a data driven app with AMFPHP. I used PHP and MySQL.  I did
all of what your describing within PHP and MySQL.

Everytime I querried the database, I always sent back the same kind of
object to Flex.  The object always had two properties, a Œsuccess¹ property
and a Œmessage¹ property. IF the query succeeded, then my object that I
created in PHP would be:

Œsuccess¹ = true; Œmessage¹ = query executed successfully.

Or if it failed it would be.

Œsuccess¹ = false; Œmessage¹ = [enter your custom error message here. I.e.
Œrecord already exists¹]

 I suggest making your remote object responses in a format that you repeat,
like this:

mx:RemoteObject id=myRemoteObject
 mx: method name =insertRecord result
=¹_onInsertRecordResponse(event)/
mx:RemoteObject/


private function _onInsertRecordResponse (evt:ResultEvent) : void
 {

if(evt.result.success) // remember I¹m returning an object with a
Œsuccess¹ and a Œmessage¹
{
Alert.show(event.result.message) // output Œquery execurted
seccessfully¹
} 
Else if (!evt.result.success)
{
Alert.show(event.result.message) // outputs Œrecord already exists¹
// my custom error message I made in PHP
}
}

This way, every result handler, from every remote object is in my app is
structured the same way.

Alan


[flexcoders] AMFPHP Question

2009-03-20 Thread secrit.service

Hi all,

I have following issue, which I don't understand.

I created a button which will add a record to the database. But before
doing so I need to check if a similar record already exists.
This is how I thought it could be solved:

mx:RemoteObject id=myRemoteObject
  mx: method name =existRecord result
=recordExistResultHandler(event)/
mx:RemoteObject/

if (myRemoteObject.existRecord.send(myRecord)) {
  Alert.show (Record already exists)
} else {
 // Insert record into the database
  myRemoteObject.insertRecord.send(myRecord)
}


private function recordExistResultHandler (evt:ResultEvent) : Boolean {


  Alert.show (Result getting back from webserver is  +
evt.result.toString());
  return evt.result;

}


The function existRecord on the webserver checks if a similar record
already exists and sends a Boolean back. This works fine.
To my opinion this should work as follows (supposing record is already
in the database) :
- Before executing my if-statement, it will check the condition (check
if record already exists)
- it send a request existSpell to the webserver which will query the
database
- num_rows is greater dan zero (meaning record already exists), the
webserver will return TRUE to the resultHandler of flex-application
- resultHandler is executed -- an Alert-windows appears telling Result
getting back ...is TRUE  and the value is returned to the
if-statement.
- Because condition is true -- an Alert-window appears telling Record
already exists

BUT ... THIS IS NOT HOW IT WORKS ?
As a matter of fact the if-statement is executed first (Alert 'Record
already exists') and afterwards I get the Alert telling the result of
the webserver???
It's the opposite world.

Am I missing something??

Thanks



RE: [flexcoders] AMFPHP Question

2009-03-20 Thread Tracy Spratt
ALL RPC data service calls, including RemoteObject are *asynchronous*.  And
such calls are non-blocking.  You must invoke your check call, then, in its
result handler, do the conditional logic to  invoke the insert.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of secrit.service
Sent: Friday, March 20, 2009 2:19 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AMFPHP Question

 

Hi all,

I have following issue, which I don't understand.

I created a button which will add a record to the database. But before doing
so I need to check if a similar record already exists.
This is how I thought it could be solved:

mx:RemoteObject id=myRemoteObject
 mx: method name =existRecord result
=recordExistResultHandler(event)/
mx:RemoteObject/

if (myRemoteObject.existRecord.send(myRecord)) {
 Alert.show (Record already exists)
} else {
// Insert record into the database
 myRemoteObject.insertRecord.send(myRecord)
}


private function recordExistResultHandler (evt:ResultEvent) : Boolean {

 Alert.show (Result getting back from webserver is  +
evt.result.toString());
 return evt.result;

}

The function existRecord on the webserver checks if a similar record already
exists and sends a Boolean back. This works fine.
To my opinion this should work as follows (supposing record is already in
the database) :
- Before executing my if-statement, it will check the condition (check if
record already exists)
- it send a request existSpell to the webserver which will query the
database
- num_rows is greater dan zero (meaning record already exists), the
webserver will return TRUE to the resultHandler of flex-application
- resultHandler is executed -- an Alert-windows appears telling Result
getting back ...is TRUE  and the value is returned to the if-statement.
- Because condition is true -- an Alert-window appears telling Record
already exists

BUT ... THIS IS NOT HOW IT WORKS ?
As a matter of fact the if-statement is executed first (Alert 'Record
already exists') and afterwards I get the Alert telling the result of the
webserver???
It's the opposite world.

Am I missing something??

Thanks





Re: [flexcoders] amfphp problem - Client.Error.DeliveryInDoubt - when trying to export image

2009-03-04 Thread Rico Leuthold

Hi,

Thank's for the answer. But how can I get the ByteArray with the data  
and the filename in the php upload script at the same time?


It seems not possible to send the ByteArray in a post variable and  
read it out in php.


Thank's
_rico

On 03.03.2009, at 19:09, Fotis Chatzinikos wrote:

I never use amf to upload images. I always post to a normal  
upload.php page.


If you do not find a solution to your amf problem try this...

Have in mind that you will need to send the server session as well  
if you follow my advice,
as the flash player has a different session id in some browsers  
(this is needed if your upload page is available only to logged in  
users)



On Tue, Mar 3, 2009 at 8:01 PM, Rico Leuthold rleuth...@sunrise.ch  
wrote:

Hi,

I have a really annoying, randomly occuring, problem with amfphp when
I want to export an image file.

The application is sending a byteArray (png encoded) to php over
amfphp, where the png file is created and the image file is served for
download. Sometimes that works perfect, but the suddenly I get the
error Message: Client.Error.DeliveryInDoubt - Channel  
disconnected.


When I debug the data flow with Charles I get:
The class {Amf3Broker} could not be found under the class path {[...]/
amfphp/services/amfphp/Amf3Broker.php

I searched through the web to find a solution to this and tried out
every thing I could find.

A huge problem is, that this happens just from time to time. Usually I
can just reload my app to get rid of th problem.

Did somebody have the same problem and found a solution to this, or
can you give me hint on how to go on?

Thank's
rico




--
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
fotis.chatzini...@gmail.com,






Re: [flexcoders] amfphp problem - Client.Error.DeliveryInDoubt - when trying to export image

2009-03-04 Thread Rico Leuthold

Hi again,

Found a workaround for this problem (Source: 
http://blog.flexexamples.com/2007/12/07/converting-an-imagesnapshot-object-into-a-base-64-encoded-string-in-flex-3/)

Instead of encoding the ImageSnapshot to a ByteArray,  it's easy to  
encode the data to a Base-64 string ( ImageSnapshot.  
encodeImageAsBase64(snapshot) ).


In the method of the amfphp service file handling the export, decode  
the data with the base64_decode function.


This seems to solve my problem (touch wood).

_rico

On 03.03.2009, at 19:09, Fotis Chatzinikos wrote:

I never use amf to upload images. I always post to a normal  
upload.php page.


If you do not find a solution to your amf problem try this...

Have in mind that you will need to send the server session as well  
if you follow my advice,
as the flash player has a different session id in some browsers  
(this is needed if your upload page is available only to logged in  
users)



On Tue, Mar 3, 2009 at 8:01 PM, Rico Leuthold rleuth...@sunrise.ch  
wrote:

Hi,

I have a really annoying, randomly occuring, problem with amfphp when
I want to export an image file.

The application is sending a byteArray (png encoded) to php over
amfphp, where the png file is created and the image file is served for
download. Sometimes that works perfect, but the suddenly I get the
error Message: Client.Error.DeliveryInDoubt - Channel  
disconnected.


When I debug the data flow with Charles I get:
The class {Amf3Broker} could not be found under the class path {[...]/
amfphp/services/amfphp/Amf3Broker.php

I searched through the web to find a solution to this and tried out
every thing I could find.

A huge problem is, that this happens just from time to time. Usually I
can just reload my app to get rid of th problem.

Did somebody have the same problem and found a solution to this, or
can you give me hint on how to go on?

Thank's
rico




--
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
fotis.chatzini...@gmail.com,






[flexcoders] amfphp problem - Client.Error.DeliveryInDoubt - when trying to export image

2009-03-03 Thread Rico Leuthold
Hi,

I have a really annoying, randomly occuring, problem with amfphp when  
I want to export an image file.

The application is sending a byteArray (png encoded) to php over  
amfphp, where the png file is created and the image file is served for  
download. Sometimes that works perfect, but the suddenly I get the  
error Message: Client.Error.DeliveryInDoubt - Channel disconnected.

When I debug the data flow with Charles I get:
The class {Amf3Broker} could not be found under the class path {[...]/ 
amfphp/services/amfphp/Amf3Broker.php

I searched through the web to find a solution to this and tried out  
every thing I could find.

A huge problem is, that this happens just from time to time. Usually I  
can just reload my app to get rid of th problem.

Did somebody have the same problem and found a solution to this, or  
can you give me hint on how to go on?

Thank's
rico




Re: [flexcoders] amfphp problem - Client.Error.DeliveryInDoubt - when trying to export image

2009-03-03 Thread Fotis Chatzinikos
I never use amf to upload images. I always post to a normal upload.php page.

If you do not find a solution to your amf problem try this...

Have in mind that you will need to send the server session as well if you
follow my advice,
as the flash player has a different session id in some browsers (this is
needed if your upload page is available only to logged in users)

On Tue, Mar 3, 2009 at 8:01 PM, Rico Leuthold rleuth...@sunrise.ch wrote:

   Hi,

 I have a really annoying, randomly occuring, problem with amfphp when
 I want to export an image file.

 The application is sending a byteArray (png encoded) to php over
 amfphp, where the png file is created and the image file is served for
 download. Sometimes that works perfect, but the suddenly I get the
 error Message: Client.Error.DeliveryInDoubt - Channel disconnected.

 When I debug the data flow with Charles I get:
 The class {Amf3Broker} could not be found under the class path {[...]/
 amfphp/services/amfphp/Amf3Broker.php

 I searched through the web to find a solution to this and tried out
 every thing I could find.

 A huge problem is, that this happens just from time to time. Usually I
 can just reload my app to get rid of th problem.

 Did somebody have the same problem and found a solution to this, or
 can you give me hint on how to go on?

 Thank's
 rico

  




-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
fotis.chatzini...@gmail.com,


Re: [flexcoders] AMFPHP and Value Objects

2008-11-11 Thread Marco Catunda
Alan,

Just to complement...

I'm used VO (AMFPHP approach) with a lot of method with no
problem. These VOs have the same face as above.

On Mon, Nov 10, 2008 at 9:39 PM, Alan [EMAIL PROTECTED] wrote:
 On my last AMFPHP project my PHP and Flex VOs were:

 package com.mydomain
 {
 [Bindable]
 [RemoteClass(alias=UserVO)]
 public class UserVO
 {
 public var id :int;
 public var username :String;
 public var password :String;
 public var last_login :String;
 public var user_id :int;
 public var usertype_id :int;
 public var project_id :int;
 public function UserVO()
 {

 }
 }
 }
  PHP ///
 ?php
 class UserVO
 {
 var $id;
 var $username;
 var $password;
 var $last_login;
 var $user_id;
 var $usertype_id;
 var $project_id;
 // explicit actionscript package
 var $_explicitType = UserVO;
 }
 ?


 On Nov 10, 2008, at 6:07 PM, Fotis Chatzinikos wrote:

 Might be completly irrelevant (have not used AMFPHP) but are you using
 Remote class Metas?

 

-- 
Marco Catunda


[flexcoders] AMFPHP and Value Objects

2008-11-10 Thread Amy
Hi, all;

I have some VO's that I've created to work with AMFPHP.  When I call 
the service, I'm getting an array of untyped objects.  Another 
developer on the project believes that the reason for the problem is 
that the objects extend EventDispatcher and because they have 
additional methods on them to work with the data.

Is there a rule against either of these things with AMFPHP?

Thanks;

Amy



Re: [flexcoders] AMFPHP and Value Objects

2008-11-10 Thread Fotis Chatzinikos
Might be completly irrelevant (have not used AMFPHP) but are you using
Remote class Metas?

example:

package beans
{
[RemoteClass(alias=net.w2w.semantic.annotation.beans.SemanticTags)]

[Bindable]
public class SemanticTags
{
public var type:String ;
public var tagsMap:Object ;

public function SemanticTags()
{
}

}
}
On Tue, Nov 11, 2008 at 12:41 AM, Amy [EMAIL PROTECTED] wrote:

   Hi, all;

 I have some VO's that I've created to work with AMFPHP. When I call
 the service, I'm getting an array of untyped objects. Another
 developer on the project believes that the reason for the problem is
 that the objects extend EventDispatcher and because they have
 additional methods on them to work with the data.

 Is there a rule against either of these things with AMFPHP?

 Thanks;

 Amy

  




-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
[EMAIL PROTECTED],


Re: [flexcoders] AMFPHP and Value Objects

2008-11-10 Thread Alan
Is it creating a problem for you?  It shouldn't.  From what I remember  
you don't even really need VOs with AMFPHP.


Are you getting those warning that say something like unable to bind  
to property 'X '.  Unfortunately, no one really knows what's going on  
with AMFPHP :)  Wade said he's actually rewriting the enter code base  
for AMFPHP 2.


IF you are getting the warnings, or if data is not binding properly,  
let us know.


Alan

On Nov 10, 2008, at 5:41 PM, Amy wrote:


Hi, all;

I have some VO's that I've created to work with AMFPHP. When I call
the service, I'm getting an array of untyped objects.
Is there a rule against either of these things with AMFPHP?


Re: [flexcoders] AMFPHP and Value Objects

2008-11-10 Thread Rich Rodecker
If you are getting an array of untyped objects, that means that your class
mapping is not set up properly.  As already mentioned, make sure that you
have the $_explicitType variable set in your php VOs, and the RemoteClass
metadata included in your AS classes.  This might help:
http://www.visible-form.com/blog/flex-amfphp-mapping-value-objects/


On Mon, Nov 10, 2008 at 3:39 PM, Alan [EMAIL PROTECTED] wrote:

   On my last AMFPHP project my PHP and Flex VOs were:

 package com.mydomain
 {
 [Bindable]
  [RemoteClass(alias=UserVO)]

 public class UserVO
  {
 public var id :int;
  public var username :String;
 public var password :String;
  public var last_login :String;
 public var user_id :int;
  public var usertype_id :int;
 public var project_id :int;

 public function UserVO()
 {


 }
 }
 }

  PHP ///

 ?php

 class UserVO
 {

 var $id;
 var $username;
  var $password;
 var $last_login;
 var $user_id;
 var $usertype_id;
  var $project_id;
  // explicit actionscript package
  var $_explicitType = UserVO;
 }
 ?



 On Nov 10, 2008, at 6:07 PM, Fotis Chatzinikos wrote:

 Might be completly irrelevant (have not used AMFPHP) but are you using
 Remote class Metas?


  



Re: [flexcoders] AMFPHP and Value Objects

2008-11-10 Thread Alan

On my last AMFPHP project my PHP and Flex VOs were:

package com.mydomain
{
[Bindable]
[RemoteClass(alias=UserVO)]

public class UserVO
{
public var id   :int;
public var username :String;
public var password :String;
public var last_login   :String;
public var user_id  :int;
public var usertype_id  :int;
public var project_id   :int;

public function UserVO()
{   

}
}
}

 PHP ///

?php

class UserVO
{

var $id;
var $username;
var $password;
var $last_login;
var $user_id;
var $usertype_id;
var $project_id;

// explicit actionscript package

var $_explicitType = UserVO;
}
?



On Nov 10, 2008, at 6:07 PM, Fotis Chatzinikos wrote:

Might be completly irrelevant (have not used AMFPHP) but are you  
using Remote class Metas?




Re: [flexcoders] AMFPHP tutorial

2008-10-10 Thread Flex Gangsta

Also try www.polygeek.com
These are very easy to follow and makes amfphp really east to folow

Sent from my iPhone


On Oct 10, 2008, at 5:21 AM, yuku [EMAIL PROTECTED] wrote:


Maybe you can try this:

http://jonniespratley.com/2008/09/19/flex-and-amfphp-mini-cookbook/


On Fri, Oct 10, 2008 at 04:06, hworke [EMAIL PROTECTED] wrote:


  Hello all,

  where can I find some good AMHPHP tutorials.
  I will prefer some video tutorials. I tried
  on tv.adobe.com. But they do not have any.

  Best regards..




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
! Groups Links








[flexcoders] AMFPHP tutorial

2008-10-10 Thread [EMAIL PROTECTED]
You can search on Google.

http://www.sephiroth.it/tutorials.php
http://www.flash-db.com/Tutorials/hello/flashamfphp.php

--- In flexcoders@yahoogroups.com, hworke [EMAIL PROTECTED] wrote:

 
 
Hello all,
 
where can I find some good AMHPHP tutorials.
I will prefer some video tutorials. I tried
on tv.adobe.com. But they do not have any.
   
Best regards..





Re: [flexcoders] AMFPHP tutorial

2008-10-10 Thread yuku
Maybe you can try this:

http://jonniespratley.com/2008/09/19/flex-and-amfphp-mini-cookbook/


On Fri, Oct 10, 2008 at 04:06, hworke [EMAIL PROTECTED] wrote:



   Hello all,

   where can I find some good AMHPHP tutorials.
   I will prefer some video tutorials. I tried
   on tv.adobe.com. But they do not have any.

   Best regards..


 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links






RE: [flexcoders] AMFPHP tutorial

2008-10-10 Thread Eric Fickes
If you can get it to load, here are video tutorials straight from the
source
 
http://www.amfphp.org/videotuts.html



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of yuku
Sent: Friday, October 10, 2008 6:22 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AMFPHP tutorial



Maybe you can try this:

http://jonniespratley.com/2008/09/19/flex-and-amfphp-mini-cookbook/
http://jonniespratley.com/2008/09/19/flex-and-amfphp-mini-cookbook/ 



On Fri, Oct 10, 2008 at 04:06, hworke [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:




  Hello all,

  where can I find some good AMHPHP tutorials.
  I will prefer some video tutorials. I tried
  on tv.adobe.com. But they do not have any.

  Best regards..




--
Flexcoders Mailing List
FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt 
Alternative FAQ location:
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-
1e62079f6847
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf
-1e62079f6847 
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo ! Groups
Links


   (Yahoo! ID required)

   mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 






 


Re: [flexcoders] AMFPHP tutorial

2008-10-10 Thread Alan

http://www.friendsofed.com/book.html?isbn=9781430209935


On Oct 9, 2008, at 4:06 PM, hworke wrote:


where can I find some good AMHPHP tutorials




[flexcoders] AMFPHP tutorial

2008-10-09 Thread hworke


   Hello all,

   where can I find some good AMHPHP tutorials.
   I will prefer some video tutorials. I tried
   on tv.adobe.com. But they do not have any.
  
   Best regards..



[flexcoders] AMFPHP and HierarchicalData

2008-10-08 Thread Amy
Does anyone have an example of using AMFPHP to serialize and 
deserialize hierarchical collections of typed objects?

Thanks;

Amy



[flexcoders] Amfphp version update? Dataservices and rtmp

2008-09-25 Thread Sajid Hussain
Guys . 

I  m realy waiting about amfphp's new version to with dataservice suuport and 
maybe rtmp too 
I heard about amfphp2 but never see its link to have it(download).

Sajid



  

Re: [flexcoders] Amfphp version update? Dataservices and rtmp

2008-09-25 Thread Haykel BEN JEMIA
For now the main developer, Wade Arnold, is working on integrating AMFPHP in
the Zend framework, so I suppose any new features will go there first.For
more infos :
http://framework.zend.com/wiki/display/ZFPROP/Zend_Amf+-+Wade+Arnold

On Thu, Sep 25, 2008 at 1:48 PM, Sajid Hussain [EMAIL PROTECTED]wrote:

   Guys .

 I  m realy waiting about amfphp's new version to with dataservice suuport
 and maybe rtmp too
 I heard about amfphp2 but never see its link to have it(download).

 Sajid


  




-- 
Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com


Re: [flexcoders] Amfphp version update? Dataservices and rtmp

2008-09-25 Thread Alan

ZendAMF will probably displace AMFPHP.

http://theflashblog.com/?p=441

Especially since Wade ( current 'parent' of AMFPHP ) is spending his  
time on ZendAMF instead.  ZendAMF is also officially supported by  
Adobe, AMFPHP is not, and never will be.


Alan


On Sep 25, 2008, at 7:48 AM, Sajid Hussain wrote:


Guys .

I  m realy waiting about amfphp's new version to with dataservice  
suuport and maybe rtmp too

I heard about amfphp2 but never see its link to have it(download).

Sajid




Re: [flexcoders] Amfphp version update? Dataservices and rtmp

2008-09-25 Thread Sajid Hussain
Wow ,
so it mean amfphp projects have to see migration possibilities with zendamf





- Original Message 
From: Alan [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, September 25, 2008 2:10:25 PM
Subject: Re: [flexcoders] Amfphp version update? Dataservices and rtmp


ZendAMF will probably displace AMFPHP. 

http://theflashblog .com/?p=441

Especially since Wade ( current 'parent' of AMFPHP ) is spending his time on 
ZendAMF instead.  ZendAMF is also officially supported by Adobe, AMFPHP is not, 
and never will be.

Alan



On Sep 25, 2008, at 7:48 AM, Sajid Hussain wrote:

Guys .
 
I  m realy waiting about amfphp's new version to with dataservice suuport and 
maybe rtmp too
I heard about amfphp2 but never see its link to have it(download) .
 
Sajid



  

Re: [flexcoders] Amfphp version update? Dataservices and rtmp

2008-09-25 Thread Alan
No need to migrate projects, if it uses AMFPHP - keep using it.   
AMFPHP will probably still be used by those who don't want to mess  
with Eclipse.  ZendAMF ( as it sounds now ) is going to be a plug-in  
for Eclipse and Flex Builder.




On Sep 25, 2008, at 12:12 PM, Sajid Hussain wrote:


Wow ,
so it mean amfphp projects have to see migration possibilities with  
zendamf




Re: [flexcoders] Amfphp version update? Dataservices and rtmp

2008-09-25 Thread Sajid Hussain
Allan , 

you are quite right I m  curios who is going to update amfphp with the its 
expected features lets say comparing with weborb php ,I searched zendamf is 
quite promising and its developer said it wil be release  with zendframe work 
1.6, zend framework 1.6rc3 even avablable but no support yet of amf within it. 
But having zend framework's features like mvc orm and other php library will be 
amazing for our server side code but still its in doubt what features we going 
to have with flex 3 .


  

Re: [flexcoders] AMFPHP and date/datetime data from MySQL

2008-09-04 Thread Sajid Hussain
Guys Any points about this ?



- Original Message 
From: Sajid Hussain [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, September 3, 2008 4:55:46 PM
Subject: Re: [flexcoders] AMFPHP and date/datetime data from MySQL


Guys , 
I also need some help on this thing I m not getting exactly how to get this 
thing solved
if is there any way to transform flex date objects to php through amfphp ,same 
as reverse it will be great

right now I m storing date in php as dateandtime object and fetching as string 
into flex but it get transform into this 

date strored in mysql 2001-12-13
in flex as string it comees like this : 12/13/01

Any sugestion how to have this as in corect way or if I could convert 
12/13/01 this string to dateobject 

Sajid




- Original Message 
From: Nik Derewianka [EMAIL PROTECTED] com
To: [EMAIL PROTECTED] ups.com
Sent: Wednesday, September 3, 2008 4:31:25 PM
Subject: Re: [flexcoders] AMFPHP and date/datetime data from MySQL




On 04/09/2008, at 12:01 AM, Jason Reynolds wrote:

Adobe has some date parsing methods in the as3corelib library -- http://code. 
google.com/ p/as3corelib/
 
I suppose it depends on the format your storing the date, the way I've been 
handling it is using as3 to parse the date string that AMF returns. Not sure if 
this is the best way, I'd be open to a better one!

Yeah, I am at the point where i will try populating the string of the date (php 
side) in a throw away prop and then on successful load coerce it into a true 
date object in the real prop that is then used for binding.  But was hoping 
that if i got it in the right format serverside then the amf deserialization 
would just take care of it without having to write the converter code.  The 
MySQL columns are date and datetime so there shouldn't be anything funky going 
on with the storage.

 Hope that helps, I can attempt to help more if it doesn't. I've been using 
AMFPHP for awhile now... would be nice to make any contacts that use it!

Heh - i'll just say that it has been an... adventurous. .. experience getting 
upto speed on amfphp (or remoting of any kind for that matter).  But now that 
it is mostly working, it is pretty sweet.  I just hope to get the time to write 
up a comprehensive overview of all the pitfalls and assorted tidbits i found 
all over the net.

Cheers,
Nik



  

Re: [flexcoders] AMFPHP and date/datetime data from MySQL

2008-09-04 Thread Howard Fore
The Flex documentation says there is a DateFormatter class. Have you tried
using that?

On Thu, Sep 4, 2008 at 5:10 AM, Sajid Hussain [EMAIL PROTECTED]wrote:

  Guys Any points about this ?

 - Original Message 
 From: Sajid Hussain [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Wednesday, September 3, 2008 4:55:46 PM
 Subject: Re: [flexcoders] AMFPHP and date/datetime data from MySQL

  Guys ,
 I also need some help on this thing I m not getting exactly how to get this
 thing solved
 if is there any way to transform flex date objects to php through amfphp
 ,same as reverse it will be great

 right now I m storing date in php as dateandtime object and fetching as
 string into flex but it get transform into this

 date strored in mysql 2001-12-13
 in flex as string it comees like this : 12/13/01

 Any sugestion how to have this as in corect way or if I could convert
 12/13/01 this string to dateobject

 Sajid




-- 
Howard Fore, [EMAIL PROTECTED]
The universe tends toward maximum irony. Don't push it. - Jeff Atwood


Re: [flexcoders] AMFPHP and date/datetime data from MySQL

2008-09-04 Thread Nik Derewianka
Sajid,

Still under a tight deadline atm, but this is what i have working for  
me so far:

To write it to DB:
public function create($obj)
{

$query = INSERT INTO Event

(
DateStart,

)

VALUES

(

'.date(Y-m-d,mysql_real_escape_string($obj[DateStart])/1000).'


To read it back out - the query:

public function getOne($id)
{
$query = SELECT
date_format(DateStart, '%a %b %e %T GMT+1000 %Y') as DateStart,


Which will format the string exactly as new Date() outputs for me  
(couldn't quickly find a way to get the timezone + offset so it's hard  
coded).

Then in my VO which is sent back via amf:

?php
class EventsVO {
var $_explicitType=vo.EventsVO;
public $_DateStart;

public function EventsVO()
{

}

public function mapObject($data)
{
$this-_DateStart = $data[DateStart];
}

}
?


Take note that I have prepended the VO DateStart field with an  
underscore, the reason for this is apparent in the .as VO below:

package com.aom.mfl.vo
{
[RemoteClass(alias=vo.EventsVO)]  
[Bindable]
public class SEvent
{

public var _DateStart:String;


public function SEvent()
{

}

public function set DateStart(val:Date):void{
_DateStart = val.toString();
}

public function get DateStart():Date{
if (_DateStart == null){
return new Date();
}
return new Date(_DateStart);
}
}
}

Effectively the remoting will set the string of _DateStart but all  
other code throughout my flex app will refer to DateStart which  
returns the true Date object, you could create another private field  
to hold the Date object instead of parsing the string version on each  
request.

Cheers,
Nik



[flexcoders] AMFPHP and date/datetime data from MySQL

2008-09-03 Thread Nik Derewianka
Hi All,

Could anyone enlighten me as to how i should send and retrieve date  
and datetime data for inserting into MySQL via amfphp (1.9) with value  
objects ?

If i edit the data directly in MySQL and then retrieve a vo with a  
Date datatype i get the following message:

TypeError: Error #1034: Type Coercion failed: cannot convert  
1970-01-01 to Date.

So, I need to format the date in someway so that flex can deserialize  
it properly. Any insight would be greatly appreciated (am coming  
from .net land so new to both PHP and as3).

Cheers,
Nik


Re: [flexcoders] AMFPHP and date/datetime data from MySQL

2008-09-03 Thread Jason Reynolds
Adobe has some date parsing methods in the as3corelib library -- 
http://code.google.com/p/as3corelib/

I suppose it depends on the format your storing the date, the way I've been 
handling it is using as3 to parse the date string that AMF returns. Not sure if 
this is the best way, I'd be open to a better one!

Hope that helps, I can attempt to help more if it doesn't. I've been using 
AMFPHP for awhile now... would be nice to make any contacts that use it!

  - Original Message - 
  From: Nik Derewianka 
  To: flexcoders@yahoogroups.com 
  Sent: Wednesday, September 03, 2008 6:00 AM
  Subject: [flexcoders] AMFPHP and date/datetime data from MySQL


  Hi All,

  Could anyone enlighten me as to how i should send and retrieve date 
  and datetime data for inserting into MySQL via amfphp (1.9) with value 
  objects ?

  If i edit the data directly in MySQL and then retrieve a vo with a 
  Date datatype i get the following message:

  TypeError: Error #1034: Type Coercion failed: cannot convert 
  1970-01-01 to Date.

  So, I need to format the date in someway so that flex can deserialize 
  it properly. Any insight would be greatly appreciated (am coming 
  from .net land so new to both PHP and as3).

  Cheers,
  Nik


   

  __ Information from ESET NOD32 Antivirus, version of virus signature 
database 3411 (20080903) __

  The message was checked by ESET NOD32 Antivirus.

  http://www.eset.com


Re: [flexcoders] AMFPHP and date/datetime data from MySQL

2008-09-03 Thread Nik Derewianka


On 04/09/2008, at 12:01 AM, Jason Reynolds wrote:


Adobe has some date parsing methods in the as3corelib library -- 
http://code.google.com/p/as3corelib/

I suppose it depends on the format your storing the date, the way  
I've been handling it is using as3 to parse the date string that AMF  
returns. Not sure if this is the best way, I'd be open to a better  
one!


Yeah, I am at the point where i will try populating the string of the  
date (php side) in a throw away prop and then on successful load  
coerce it into a true date object in the real prop that is then used  
for binding.  But was hoping that if i got it in the right format  
serverside then the amf deserialization would just take care of it  
without having to write the converter code.  The MySQL columns are  
date and datetime so there shouldn't be anything funky going on with  
the storage.


 Hope that helps, I can attempt to help more if it doesn't. I've  
been using AMFPHP for awhile now... would be nice to make any  
contacts that use it!


Heh - i'll just say that it has been an... adventurous... experience  
getting upto speed on amfphp (or remoting of any kind for that  
matter).  But now that it is mostly working, it is pretty sweet.  I  
just hope to get the time to write up a comprehensive overview of all  
the pitfalls and assorted tidbits i found all over the net.


Cheers,
Nik

Re: [flexcoders] AMFPHP and date/datetime data from MySQL

2008-09-03 Thread Sajid Hussain
Guys , 
I also need some help on this thing I m not getting exactly how to get this 
thing solved
if is there any way to transform flex date objects to php through amfphp ,same 
as reverse it will be great

right now I m storing date in php as dateandtime object and fetching as string 
into flex but it get transform into this 

date strored in mysql 2001-12-13
in flex as string it comees like this : 12/13/01

Any sugestion how to have this as in corect way or if I could convert 
12/13/01 this string to dateobject 

Sajid




- Original Message 
From: Nik Derewianka [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, September 3, 2008 4:31:25 PM
Subject: Re: [flexcoders] AMFPHP and date/datetime data from MySQL




On 04/09/2008, at 12:01 AM, Jason Reynolds wrote:

Adobe has some date parsing methods in the as3corelib library -- http://code. 
google.com/ p/as3corelib/
 
I suppose it depends on the format your storing the date, the way I've been 
handling it is using as3 to parse the date string that AMF returns. Not sure if 
this is the best way, I'd be open to a better one!

Yeah, I am at the point where i will try populating the string of the date (php 
side) in a throw away prop and then on successful load coerce it into a true 
date object in the real prop that is then used for binding.  But was hoping 
that if i got it in the right format serverside then the amf deserialization 
would just take care of it without having to write the converter code.  The 
MySQL columns are date and datetime so there shouldn't be anything funky going 
on with the storage.

 Hope that helps, I can attempt to help more if it doesn't. I've been using 
AMFPHP for awhile now... would be nice to make any contacts that use it!

Heh - i'll just say that it has been an... adventurous. .. experience getting 
upto speed on amfphp (or remoting of any kind for that matter).  But now that 
it is mostly working, it is pretty sweet.  I just hope to get the time to write 
up a comprehensive overview of all the pitfalls and assorted tidbits i found 
all over the net.

Cheers,
Nik


  

Re: [flexcoders] AMFPHP and date/datetime data from MySQL

2008-09-03 Thread Sajid Hussain
Guys , 
I also need some help on this thing I m not getting exactly how to get this 
thing solved
if is there any way to transform flex date objects to php through amfphp ,same 
as reverse it will be great

right now I m storing date in php as dateandtime object and fetching as string 
into flex but it get transform into this 

date strored in mysql 2001-12-13
in flex as string it comees like this : 12/13/01

Any sugestion how to have this as in corect way or if I could convert 
12/13/01 this string to dateobject 

Sajid




- Original Message 
From: Nik Derewianka [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, September 3, 2008 4:31:25 PM
Subject: Re: [flexcoders] AMFPHP and date/datetime data from MySQL




On 04/09/2008, at 12:01 AM, Jason Reynolds wrote:

Adobe has some date parsing methods in the as3corelib library -- http://code. 
google.com/ p/as3corelib/
 
I suppose it depends on the format your storing the date, the way I've been 
handling it is using as3 to parse the date string that AMF returns. Not sure if 
this is the best way, I'd be open to a better one!

Yeah, I am at the point where i will try populating the string of the date (php 
side) in a throw away prop and then on successful load coerce it into a true 
date object in the real prop that is then used for binding.  But was hoping 
that if i got it in the right format serverside then the amf deserialization 
would just take care of it without having to write the converter code.  The 
MySQL columns are date and datetime so there shouldn't be anything funky going 
on with the storage.

 Hope that helps, I can attempt to help more if it doesn't. I've been using 
AMFPHP for awhile now... would be nice to make any contacts that use it!

Heh - i'll just say that it has been an... adventurous. .. experience getting 
upto speed on amfphp (or remoting of any kind for that matter).  But now that 
it is mostly working, it is pretty sweet.  I just hope to get the time to write 
up a comprehensive overview of all the pitfalls and assorted tidbits i found 
all over the net.

Cheers,
Nik


  

[flexcoders] amfphp value objects...

2008-07-04 Thread [p e r c e p t i c o n]
Hi all,
I'm hoping you guys can sort me out...

I'm trying to pass a value object to a service using amfphp but the object
isn't being mapped... passing strings works fine but objects are another
story...

here's my method table:

someFunction = array(
description = do something',
access = remote,
arguments = array(someObj = array(type =
vo.com.valueObjects.SomeClass, required = true))
)


and here's my function...


function someFunction($someObj)
{
require_once ('vo/com/valueObjects/SomeClass.php');

$a = $this-dbClass-DBInsertSomething($someObj);

return $a;

}

the method is being called because it is inserting a bunch of nothing into
the database...the object has no values it seems...
can anyone steer me in the right direction

thanks

percy


Re: [flexcoders] amfphp value objects...

2008-07-04 Thread Daniel Gerep
Hi Percy.

When I return a Object value to my application with AMFPHP (I suppose you
use AMFPHP or similar), I do just the way you're doin', when I test my
class, it shows me what I am receiving as a return value. Test it and see if
you're really sending a object type.

And you gotta set the same class in your ActionScript files.
Try this [
http://www.sephiroth.it/tutorials/flashPHP/flex_remoteobject/index.php], it
may help you ;-)

Sorry for any typos, my english is not good!

-- 
At.
Daniel Gerep
Célula Digital Software - www.celuladigital.com.br


Re: [flexcoders] amfphp value objects...

2008-07-04 Thread [p e r c e p t i c o n]
Hi Daniel,
I'm going to try this...
thanks

p

On Fri, Jul 4, 2008 at 6:22 PM, Daniel Gerep [EMAIL PROTECTED]
wrote:

   Hi Percy.

 When I return a Object value to my application with AMFPHP (I suppose you
 use AMFPHP or similar), I do just the way you're doin', when I test my
 class, it shows me what I am receiving as a return value. Test it and see if
 you're really sending a object type.

 And you gotta set the same class in your ActionScript files.
 Try this [
 http://www.sephiroth.it/tutorials/flashPHP/flex_remoteobject/index.php],
 it may help you ;-)

 Sorry for any typos, my english is not good!

 --
 At.
 Daniel Gerep
 Célula Digital Software - www.celuladigital.com.br
  



[flexcoders] AMFPHP Client.Error.DeliveryInDoubt Error

2008-06-03 Thread valdhor
I have been using RemoteObjects for quite a while now with AMFPHP.
Suddenly, I am getting the error:

Client.Error.DeliveryInDoubt Error
Channel disconnected

This error seems to crop up quite a bit but there has never been any
definitive answer as to why or what the fix is.

The particular RemoteObject call has been working fine and nothing has
been changed in the way that it is called from Flex. Other
RemoteObject calls still work as they did before.

I found a blog post at
http://www.sephiroth.it/weblog/archives/2007/10/amfphp_and_mbstring.php
that possibly explained the error but nothing in that post helped.

Using Charles and what I know about the way Flex sends HTTP data
(http://tech.groups.yahoo.com/group/flexcoders/message/113914) I see
Flex batch up a set of HTTP calls. First it sends an
flex.messaging.messages.CommandMessage with a value of 5; Then it
sends all the batched up flex.messaging.messages.RemotingMessage
messages with values that are the names of the functions to call on
the server.

Now, when the error occurs, the value of the
flex.messaging.messages.CommandMessage is 12. Looking at the AMFPHP
code (Actually in amfphp/core/amf/app/Actions.php) there is no
handling for a value of 12 so the message is not handled and the code
tries to load Amf3Broker.php which does not exist anywhere. This is
what generates the Client.Error.DeliveryInDoubt Error.

The strange thing is that I have seen this CommandMessage of 12 in
Charles and the call has been successful.


Anyway, does anyone know why this error message is generated and how
to fix it?



[flexcoders] AMFPHP Dates?

2008-04-29 Thread David C. Moody
Using AMFPHP 1.9beta2...

I have a function in an AMFPHP Service like this:

 function getEditorListing($startDate = '', $endDate = '', $type = 1) 
{
  if ($startDate == '') return StartDate Required;
  if ($endDate == '') return EndDate Required;
  $startTime = strtotime($startDate .  00:00:00);
  $endTime = strtotime($endDate .  23:59:59);
NetDebug::trace($startDate);
NetDebug::trace($startTime);
NetDebug::trace($endDate);
NetDebug::trace($endTime);
}

Using the AMFPHP service browser or Flex if I send 04/20/2008 for 
startdate  04/22/2008 for enddate  1 for type.

My trace show this:
4
false
4
false 

How can I pass Date's to AMFPHP? I've tried all combinations I know 
of?

Thanks,
-David




[flexcoders] AMFPHP Examples now available for Flex

2008-04-27 Thread Alan Gruskoff
I have interest in database work with MySQL/PHP so looked at the
AMFPHP product. I tried the AMFPHP examples in Flash, which worked
fine. Being disappointed the Flex examples were missing I decided to
go ahead and make my own. So I did.

At this web address: http://digitalshowcase.biz/flex/examples/AMFPHP/

you will find 3 of the first AMFPHP examples in Flex mxml mode, with a
bit of my own internal comments about how things work together.

As was my main interest, I migrated a MySQL Read example, in its own
directory as above, with a Product.sql file and a screen shot that
helped me see where and what the result object looked like.

Feel free to use these items as your own starting point.
- Alan Gruskoff




[flexcoders] AMFPHP with NetConnection or RemoteObject ?

2008-03-25 Thread Mario Falomir
Hi, which approach it is better for AMFPHP Flash Remoting, to use
flash.net.NetConnection or the Flex Framework RemoteObject component? Are
there any advantages/disadvatages from one over the other?

Regards,
Mario


Re: [flexcoders] AMFPHP with NetConnection or RemoteObject ?

2008-03-25 Thread Aaron Miller
The page on the AMFPHP 1.9 beta release recommends using RemoteObject. When
using NetConnection, for some reason AMFPHP uses AMF0 instead of AMF3.
Someone else on this list ran into a problem with this when returning a
record set from their service. AS3 no longer supports the RecordSet class,
but if you used RemoteObject instead it would send it back as an
ArrayCollection over AMF3.

I've been tinkering around with NetConnection seeing if I can get a work
around for this, but have been unsuccessful so far.

Hope this helps,

~Aaron

On Tue, Mar 25, 2008 at 3:17 PM, Mario Falomir [EMAIL PROTECTED] wrote:

   Hi, which approach it is better for AMFPHP Flash Remoting, to use
 flash.net.NetConnection or the Flex Framework RemoteObject component? Are
 there any advantages/disadvatages from one over the other?

 Regards,
 Mario
  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] AMFPHP with NetConnection or RemoteObject ?

2008-03-25 Thread Mario Falomir
Thanks for the info Aaron :)

On Tue, Mar 25, 2008 at 4:07 PM, Aaron Miller 
[EMAIL PROTECTED] wrote:

   The page on the AMFPHP 1.9 beta release recommends using RemoteObject.
 When using NetConnection, for some reason AMFPHP uses AMF0 instead of AMF3.
 Someone else on this list ran into a problem with this when returning a
 record set from their service. AS3 no longer supports the RecordSet class,
 but if you used RemoteObject instead it would send it back as an
 ArrayCollection over AMF3.

 I've been tinkering around with NetConnection seeing if I can get a work
 around for this, but have been unsuccessful so far.

 Hope this helps,

 ~Aaron


 On Tue, Mar 25, 2008 at 3:17 PM, Mario Falomir [EMAIL PROTECTED]
 wrote:

Hi, which approach it is better for AMFPHP Flash Remoting, to use
  flash.net.NetConnection or the Flex Framework RemoteObject component?
  Are there any advantages/disadvatages from one over the other?
 
  Regards,
  Mario
 



 --
 Aaron Miller
 Chief Technology Officer
 Open Base Interactive, LLC.
 [EMAIL PROTECTED]
 http://www.openbaseinteractive.com
 



[flexcoders] AMFPHP MySQL Results Object

2008-03-24 Thread Daniel Tse
Hi All,

I have setup AMFPHP and it returns back the recordset object from a MySQL
query. I was wondering how I access that array/recordset from the flex side.

e.g. I have the following:

?php
//In the services directory of AMFPHP
class SimplePerson {
function getPeople() {
   $mysql = mysql_connect(localhost, root, root);

 mysql_select_db( people-test );

 $sSQL = SELECT * FROM `tblPeople`;

 $results =  mysql_query($sSQL);

return $results;
}
}

?

In Flex..
   public function getPeople():void {
myService.connect(REMOTESERVERURL);

var responder:Responder = new Responder(getPeople_Result,
onFault);
myService.call(SimplePerson.getPeople, responder);

}

public function
getPeople_Result(aoResults:WHAT_SHOULD_GO_HERE):void
{
//test;
//I'd like to access the result set e.g. iterate through the
rows looking at certain columns
}

Array doesn't seem to work (the fact that it's a 1-dimensional array
doesn't help)
XMLList the object doesn't seem to map like that either

Am I missing some kind of object?

Thanks,
-Daniel
-- 
-
e: [EMAIL PROTECTED]
w: http://DanielTse.com/
-


Re: [flexcoders] AMFPHP MySQL Results Object

2008-03-24 Thread Aaron Miller
I always set the return result as Object in my handler then type it as the
specific class later in the function. I'm not sure if I do this out of habit
or necessity.

# private function handleResult( result:Object ): void {
#   var collection:ArrayCollection = result as ArrayCollection;
# }

Also notice that I used ArrayCollection. If I remember correctly, record
sets get returned as an ArrayCollection. If I am mistaken, try the above
with a standard Array.

Hope this helps,
~Aaron

On Mon, Mar 24, 2008 at 3:07 PM, Daniel Tse [EMAIL PROTECTED] wrote:

   Hi All,

 I have setup AMFPHP and it returns back the recordset object from a MySQL
 query. I was wondering how I access that array/recordset from the flex side.

 e.g. I have the following:

 ?php
 //In the services directory of AMFPHP
 class SimplePerson {
 function getPeople() {
$mysql = mysql_connect(localhost, root, root);

  mysql_select_db( people-test );

  $sSQL = SELECT * FROM `tblPeople`;

  $results =  mysql_query($sSQL);

 return $results;
 }
 }

 ?

 In Flex..
public function getPeople():void {
 myService.connect(REMOTESERVERURL);

 var responder:Responder = new Responder(getPeople_Result,
 onFault);
 myService.call(SimplePerson.getPeople, responder);

 }

 public function
 getPeople_Result(aoResults:WHAT_SHOULD_GO_HERE):void
 {
 //test;
 //I'd like to access the result set e.g. iterate through
 the rows looking at certain columns
 }

 Array doesn't seem to work (the fact that it's a 1-dimensional array
 doesn't help)
 XMLList the object doesn't seem to map like that either

 Am I missing some kind of object?

 Thanks,
 -Daniel
 --
 -
 e: [EMAIL PROTECTED]
 w: http://DanielTse.com/
 -
  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] AMFPHP MySQL Results Object

2008-03-24 Thread Daniel Tse
Thanks Aaron!

I'm still a bit unsure about referencing the individual items then.

after I have collection... how do I actually access each row/column?

I tried to find out the length or number of rows by going
collection.length... it didn't seem to like that at all.

-Daniel

On Mon, Mar 24, 2008 at 4:20 PM, Aaron Miller 
[EMAIL PROTECTED] wrote:

   I always set the return result as Object in my handler then type it as
 the specific class later in the function. I'm not sure if I do this out of
 habit or necessity.

 # private function handleResult( result:Object ): void {
 #   var collection:ArrayCollection = result as ArrayCollection;
 # }

 Also notice that I used ArrayCollection. If I remember correctly, record
 sets get returned as an ArrayCollection. If I am mistaken, try the above
 with a standard Array.

 Hope this helps,
 ~Aaron


 On Mon, Mar 24, 2008 at 3:07 PM, Daniel Tse [EMAIL PROTECTED] wrote:

Hi All,
 
  I have setup AMFPHP and it returns back the recordset object from a
  MySQL query. I was wondering how I access that array/recordset from the flex
  side.
 
  e.g. I have the following:
 
  ?php
  //In the services directory of AMFPHP
  class SimplePerson {
  function getPeople() {
 $mysql = mysql_connect(localhost, root, root);
 
   mysql_select_db( people-test );
 
   $sSQL = SELECT * FROM `tblPeople`;
 
   $results =  mysql_query($sSQL);
 
  return $results;
  }
  }
 
  ?
 
  In Flex..
 public function getPeople():void {
  myService.connect(REMOTESERVERURL);
 
  var responder:Responder = new
  Responder(getPeople_Result, onFault);
  myService.call(SimplePerson.getPeople, responder);
 
  }
 
  public function
  getPeople_Result(aoResults:WHAT_SHOULD_GO_HERE):void
  {
  //test;
  //I'd like to access the result set e.g. iterate through
  the rows looking at certain columns
  }
 
  Array doesn't seem to work (the fact that it's a 1-dimensional array
  doesn't help)
  XMLList the object doesn't seem to map like that either
 
  Am I missing some kind of object?
 
  Thanks,
  -Daniel
  --
  -
  e: [EMAIL PROTECTED]
  w: http://DanielTse.com/
  -
 



 --
 Aaron Miller
 Chief Technology Officer
 Open Base Interactive, LLC.
 [EMAIL PROTECTED]
 http://www.openbaseinteractive.com
 




-- 
-
e: [EMAIL PROTECTED]
w: http://DanielTse.com/
-


[flexcoders] AMFPHP returning XML

2008-03-06 Thread Kevin Aebig
Hey all,

 

I've got a method I just added that returns back an XML string, but for some
reason it's now throwing an error of AMFPHP_INEXISTANT_METHOD which makes no
sense as the method has been verified otherways.

 

I've got about 15 other methods in place and working, so the install is good
and functional. I've verified that it's not some kind of caching issue by
renaming the method and the call to something different and yet the error
persists. As well, I've found other people online with the same unresolved
issue. 

 

Has anyone returned back an XML tree string through AMFPHP 1.9 and did you
have any difficulties? 

Cheers,

 

!k



Re: [flexcoders] AMFPHP returning XML

2008-03-06 Thread [p e r c e p t i c o n]
it sounds like a typo in your actionscript...i'm doing that very thing at
the moment(returning an xml string using amfphp)
p

On Thu, Mar 6, 2008 at 8:27 AM, Kevin Aebig [EMAIL PROTECTED] wrote:

Hey all,



 I've got a method I just added that returns back an XML string, but for
 some reason it's now throwing an error of AMFPHP_INEXISTANT_METHOD which
 makes no sense as the method has been verified otherways.



 I've got about 15 other methods in place and working, so the install is
 good and functional. I've verified that it's not some kind of caching issue
 by renaming the method and the call to something different and yet the error
 persists. As well, I've found other people online with the same unresolved
 issue.



 Has anyone returned back an XML tree string through AMFPHP 1.9 and did you
 have any difficulties?

 Cheers,



 !k
  



RE: [flexcoders] AMFPHP returning XML

2008-03-06 Thread Kevin Aebig
That's the funny part. I've check the name of the method and the call about
300 times because that's what it's complaining about, but it's all right.
Would you mind publishing your service method?

 

!k

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [p e r c e p t i c o n]
Sent: Thursday, March 06, 2008 10:32 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AMFPHP returning XML

 

it sounds like a typo in your actionscript...i'm doing that very thing at
the moment(returning an xml string using amfphp)
p

On Thu, Mar 6, 2008 at 8:27 AM, Kevin Aebig [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] com wrote:

Hey all,

 

I've got a method I just added that returns back an XML string, but for some
reason it's now throwing an error of AMFPHP_INEXISTANT_METHOD which makes no
sense as the method has been verified otherways.

 

I've got about 15 other methods in place and working, so the install is good
and functional. I've verified that it's not some kind of caching issue by
renaming the method and the call to something different and yet the error
persists. As well, I've found other people online with the same unresolved
issue. 

 

Has anyone returned back an XML tree string through AMFPHP 1.9 and did you
have any difficulties? 

Cheers,

 

!k

 

 



Re: [flexcoders] AMFPHP returning XML

2008-03-06 Thread [p e r c e p t i c o n]
sureit's pretty long so i'll give you an abbreviationhere's how the
constructor is setup...


function appointmentDataService ()
{
// Define the methodTable for this class in the constructor
$this-methodTable = array(
 getAppointmentData = array(
description = get data from event table,
access = remote
),

updateAppointment = array(
description = update an appointment,
access = remote
),

deleteAppointment = array(
description = delete an appointment,
access = remote
),

getLocationDetails = array(
description = delete an appointment location',
access = remote
),

getAppointmentDetails = array(
description = delete an appointment details',
access = remote
),

   .
   .
   .
   .


);

$this-dbClass = new DBClass();


}

and this is the method...


 /***
 * FUNCTION: getAppointmentData( )
 *
 * DESCRIPTION: Returns a list of Appointments
 *
 * RETURNED: xml string
 **/
function getAppointmentData($uin)
{
// Do the query, return the record or null
$taskList =  $this-dbClass-DBGetAppointmentData( $uin);

 $content = '?xml version=1.0 standalone=yes?' .
\nkeepmeposted\n;


  $content .= tasklist\n;

  if ( $taskList  count( $taskList )  0 )
  {
for ( $j = 0; $j  count( $taskList) ; $j++ )
{
  $content .= task id=\ . $taskList[ $j ][ id ] . \  .
state=\ . $taskList[ $j ][ state ] . \  . \n;

  $content .= sstart;
  $content .= date .
date( n-d-y, $taskList[ $j ][ start ] ) .
  /date\n;
  $content .= time .
date( g:i  a, $taskList[ $j ][ start ] ) .
  /time;
  $content .= /sstart\n;

  $content .= name;
  $content .=$taskList[ $j ][ name ];
  $content .= /name\n;

  $content .= /task\n;
}
  }
  else
  {
$content .= No Appointments.;
  }

  $content .= /tasklist\n;
  $content .= /keepmeposted\n;

 return  $content;
}

if it's not in the actionscript then it has to be in the method table then
right??
p

On Thu, Mar 6, 2008 at 9:03 AM, Kevin Aebig [EMAIL PROTECTED] wrote:

That's the funny part. I've check the name of the method and the call
 about 300 times because that's what it's complaining about, but it's all
 right. Would you mind publishing your service method?



 !k


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *[p e r c e p t i c o n]
 *Sent:* Thursday, March 06, 2008 10:32 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] AMFPHP returning XML



 it sounds like a typo in your actionscript...i'm doing that very thing at
 the moment(returning an xml string using amfphp)
 p

 On Thu, Mar 6, 2008 at 8:27 AM, Kevin Aebig [EMAIL PROTECTED] wrote:

 Hey all,



 I've got a method I just added that returns back an XML string, but for
 some reason it's now throwing an error of AMFPHP_INEXISTANT_METHOD which
 makes no sense as the method has been verified otherways.



 I've got about 15 other methods in place and working, so the install is
 good and functional. I've verified that it's not some kind of caching issue
 by renaming the method and the call to something different and yet the error
 persists. As well, I've found other people online with the same unresolved
 issue.



 Has anyone returned back an XML tree string through AMFPHP 1.9 and did you
 have any difficulties?

 Cheers,



 !k



  



RE: [flexcoders] AMFPHP returning XML

2008-03-06 Thread Kevin Aebig
I'm using a newer version of AMFPHP that doesn't have the method table
anymore. It assumes all methods are public unless they have a private
definition inside the service class.

 

But your example did give me some idea's.

 

Thanks,

 

!k

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [p e r c e p t i c o n]
Sent: Thursday, March 06, 2008 1:21 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AMFPHP returning XML

 

sureit's pretty long so i'll give you an abbreviationhere's how the
constructor is setup...


function appointmentDataService ()
{
// Define the methodTable for this class in the constructor
$this-methodTable = array(
 getAppointmentData = array(
description = get data from event table,
access = remote
),

updateAppointment = array(
description = update an appointment,
access = remote
),

deleteAppointment = array(
description = delete an appointment,
access = remote
),

getLocationDetails = array(
description = delete an appointment location',
access = remote
),

getAppointmentDetails = array(
description = delete an appointment details',
access = remote
),

   .
   .
   .
   .


);

$this-dbClass = new DBClass();


}

and this is the method...


 /***
 * FUNCTION: getAppointmentData( )
 *
 * DESCRIPTION: Returns a list of Appointments
 *
 * RETURNED: xml string
 **/
function getAppointmentData($uin)
{
// Do the query, return the record or null
$taskList =  $this-dbClass-DBGetAppointmentData( $uin);

 $content = '?xml version=1.0 standalone=yes?' .
\nkeepmeposted\n;


  $content .= tasklist\n;

  if ( $taskList  count( $taskList )  0 )
  {
for ( $j = 0; $j  count( $taskList) ; $j++ )
{
  $content .= task id=\ . $taskList[ $j ][ id ] . \  .
state=\ . $taskList[ $j ][ state ] . \  . \n;

  $content .= sstart;
  $content .= date .
date( n-d-y, $taskList[ $j ][ start ] ) .
  /date\n;
  $content .= time .
date( g:i  a, $taskList[ $j ][ start ] ) .
  /time;
  $content .= /sstart\n;

  $content .= name;
  $content .=$taskList[ $j ][ name ];
  $content .= /name\n;

  $content .= /task\n;
}
  }
  else
  {
$content .= No Appointments.;
  }

  $content .= /tasklist\n;
  $content .= /keepmeposted\n;

 return  $content;
}

if it's not in the actionscript then it has to be in the method table then
right??
p

On Thu, Mar 6, 2008 at 9:03 AM, Kevin Aebig [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] com wrote:

That's the funny part. I've check the name of the method and the call about
300 times because that's what it's complaining about, but it's all right.
Would you mind publishing your service method?

 

!k

 

  _  

From: [EMAIL PROTECTED] mailto:flexcoders@yahoogroups.com ups.com
[mailto:[EMAIL PROTECTED] mailto:flexcoders@yahoogroups.com ups.com] On
Behalf Of [p e r c e p t i c o n]
Sent: Thursday, March 06, 2008 10:32 AM
To: [EMAIL PROTECTED] mailto:flexcoders@yahoogroups.com ups.com
Subject: Re: [flexcoders] AMFPHP returning XML

 

it sounds like a typo in your actionscript...i'm doing that very thing at
the moment(returning an xml string using amfphp)
p

On Thu, Mar 6, 2008 at 8:27 AM, Kevin Aebig [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] com wrote:

Hey all,

 

I've got a method I just added that returns back an XML string, but for some
reason it's now throwing an error of AMFPHP_INEXISTANT_METHOD which makes no
sense as the method has been verified otherways.

 

I've got about 15 other methods in place and working, so the install is good
and functional. I've verified that it's not some kind of caching issue by
renaming the method and the call to something different and yet the error
persists. As well, I've found other people online with the same unresolved
issue. 

 

Has anyone returned back an XML tree string through AMFPHP 1.9 and did you
have any difficulties? 

Cheers,

 

!k

 

 

 



[flexcoders] amfphp and complex where clauses in queries

2008-02-02 Thread rogerhoward
Hi, first post to this list - just really getting my groove on with  
Flex and amfphp and have a question (obviously):

- I've built a PHP class (and amfphp service) containing a method used  
to generate a MySQL SELECT, returning the results to Flex via amfphp
- The method has several optional parameters which are used to  
generate additional where clauses (each value representing a column to  
filter on) for the SELECT to refine the selected rows;
- My initial method assumed the comparator for each of the columns is  
= but now I want to add additional comparators - for instance,  
search for rows whose colA  1

In other words

Using a method like:
function doQuery($colA,$colB,$colC)

Calling it like:
doQuery(1, g,biv)

To generate a query such as:
select * from tableName where (colA=1 and colB=g and colC=biv)

Now I want to be able to optionally change the comparator for each  
parameter.

I'm having an internal debate about how best to send the comparator(s)  
to my method for each comparison and see three obvious routes, none of  
which I like much, and wonder if there's a cleaner way:

1. pass the comparator as part of the value... just don't like this  
approach as I don't like mixing values and operators:

doQuery(1, =g,=biv)

2. Add an extra parameter for each column to my method... just uglies  
things up quick:

doQuery(, 1, =, g,=, biv)

3. Generate the whole darn SQL statement in Flex and pass it as a  
single parameter to my method (this is not something I would do, I'd  
go with either route above first - just putting it out there as an  
obvious option):

doQuery(select * from tableName where (colA=1 and colB=g and  
colC=biv))

Thoughts?

-Roger Howard


Re: [flexcoders] amfphp and complex where clauses in queries

2008-02-02 Thread Jhonny Everson
Hi,  I don't know if it's a good approach, here how I would do:

Use an array of objects, each containing column name, operator and value.
The method doQuery can have only one argument, an array. Then you can build
the statement based on values passed. If the array is null, it would mean
select everything.


-- 
Jhonny Everson


[flexcoders] AMFPHP n security sandbox violation

2008-01-31 Thread YOGESH JADHAV
Hi all,
   I am using amfphp 1.9 to retrieve/send data from a database
for my flex app. It was working ok in LAN, but when i hosted it on server ,
whenever i call amfphp service it gives me error
Error #2044: Unhandled SecurityErrorEvent:. text=Error #2048: Security
sandbox violation:

 i did necessary port forwarding , url changes , checked security settings
on my wamp server but cant find anything. Any pointers ?

-- 


Regards,
Yogesh


[flexcoders] AMFPHP 2.0 beta ?

2007-12-19 Thread Sajid Hussain
Hello , 
with cureent browse of http://amf-php.org/ , it seems amfphp working going to 
do something more abt lcds formaly FDS , it seems thy dint give amfphp 2 for 
download , 
here amf-php code developers also exist so my question is from them that how 
much effort it will took to migration from amfphp 1.9 to amfphp 2 with FDS or 
messaging ? 

sajid



  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

[flexcoders] AMFPHP 1.9B : Using ADODB5 to get UTF-8 data from MSSQL

2007-11-19 Thread oneproofdk
Hi Guys - I know that this is NOT a PHP forum, but I feel that some of
you use AMFPHP extensively, so I thought I'd give it a try.

I have just started to use AMFPHP as a backend for Flex2 projects.  
When I connect to MySQL databases it is just perfect and fast - great. 
 
Now I need to connect to a MS SQL Server 2000, it is a sql server used
by a MS Dynamics Navision installation.
The data stored are stored in a non UTF-8 charset and database names
include stupid names like [DK idé-nyt as$Insertion] where the sql
driver stumbles on the ´

When I use ADODB in PHP and json_encode the result, it works fine. 

When I try to use the following code in AMFPHP, the service browser
fails with a Flex error. 
 
What can I do, to make this work ? 
 
I'm quite new to PHP also, so please be gentle if you can :-) 
 
Thanks for any help you might provide. 

Thanks and sorry for this semi non-flex question 
Mark 
 
/ Begin PHP snippet ***/ 
include_once('adodb5/adodb.inc.php'); 
 
$db = ADONewConnection('odbc_mssql'); 
$DB-charSet = 'utf-8'; 
$dsn = Driver={SQL Server};Server=10.45.2.33;Database=BRM;; 
$db-Connect($dsn,'pfs','youbet'); 
$db-SetFetchMode(ADODB_FETCH_ASSOC); 
 
class ars {  
function ars () { 
/** 
Constructor function 
*/ 
}  
/** 
* Function getCustomer returnsinfo about cutomer 
* select top 100 * from [DK idé-nyt as$Customer]; 
* @access remote 
**/ 
 
function getCustomer ()  
{ 
global $db; 
$arr = array(); 
$sql = select top 100 * from [DK idé-nyt as$Customer];; 
$rs = $db-Execute($sql); 
return $rs; 
}  
}




Re: [flexcoders] AMFPHP 1.9 security problem

2007-11-14 Thread Adnan Doric
danielvlopes wrote:
 Hello, i'm using amfphp 1.9 beta2 to make comunication between php and
 flex, but i had some question about security when use amfphp...

 If someone discover the name of my methods in my classes inside
 services amfphp folder and point your flex app to my gateway using
 absolut path the invader can use my methods.

 Exist some way to use password to use gateway or don't accept absolute
 paths or better way to fix this problem???

 Thanks.


   
Hello,

You can use MD5 or SHA1 from corelib for example to generate a unique 
key to be recognized on PHP side. You should use PHP sessions too so you 
can store session id in database and pass session id to flex using 
flashvars (just an example).

cheers,
Adnan


RE: [flexcoders] AMFPHP Flex 3 Beta

2007-11-02 Thread Kevin Aebig
Well I've exposed a dump of the actionscript object easily enough that's
being returned and the object in PHP is just a result from a MySQL query.

 

I can get at the data currently, but if you notice down below, there aren't
any named references for the columns, which make it nearly impossible to
using bindings.

 

public function getProjects():void

{

  amfConnection.call( Something.getProjects, new
Responder(getProjectsOnResult, OnFault), userInfo.uid);

}

  

public function getProjectsOnResult( result:Object ) : void

{

var projectDP:ArrayCollection = new ArrayCollection();

  for( var i in result.serverInfo.initialData) {

   var name:String = result.serverInfo.initialData[i][3];

   var pid:String = result.serverInfo.initialData[i][0];

   projectDP.addItem({name:name, pid:pid});

  }

  projects.labelField = name;

  projects.dataProvider = projectDP;

}

 

The old phrase of If it ain't broke, don't fix it comes to mind when I see
whats being returned ala AMF3. Any suggestions you can make would be greatly
appreciated.

 

Cheers,

 

Kevin

 

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Samuel R. Neff
Sent: Thursday, November 01, 2007 2:14 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] AMFPHP  Flex 3 Beta

 

 

We use Fluorine and NetConnection directly.. much smaller than using the mx
rpc classes and is more future proof since NetConnection is built into the
player and won't change whereas rpc classes don't even have source available
and have a history of breaking stuff in hotfixes with 3rd party AMF
implementations.

 

I don't think any of the proper wrappers of NetConnection provide data
reformatting for AMF--that's provided by the player.  With Fluorine we
certainly don't see things coming back ugly or restructured.  So perhaps the
better quest to ask is to show a dump of the data in PHP and then in AS3 and
ask for how to get it to what you want (stating what you want of course).

 

HTH,

 

Sam

 

---
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
  

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin Aebig
Sent: Thursday, November 01, 2007 11:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AMFPHP  Flex 3 Beta

 

Hey all,

 

I've seen all kinds of posts and suggestions from people online suggesting
various ways to connect to an AMFPHP service, but I want to do it the
*proper* way. I'm somewhat old school and have made connections with
NetConnection, but the data that comes back from a MySQL result is ugly and
has obviously been restructured. 

 

What's the best way and can someone provide an example of using this method
in AS3?

 

Thanks for your time,

 

!k

 



RE: [flexcoders] AMFPHP Flex 3 Beta

2007-11-02 Thread Samuel R. Neff
 
ah, that's the format the old Flash Recordset class used so it makes sense
that AMFPHP would use the same format.  Fluorine provides support for both
that style and for ArrayCollection of Object instances which is more Flex
friendly.  My suggestion would be to create a Recordset implementation and
use that as a wrapper.  You can look at the Recordset.as file included with
Flash 8 remoting for hints on how it's done.  I'm actually surprised nobody
else has solved his problem already for AMFPHP.
 
HTH,
 
Sam
 

---
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
  

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin Aebig
Sent: Friday, November 02, 2007 3:46 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] AMFPHP  Flex 3 Beta



Well I've exposed a dump of the actionscript object easily enough that's
being returned and the object in PHP is just a result from a MySQL query.

 

I can get at the data currently, but if you notice down below, there aren't
any named references for the columns, which make it nearly impossible to
using bindings.

 

public function getProjects():void

{

  amfConnection.call( Something.getProjects, new
Responder(getProjectsOnResult, OnFault), userInfo.uid);

}

  

public function getProjectsOnResult( result:Object ) : void

{

var projectDP:ArrayCollection = new ArrayCollection();

  for( var i in result.serverInfo.initialData) {

   var name:String = result.serverInfo.initialData[i][3];

   var pid:String = result.serverInfo.initialData[i][0];

   projectDP.addItem({name:name, pid:pid});

  }

  projects.labelField = name;

  projects.dataProvider = projectDP;

}

 

The old phrase of If it ain't broke, don't fix it comes to mind when I see
whats being returned ala AMF3. Any suggestions you can make would be greatly
appreciated.

 

Cheers,

 

Kevin

 



RE: [flexcoders] AMFPHP Flex 3 Beta

2007-11-02 Thread Kevin Aebig
You and me both. Thanks a lot for your help. I'm going to look into whether
or not I've set up AMFPHP properly, as well as contact some of the develops
to see if perhaps I can hack away at the source to return back something
more useful. Wrapping the results is still on the chopping block though. so
at least I have options.

 

Cheers,

 

Kevin

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Samuel R. Neff
Sent: Friday, November 02, 2007 2:01 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] AMFPHP  Flex 3 Beta

 

 

ah, that's the format the old Flash Recordset class used so it makes sense
that AMFPHP would use the same format.  Fluorine provides support for both
that style and for ArrayCollection of Object instances which is more Flex
friendly.  My suggestion would be to create a Recordset implementation and
use that as a wrapper.  You can look at the Recordset.as file included with
Flash 8 remoting for hints on how it's done.  I'm actually surprised nobody
else has solved his problem already for AMFPHP.

 

HTH,

 

Sam

 

---
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
  

 

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin Aebig
Sent: Friday, November 02, 2007 3:46 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] AMFPHP  Flex 3 Beta

Well I've exposed a dump of the actionscript object easily enough that's
being returned and the object in PHP is just a result from a MySQL query.

 

I can get at the data currently, but if you notice down below, there aren't
any named references for the columns, which make it nearly impossible to
using bindings.

 

public function getProjects():void

{

  amfConnection.call( Something.getProjects, new
Responder(getProjectsOnResult, OnFault), userInfo.uid);

}

  

public function getProjectsOnResult( result:Object ) : void

{

var projectDP:ArrayCollection = new ArrayCollection();

  for( var i in result.serverInfo.initialData) {

   var name:String = result.serverInfo.initialData[i][3];

   var pid:String = result.serverInfo.initialData[i][0];

   projectDP.addItem({name:name, pid:pid});

  }

  projects.labelField = name;

  projects.dataProvider = projectDP;

}

 

The old phrase of If it ain't broke, don't fix it comes to mind when I see
whats being returned ala AMF3. Any suggestions you can make would be greatly
appreciated.

 

Cheers,

 

Kevin

 

 



[flexcoders] AMFPHP Flex 3 Beta

2007-11-01 Thread Kevin Aebig
Hey all,

 

I've seen all kinds of posts and suggestions from people online suggesting
various ways to connect to an AMFPHP service, but I want to do it the
*proper* way. I'm somewhat old school and have made connections with
NetConnection, but the data that comes back from a MySQL result is ugly and
has obviously been restructured. 

 

What's the best way and can someone provide an example of using this method
in AS3?

 

Thanks for your time,

 

!k



RE: [flexcoders] AMFPHP Flex 3 Beta

2007-11-01 Thread Kevin Aebig
And then there was silence. =]

 

In case someone actually responds back, an answer about what's happening
with credentials would be extremely helpful as well.

 

!k

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin Aebig
Sent: Thursday, November 01, 2007 11:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AMFPHP  Flex 3 Beta

 

Hey all,

 

I've seen all kinds of posts and suggestions from people online suggesting
various ways to connect to an AMFPHP service, but I want to do it the
*proper* way. I'm somewhat old school and have made connections with
NetConnection, but the data that comes back from a MySQL result is ugly and
has obviously been restructured. 

 

What's the best way and can someone provide an example of using this method
in AS3?

 

Thanks for your time,

 

!k

 



RE: [flexcoders] AMFPHP Flex 3 Beta

2007-11-01 Thread Samuel R. Neff
 
We use Fluorine and NetConnection directly.. much smaller than using the mx
rpc classes and is more future proof since NetConnection is built into the
player and won't change whereas rpc classes don't even have source available
and have a history of breaking stuff in hotfixes with 3rd party AMF
implementations.
 
I don't think any of the proper wrappers of NetConnection provide data
reformatting for AMF--that's provided by the player.  With Fluorine we
certainly don't see things coming back ugly or restructured.  So perhaps the
better quest to ask is to show a dump of the data in PHP and then in AS3 and
ask for how to get it to what you want (stating what you want of course).
 
HTH,
 
Sam
 

---
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
  

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin Aebig
Sent: Thursday, November 01, 2007 11:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AMFPHP  Flex 3 Beta

 

Hey all,

 

I've seen all kinds of posts and suggestions from people online suggesting
various ways to connect to an AMFPHP service, but I want to do it the
*proper* way. I'm somewhat old school and have made connections with
NetConnection, but the data that comes back from a MySQL result is ugly and
has obviously been restructured. 

 

What's the best way and can someone provide an example of using this method
in AS3?

 

Thanks for your time,

 

!k



[flexcoders] amfphp - flex - combobox

2007-06-07 Thread gambit_755
Question for someone.  Is there anyway to pass an array to flex from 
amfphp to a combobox.

I currenly do it by entering AS label and AS data in my mysql 
statement.  
example:
return mysql_query(SELECT ID AS data, CASE LastName WHEN ' ' THEN 
FirstName ELSE CONCAT(LastName,', ',FirstName) END AS label FROM 
clientdb ORDER BY LastName);

the problem I have is I want to do a stripslashes() on the first and 
last name and I can't figure out a way to pass the array back to flex 
with out looping through the array in flex and formating it for an 
combobox.

Is there a way to do an array passing in php passed back to flex like:
var promptStrings= array ({label:Select Color, data:-1},
{label:Warm Colors, data:-2},
{label:Cool Colors, data:-3});

I know you can't do the {} in php though.

hope I'm making sense.



[flexcoders] AMFPHP 1.9 / RemoteObject pass arguments

2007-03-29 Thread Rico Leuthold

Hi everybody,

I just started to use AMFPHP 1.9, which looks really promising.

But now I'm stuck ... should be very simple - but can't figure it  
out. How can I pass arguments in the mx:RemoteObject/ to the (AMF) 
PHP function ?


Thank's for answering ...





RE: [flexcoders] AMFPHP 1.9 / RemoteObject pass arguments

2007-03-29 Thread Petro Bochan
Hi,

 

This might get you started

 

http://blogs.adobe.com/mikepotter/flex/ (July 17, 2006)

 

Cheers,

Petro

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rico Leuthold
Sent: Thursday, March 29, 2007 5:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AMFPHP 1.9 / RemoteObject pass arguments

 

Hi everybody,

 

I just started to use AMFPHP 1.9, which looks really promising.

 

But now I'm stuck ... should be very simple - but can't figure it out.
How can I pass arguments in the mx:RemoteObject/ to the (AMF)PHP
function ?

 

Thank's for answering ...

 





 

 



[flexcoders] AMFPHP with multiple projects

2007-03-27 Thread Sergey Kovalyov

Hi All!

How do you usually use AMFPHP with multiple projects? May be creating
separate AMFPHP copy for each and every project or at least separate
gateway.php can help. Whatever, I have some projects from SVN in my
workspace and each of them has its own services codebase (let's say
workspace/[PROJECT_NAME]/php/) and they are referenced via
http://localhost/[PROJECT_NAME]/php/ after compilation, though single AMFPHP
installation at http://localhost/amfphp/ points to the only one services
folder. Are there any ideas how to make multiple projects with services
stored in different locations on localhost working with single AMFPHP
installation?

Thank you in advance.

Sergey.


Re: [flexcoders] amfphp problem - making more than 1 call at the same time :: fixed

2007-03-20 Thread Yiðit Boyar
i've migrated from  amfphp1.2 to amfphp1.9beta2 and adodb to PDO in the server 
side and the problem is fixed...

- Original Message 
From: Yiðit Boyar [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, March 19, 2007 10:28:09 PM
Subject: [flexcoders] amfphp problem - making more than 1 call at the same time









  




hi all;
i'm using amfphp1.2-cairngoru m. (and postgres to store data)
when i try to call 2 or more service calls at the same time;  none of them can 
succeed; but if i call them one after another; there is no problem...
what can cause this error ? or is this an error or a property of amfphp ? 
(actually ; there was not such a problem in my old projects )
--yigit





Now that's room service! Choose from over 150,000 hotels 
in 45,000 destinations on Yahoo! Travel to find your fit.

  







!--

#ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, 
sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;}
#ygrp-vitnav{
padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
#ygrp-vitnav a{
padding:0 1px;}
#ygrp-actbar{
clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;}
#ygrp-actbar .left{
float:left;white-space:nowrap;}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;font-size:77%;padding:15px 0;}
#ygrp-ft{
font-family:verdana;font-size:77%;border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;}

#ygrp-vital{
background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
#ygrp-vital #vithd{
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:uppercase;}
#ygrp-vital ul{
padding:0;margin:2px 0;}
#ygrp-vital ul li{
list-style-type:none;clear:both;border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-right:.5em;}
#ygrp-vital ul li .cat{
font-weight:bold;}
#ygrp-vital a {
text-decoration:none;}

#ygrp-vital a:hover{
text-decoration:underline;}

#ygrp-sponsor #hd{
color:#999;font-size:77%;}
#ygrp-sponsor #ov{
padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;margin:0;}
#ygrp-sponsor #ov li{
list-style-type:square;padding:6px 0;font-size:77%;}
#ygrp-sponsor #ov li a{
text-decoration:none;font-size:130%;}
#ygrp-sponsor #nc {
background-color:#eee;margin-bottom:20px;padding:0 8px;}
#ygrp-sponsor .ad{
padding:8px 0;}
#ygrp-sponsor .ad #hd1{
font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%;}
#ygrp-sponsor .ad a{
text-decoration:none;}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;}
#ygrp-sponsor .ad p{
margin:0;}
o {font-size:0;}
.MsoNormal {
margin:0 0 0 0;}
#ygrp-text tt{
font-size:120%;}
blockquote{margin:0 0 0 4px;}
.replbq {margin:4;}
--








 

Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

[flexcoders] AMFPHP and sessions

2007-03-20 Thread Patrick Lemiuex
I have a session created outside amfphp.  It seems like amfphp is  
restarting the session and which is logging our user's out of the site.

How do I preserve this session...

Do I append it to the gatewayURL after I bring it (thes session ID)   
in as a flashvars like this?

?$session_id = session_id();?

then assign a flashvars ...some.swf?sid=?=$session_id;?

then when define my gateway with the variable like this :   
flashservices/gateway.php?+_sid;

Then does AMPHP automatically do the rest?


Thanks for your help,
Patrick


[flexcoders] amfphp problem - making more than 1 call at the same time

2007-03-19 Thread Yiðit Boyar
hi all;
i'm using amfphp1.2-cairngorum. (and postgres to store data)
when i try to call 2 or more service calls at the same time;  none of them can 
succeed; but if i call them one after another; there is no problem...
what can cause this error ? or is this an error or a property of amfphp ? 
(actually ; there was not such a problem in my old projects )
--yigit




 

Don't get soaked.  Take a quick peek at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

[flexcoders] AMFPHP - MagpieRSS simplexml_load_file fail?

2007-03-16 Thread Kevin
I am trying to pass objects created with MagpieRSS or  
simplexml_load_file (in PHP) back to Flex and I keep getting the  
following errors:

message = faultCode:INVALID_AMF_MESSAGE faultString:'Invalid AMF  
message' faultDetail:'MagpieRSS Object
message = faultCode:INVALID_AMF_MESSAGE faultString:'Invalid AMF  
message' faultDetail:'SimpleXMLElement Object

Is there a reason these objects would not be compatible with AMFPHP?

- Kevin


[flexcoders] amfphp, flex sending custom class trouble

2007-03-07 Thread Kun Janos
Hi all
I made a custom class: ExtendedArrayCollection extends
ArrayCollection{...i written a few functions here...}.
If I make a ProductVO that has a member
mediaList:ExtendedArrayCollection and name:String for example I am
unable to send the ProductVO to amfphp.
Flex doesn't give me any error, but the data isn't sent. I'm using
Charles and it seams the data doesn't leave flex at all.
If I remove mediaList:ExtendedArrayCollection from ProductVO then the
data is sent. 
Is this a bug in flex? Or a bug in amfphp? Why can't I send objects
like ExtendedArrayCollection ???
On amfphp I have  ProductVO.php that corresponds to ProductVO.as and
class mapping is correct. I'm using amfphp 1.9 beta 2, but this
problem appears in amfphp 1.2 also.

Janos



[flexcoders] AMFPHP Question -- Flex 2

2007-03-06 Thread Mike and Stephie
Hi People !
Just following through Mike Potter's example of integrating AMFPHP with 
Flex2, notice that with the following code
http://www.adobe.com/devnet/flex/articles/flex2_amfphp_03.html
Flex cannot recognize the

gateway = new RemotingConnection( http://localhost/flex/php/gateway.php; );

line -- it thinks that there is no RemotingConnection method.

Does anyone have any ideas?
Also does anyone know of sample code which demonstrates adding editing deleting 
 records as well ?
Thanks for any help
Prema




Re: [flexcoders] AMFPHP Sessions

2007-03-04 Thread Anthony Lee
 Can someone provide and example of how to use AMFPHP with sessions.
  I can't seem to get it to work.

Ditto. Sessions are referenced all over the place but I couldn't find
a working example.

tonio


Re: [flexcoders] AMFPHP Sessions

2007-03-04 Thread aaron smith

Are you trying to use sessions in your service methods? You can use
$_SESSION['whatever'] ='something'

AMFPHP automatically handles sessions for you and sends back a header
to Flash with a redirect to the gateway with the PHPSESSID appended
to the query, meaning cookieless sessions are supported.

What is appended to the gateway url is the SESSION_ID. with that ID it
restores session data per request, for you to use in $_SESSION['asdf']. So
if in some method you set $_SESSION['auth'] = 1. Then in another method you
can say if($_SESSION['auth']==1) blah blah blah..

As far as i'm aware this still works. I have not tested in amfphp 1.9..
Maybe i'll eat my words, I'm hungry anyway though.

-Aaron



On 3/4/07, Anthony Lee [EMAIL PROTECTED] wrote:


   Can someone provide and example of how to use AMFPHP with sessions.
 I can't seem to get it to work.

Ditto. Sessions are referenced all over the place but I couldn't find
a working example.

tonio
 



[flexcoders] AMFPHP pass objects???

2007-03-03 Thread Kevin
I am trying to pass an object type from Flex (Cairngorm) to PHP5  
through AMFPHP 1.9 and I can't seem to get it to work.  It seems that  
PHP only recognizes the object as an array and ignores any private  
variables in the object.  Can anyone think of a reason that this  
would be happening?


At it's simplest, I tried this just to try to get the object to be  
recognized:


FLEX:
var tempVO:Object = new Object;
tempVO.name = 'kevin';
tempVO.pass = '123';
var call : Object = service.login( tempVO );

PHP:

public function login( $UserVO )
{
	$this-Debug-write_log(passed from flex:\n\n.print_r($UserVO,  
true));

return $UserVO;
}

LOG:

passed from flex:

Array
(
[name] = kevin
[pass] = 123
)




Re: [flexcoders] AMFPHP pass objects???

2007-03-03 Thread Kevin

in case you are having the same problem:

I solved some of my own problem...  One needs to set this var  
correctly in advancedsettings.php (amfphp dir) to have incoming PHP  
mapping work:


//One may choose to put mapped classes (incoming) outside of the  
services folder also

$gateway-setBaseCustomMappingsPath('services/vo');

- Kevin




On Mar 3, 2007, at 9:34 AM, Kevin wrote:

I am trying to pass an object type from Flex (Cairngorm) to PHP5  
through AMFPHP 1.9 and I can't seem to get it to work.  It seems  
that PHP only recognizes the object as an array and ignores any  
private variables in the object.  Can anyone think of a reason that  
this would be happening?



At it's simplest, I tried this just to try to get the object to be  
recognized:


FLEX:
var tempVO:Object = new Object;
tempVO.name = 'kevin';
tempVO.pass = '123';
var call : Object = service.login( tempVO );



PHP:



public function login( $UserVO )
{
	$this-Debug-write_log(passed from flex:\n\n.print_r($UserVO,  
true));

return $UserVO;
}


LOG:



passed from flex:

Array
(
[name] = kevin
[pass] = 123
)











[flexcoders] AMFPHP Sessions

2007-03-03 Thread Kevin
Can someone provide and example of how to use AMFPHP with sessions.   
I can't seem to get it to work.  The documentation states:

Cookieless sessions
AMFPHP automatically handles sessions for you and sends back a header  
to Flash with a redirect to the gateway with the PHPSESSID appended  
to the query, meaning cookieless sessions are supported.

I just don't know how to integrate this???

Thanks, Kevin


[flexcoders] amfPHP 1.9 beta 2, malformed amf object question

2007-02-23 Thread Kun Janos
Hi all

I updatet amfphp 1.2 to amfPHP 1.9 beta 2.
In the old services/dao 's I had some echo/print commands for debugging and 
amfphp worked just fine.
When amfPHP 1.9 beta 2 finds an echo or print in the services it stops working. 
I mean, the amf object that is sent back is malformed. This malformation also 
happens if in the service.php before the ?php or after the closing ? we have 
some white spaces.
Is this a bug?

Janos

 
-
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.

Re: [flexcoders] amfPHP 1.9 beta 2, malformed amf object question

2007-02-23 Thread Patrick Mineault
Try adding this in gateway.php:

$gateway-setLooseMode(true);

It was an oversight on my part, will be fixed in next version.

Patrick

Kun Janos a écrit :

 Hi all

 I updatet amfphp 1.2 to amfPHP 1.9 beta 2.
 In the old services/dao 's I had some echo/print commands for 
 debugging and amfphp worked just fine.
 When amfPHP 1.9 beta 2 finds an echo or print in the services it stops 
 working. I mean, the amf object that is sent back is malformed. This 
 malformation also happens if in the service.php before the ?php or 
 after the closing ? we have some white spaces.
 Is this a bug?

 Janos

 We won't tell. Get more on shows you hate to love 
 http://us.rd.yahoo.com/evt=49980/*http://tv.yahoo.com/collections/265
 (and love to hate): Yahoo! TV's Guilty Pleasures list. 
 http://us.rd.yahoo.com/evt=49980/*http://tv.yahoo.com/collections/265
  



[flexcoders] AMFPHP 1.9, class mapping not working, advancedsettings.php question

2007-02-20 Thread Kun Janos
Hi all.

I just upgraded amfphp 1.2 to amfphp 1.9 beta 2 and class mapping is
not working any more :(
In one of the messages that Patrick Mineault wrote I read that for
class mapping I should put
[RemoteClass(alias=com.virtualro.shell.vo.LoginVO)] in Flex
LoginVO.as (just like in amfphp 1.2) and 
public $_explicitType = com.virtualro.shell.vo.LoginVO; //in LoginVO.php
I'm using Charles and I see that the data is sent from flex to amfphp,
but the class mapping doesn't occour. 
Using   
$msg = '';
foreach($login as $key = $value){
$msg .= $key.' - '.$value.', ';
}
I saw that the data arrives to LoginService.php but using
$login-username gives null :( meaning that data has arrived but class
mapping is not working.
Patrick Mineault also wrote that after setting up LoginVo.php and
LoginVo.as we should read the instructions in advancedsettings.php
The problem is that the file advancedsettings.php doesn't exist in
amfphp 1.9 beta 2, and the methods used in amfphp 1.2
(setBaseCustomMappingsPath, setCustomIncomingClassMappings and
setCustomOutgoingClassMappings) have been removed from the $gateway.
Can anybody help me?

Thanks,
Janos




[flexcoders] amfphp polling

2007-02-14 Thread johnesocko
What is the best way to poll a mysql database with amfphp? a timer? Is
it build in somewhere like FDS? Also is there a way to listen for
changed/new data within the database(might be easier)? 

Thanks in advance





  1   2   >