I’ve been receiving a number of emails on this topic lately. It seems there is little information out there about how to move from development to production with a Flex and PHP application. Here is a simple checklist that could help you, especially if you are doing this for the first time. Please note that I presume you used the Data Services (wizards) to connect the Flex client to PHP services.
- Make sure you have Zend Framework on your server. If you don’t, install it
- Make sure you change MySQL credentials and server IP/name used by your PHP scripts to connect to the database
- Copy the PHP services folder to your server. Then test these services. If they don’t work check the MySQL credentials or look for dependencies (maybe your PHP services use other PHP classes that you forgot to copy to your server)
- Edit the amy_config.ini file and make sure the path to the Zend Framework is OK and set production to true
- Edit the Flex services to point to your live server gateway.php. In the services folder of your Flex project you will find _Super_something.as files. In the constructor you will find a line like this:
_serviceControl.endpoint = “http://localhost:10088/MobileFlexPHP-PHP/public/gateway.php”;
Copy that line and then open the class that extends this _Super class and paste the line in the constructor. Then change the URL to reflect your server setup
- Copy the bin-release/ folder to your server (you should choose the export release for your project; this will create a SWF file smaller than the debug version)
That’s it! If I missed something please drop a comment!