5 Replies Latest reply on Oct 17, 2009 7:15 PM by jdesko

    Connect to PHP

    bluecuraga47

      I was working with my flex application that connected locally using the Connect to PHP feature in flex. When I finished the app I figured I could transfer my debug folder, services, and zendframework folders to my host and change all localhost URLs in my flex project to http://www.site URLs. This didn't work for me however. This is the error message I don't know how to interpret:

       

      Class "myservice" does not exist: Plugin by name 'Myservice' was not found in the registry; used paths:
      : services/:myflexapp-debug/services/.

       

      Can anyone help?

        • 1. Re: Connect to PHP
          rootsical

          easy. i think you have to export to release version and use those files on your server but also I had to do the following to make it work:

           

          • make sure that the gateway.php file in bin-debug is also uploaded to the server and that it refers to the correct location of zend framework on your server
          • make sure that amf_config.ini file in bin-debug is also uploaded to the server and that it refers to the correct location of zend framework on your server.  also make sure that the path to the PHP services file is correct.
          • make sure that any time you call refer to the service in your flex application mxml, that the endpoint you specify refers to the gateway.php file you have uploaded to your server. 

           

          maybe it will work?  i'm not an expert but spent loads of time on this myself and got it to work.

           

          one more thing, on my local server the path separation is done with a "/" forward slash whilst on the web server I had to use a "\" backward slash in order to describe the file paths correctly.

           

          hope this helps...

          1 person found this helpful
          • 2. Re: Connect to PHP
            jdesko

            Where you able to resolve this issue?  I am having the same problem.  Thanks, John

            • 3. Re: Connect to PHP
              jdesko Level 2

              Nevermind, I resolved my issues.  The error given is still pointing to bin_debug; the problem was the amf_config.ini that is in bin-release still points to php services being in bin-debug - so I created an amf_config.ini, set the proper entries for the directories, etc.  and keep the production amf_config.ini separate so it's not overwritten when compiling.

              • 4. Re: Connect to PHP
                bluecuraga47 Level 1

                My fix involved adding the right directories to the amf ini file to point to the services folder, setting the right Zend directory in I believe the configuration file, and lastly- my services file started with a lowercase, but for some reason an uppercased version was being looked for, so I just uploaded an uppercase version.

                 

                To debug, I threw exceptions in the php files I found that gave me whatever error message I was dealing with. So if my error said 'class not found', I would search all my files for that to see the error, and work backward from it throwing exceptions to make sure other steps were correct.

                • 5. Re: Connect to PHP
                  jdesko Level 2

                  Thanks for posting your fix.  I was having the 'class not found error', so after you posted your fix,  I changed the filename's first letter to uppercase and that fixed it.  Before this fix, working local worked, also running the app local and accessing the data remotely worked ... but why on the production server the first letter had to be caps is a wonder, but hey it works.  Thanks again.