4 Replies Latest reply on Feb 3, 2010 10:51 PM by joelisaachart@gmail.com

    ZEND/Flex - amf-config.php help!!


      Have some odd behavior taking place when promoting release builds to my production server.


      I have two projects one works - one does not. Both the same settings as far as I can tell.


      Using the amf-config.ini file - this test works


      ;set the absolute location path of webroot directory, example:
      ;Windows: C:\apache\www
      ;MAC/UNIX: /user/apache/www
      ;webroot =C:/Program Files/Zend/Apache2/htdocs
      webroot = ../../


      ;set the absolute location path of zend installation directory, example:
      ;Windows: C:\apache\PHPFrameworks\ZendFramework
      ;MAC/UNIX: /user/apache/PHPFrameworks/ZendFramework
      ;zend_path =


      amf.production = false


      The next release uses the same gateway and amf-config files - and I get this error.


      Class "XYZservice" does not exist: Plugin by name 'XYZservice' was not found in the registry; used paths: : /xyz/release/services/
      #0 /var/www/vhosts/xyz.com/httpdocs/ZendFramework/library/Zend/Amf/Server.php(550): Zend_Amf_Server->_dispatch('secure', Array, 'XYZservice')
      #1 /var/www/vhosts/xyz.com/httpdocs/ZendFramework/library/Zend/Amf/Server.php(626): Zend_Amf_Server->_handle(Object(Zend_Amf_Request_Http))
      #2 /var/www/vhosts/xyz.com/httpdocs/xyz/release/gateway.php(69): Zend_Amf_Server->handle()
      #3 {main}


      Have tried many variations - but still no joy. Why does ../../ work and not the direct path? - by the look of it, those directory's are fine.


      As I understand it - no matter what set-up you build on (local Windows) and promote to a hosted production server (US, mediatemple) - as long as you configure the amf-config.ini file all should be good. Is this the case? Am I missing something when I do a release build.


      Am I better of specifying the "endpoint" in all my service calls in my declarations (mxml code)?


      Been going round in circles with this for several months now. Getting to the point where the only way I can deploy is Windows. DO NOT want to go down that road.


      Help is much appreciated.





        • 1. Re: ZEND/Flex - amf-config.php help!!

          I am having the exact same problem. Everything is in place exactly where it should be, the amf-config.php file is configured correctly and the same on both projects, one works, one gives this error.



          1 person found this helpful
          • 2. Re: ZEND/Flex - amf-config.php help!!
            joelisaachart@gmail.com Level 1

            6 Hours of headache later I solved this problem!


            So in my case the amf_config.ini was set up correctly with webroot=/fullpath/to/url/root and amf.service=foldername (php in my case)


            on my local machine the services file is product.php and everything is groovy and working


            I uploaded everything exactly as it is on my machine and got the error you did.


            I simply cp product.php to Product.php and it worked


            For somereason the zend framework is looking for a file that starts with a capital letter!!!! even though it works fine on my machine and was referenced as product.php! Are you kidding me? What a headache.



            • 3. Re: ZEND/Flex - amf-config.php help!!
              Gaurav P(Adobe) Level 2

              Hi Marty,

              From the error that you are getting it is clear that the Zend connection is successful but the service could not be found.


              Make sure that if your webroot is C:/abc

              Then in amf_config.ini you set,

              webroot = C:/abc


              Also note that the following line,



              means that services are then under C:/abc/xyz/release/services (note that this path under amf.directories[] is relative to webroot and not gateway.php file itself)



              - Gaurav

              1 person found this helpful
              • 4. Re: ZEND/Flex - amf-config.php help!!
                joelisaachart@gmail.com Level 1

                I'm telling you its a small overlooked fact that Zend is looking for a 

                services file that starts with a capital letter.