deploying flex/php application on server - channel disconnected
I have a flex application that uses PHP to access a database (MySQL, stored on an external server).
The application compiles fine on my local machine (mac) using flash builder 4, and it can connect to the database using PHP. (I'm using MAMP to run this.) It has to install the ZendFramework into my web root to successfully work.
However, when I go to deploy the application onto my server, I run into problems. I tried copying the ZendFramework files to my server's web root, and I changed the config file (amf_config.ini
) to correspond to my server's absolute path to webroot. I also copied all of the project files to the server. However, the flash app bombs out when I open it in a browser, saying "channel disconnected: channel 开发者_Go百科disconnected before an acknowledgment was received".
Googling suggests there is a problem in PHP. I'm assuming this has something to do with the binary being compiled on the local machine... is there a way to compile the app on the server? (I can't use flex builder on the server, because (among other things) I don't have a GUI, just command-line.) How do people normally deploy flex apps that have various library dependencies that might be local to the machine?
TIA
The most common problem with AMF+PHP is that PHP returns error description text into channel and Flash Player treats it as AMF message and reports channel error.
Here are the solutions:
- Install Charles Proxy (or other one) and look what's going on in channel
- Open error log on your server (for Apache it's
logs\error.log
) - PHP errors are there
精彩评论