deploying flex/php application on server - channel disconnected

…衆ロ難τιáo~ 提交于 2019-12-11 13:39:52

问题


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 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


回答1:


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


来源:https://stackoverflow.com/questions/4140902/deploying-flex-php-application-on-server-channel-disconnected

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!