fpm

package
v0.0.0-...-dc4f030 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2018 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectByDirectConnection

func DetectByDirectConnection(config *PhpFpmConfig) error

DetectByDirectConnection tries to Dial a connection to php. If the config is set, it uses the ListenNetwork and ListenAddress parameters to test the connection, and returns on error. Otherwise, it tries with most common values (tcp port 9000 or unix sockets inside /run/php) and feeds the config if one matches.

func DetectPhpInfos

func DetectPhpInfos(configs *PhpFpmConfig, scriptsFolder string) error

DetectPhpInfos sends a couple of PHP scripts to a running FPM daemon.

Types

type PhpFpmConfig

type PhpFpmConfig struct {
	// Detected listen URL
	// Can be either localhost:port or full path
	// to a local socket file
	ListenAddress string
	// Type of network connection (unix|tcp)
	ListenNetwork string

	// Version of PHP
	PhpVersion string
	// List of PHP loaded extensions
	PhpExtensions []string

	// Unix user who will need write access for php
	PhpUser string
	// Unix group who will need write access for php
	PhpGroup string
	// Unix owner of the socket
	ListenOwner string
	// Unix group of the socket
	ListenGroup string
}

Structure describing the detected features

func DetectFpmInfos

func DetectFpmInfos() (config *PhpFpmConfig, e error)

DetectFpmInfos first tries to connect to common addresses for FPM daemon, then tries to find a running process and parse its config by sending php-fpm -tt command.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL