简体   繁体   English

如何在appFog上部署php应用程序?

[英]How to deploy php application on appFog?

I have install Ruby and gem af and I am trying to upload php (not require mysql or other services) application to AppFog. 我已经安装了Ruby和gem af,并且尝试将php(不需要mysql或其他服务)应用程序上传到AppFog。

Directory structure of my application in given in below screenshot. 我的应用程序的目录结构在下面的屏幕快照中给出。 目录结构 In my application file types are : 在我的应用程序中,文件类型为:

  1. php 的PHP
  2. css 的CSS
  3. images 图片
  4. js js
  5. Jquery jQuery的

I am applying command from command line and my PWD is /home/mahesh/test_app My application package size is about 2 MB 我正在从命令行应用命令,我的PWD是/ home / mahesh / test_app我的应用程序包大小约为2 MB
I am getting this error Error (JSON 503): <?xml version="1.0" encoding="u... 我收到此错误Error (JSON 503): <?xml version="1.0" encoding="u...
The thread of command is as below : 命令的线程如下:

mahesh@ubuntu:~/test_app$ af push
Would you like to deploy from the current directory? [Yn]: y
Application Name: Image_Editor_test_cld
Detected a Standalone Application, is this correct? [Yn]: n
1: Spring
2: Django
3: Erlang/OTP Rebar
4: Play
5: Rails
6: Lift
7: Grails
8: Sinatra
9: WSGI
10: JavaWeb
11: Rack
12: PHP
13: Node
14: Standalone
Select Application Type: 12
Selected PHP Application
1: AWS US East - Virginia
2: AWS EU West - Ireland
3: AWS Asia SE - Singapore
4: Rackspace AZ 1 - Dallas
5: HP AZ 2 - Las Vegas
Select Infrastructure: 3
Application Deployed URL [Image_Editor_test_cld.ap01.aws.af.cm]:    
Memory reservation (128M, 256M, 512M, 1G, 2G) [128M]: 
How many instances? [1]:  
Bind existing services to 'Image_Editor_test_cld'? [yN]: 
Create services to bind to 'Image_Editor_test_cld'? [yN]: 
Would you like to save this configuration? [yN]: N
Creating Application: OK
Uploading Application:
  Checking for available resources: OK
  Processing resources: OK
  Packing application: OK
  Uploading (2M): OK   
Error (JSON 503): <?xml version="1.0" encoding="u...

I am making any mistake Is it proper way to upload my application if not then in which way I can upload my application? 我犯了任何错误如果不是这样,是否可以正确地上传我的应用程序?

I have already upload my simple php application on appFog which contain simple one directory and one .php file. 我已经在appFog上上传了简单的php应用程序,其中包含一个简单的目录和一个.php文件。 It is working fine. 一切正常。

Try doing a gem update af to make sure your on the latest version of the af tool. 尝试执行gem update af ,以确保您使用的是af工具的最新版本。 There are frequent updates to the af tool which fixes issues like this. af工具经常更新,可以修复此类问题。 Then try again. 然后再试一次。

See if you have the current version: 查看您是否具有当前版本:

af --version

As of writing this, 0.3.18.11 is the current version 撰写本文时,当前版本为0.3.18.11

I tried logging in again and it worked. 我尝试再次登录,但效果良好。 Something kicks you out inside of appfog. 某些东西将您踢出appfog。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM