3 Replies Latest reply on Oct 24, 2010 10:35 AM by Karl998

    Flex/PHP deployment problem


      Hello there,


      After a lot of researches and copy/paste on Google, I finally decide to create a topic here, that means I am totally desperate.


      I have a dev environment on a Windows platform with Apache/PHP/MySQL and Flash Builder 4. I am using the Zend Framework in order to communicate  with PHP classes in Action Script. Locally, all work perfectly, PHP works and content is correctly updated in my Flex apps.


      But I have a problem in the production environment. I have Lighttpd with PHP (FastCGI) and ZendFramework correctly installed on a Linux environment.


      I just export my Flex app to a release build, I modify the amf_config.ini. And I am sure my configuration is correct.


      When ZendFramework is not found, I have the error : Send failed Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: 'http://www.xxxx.xx/gateway.php'. It is not my problem, ZendFramework is correctly installed for me (it is just to tell you that I dont have this error).


      But my actual problem is, even if ZendFramework is correctly working and all seems to be good, I have the error (that I do not success to fix) :


      Class "xxxxxx" does not exist: Plugin by name 'xxxxxx' was not found in the registry; used paths: : /xxxxxx/www/services/


      The path is correct, my services are in the "services" folder, but Zend does not find the classes.


      I have to do some other actions in order to deploy my apps? I do not understand why its working in local (Win) and not in production (Linux). I test on a local environment on Linux, I have the same error. Maybe I have to modify something in the configuration of the project (like urls or classes calls...), I do not know...


      Can you help me?


      Thanks a lot.




        • 1. Re: Flex/PHP deployment problem
          Karl998 Level 1

          Somebody has an idea?


          Thanks again.

          • 2. Re: Flex/PHP deployment problem

            Any ideas, this has been a pain in my side all weekend... been moving files and reinstalling things right left and centre!!


            is it a Zend issue or Flash?


            This needs to be resolved as its a key function in their demo!!!

            • 3. Re: Flex/PHP deployment problem
              Karl998 Level 1

              Ok, I found a solution, I do not know if it is the right one, but it works.


              In the Windows ZendFramework, apparently you do not have to declare the classes your are using, so the gateway.php just declares the directories where the classes are. On Windows, it works good for me, I have no problem to execute PHP codes in Flex apps.


              But in Linux, there is a problem with the classes declaration, so the solution I found is to declare manually the PHP classes. So you modify the gateway.php, you can delete the part about the directories declaration. You have to require_once the classes you want to use and add :




              for all your classes after the initialization of AMF server.


              And it works!


              I think Adobe have to write some docs about this difference between Windows and Linux. It is cool to open Flex SDK, but a little effort of documentation would be welcomed.