Class: Baykit::BayServer::Docker::Cgi::PhpCgiDocker

Inherits:
CgiDocker
  • Object
show all
Includes:
Util
Defined in:
lib/baykit/bayserver/docker/cgi/php_cgi_docker.rb

Constant Summary collapse

ENV_PHP_SELF =
"PHP_SELF"
ENV_REDIRECT_STATUS =
"REDIRECT_STATUS"

Constants inherited from CgiDocker

CgiDocker::DEFAULT_TIMEOUT_SEC

Instance Attribute Summary

Attributes inherited from CgiDocker

#doc_root, #interpreter, #max_processes, #process_count, #script_base, #timeout_sec, #wait_count

Instance Method Summary collapse

Methods inherited from CgiDocker

#add_process_count, #arrive, #get_wait_count, #init_key_val, #initialize, #sub_process_count, #sub_wait_count

Constructor Details

This class inherits a constructor from Baykit::BayServer::Docker::Cgi::CgiDocker

Instance Method Details

#create_command(env) ⇒ Object

Override CgiDocker



32
33
34
35
36
# File 'lib/baykit/bayserver/docker/cgi/php_cgi_docker.rb', line 32

def create_command(env)
  env[ENV_PHP_SELF] = env[CgiUtil::SCRIPT_NAME]
  env[ENV_REDIRECT_STATUS] = 200.to_s
  super
end

#init(elm, parent) ⇒ Object

Implements Docker



18
19
20
21
22
23
24
25
26
# File 'lib/baykit/bayserver/docker/cgi/php_cgi_docker.rb', line 18

def init(elm, parent)
  super

  if @interpreter == nil
    @interpreter = "php-cgi";
  end

  BayLog.debug("PHP interpreter: " + interpreter)
end