Download the PHP package andreybolonin/php-pm without Composer

On this page you can find all versions of the php package andreybolonin/php-pm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-pm

PPM - PHP Process Manager

PHP-PM is a process manager, supercharger and load balancer for PHP applications.

Build Status Gitter

It's based on ReactPHP and works best with applications that use request-response frameworks like Symfony's HTTPKernel. The approach of this is to kill the expensive bootstrap of PHP (declaring symbols, loading/parsing files) and the bootstrap of feature-rich frameworks. See Performance section for a quick hint. PHP-PM basically spawns several PHP instances as worker bootstraping your application (eg. the whole Symfony Kernel) and hold it in the memory to be prepared for every incoming request: This is why PHP-PM makes your application so fast.

More information can be found in the article: Bring High Performance Into Your PHP App (with ReactPHP)

Features

Badge all the things

Does your app/library support PPM? Show it!

PPM Compatible

Use

Docker is easier to setup and maintain. If your applications requires additional environment tools or libraries, you can build your own image based on ours. See github.com/php-pm/php-pm-docker for more information.

When debug is enabled, PHP-PM detects file changes and restarts its worker automatically.

Use without Docker

Follow the wiki article Use without Docker.

Performance

To get the maximum performance you should usually use --app-env=prod with disabled debug --debug=0. Also make sure xdebug is disabled. Try with different amount of workers. Usually a 10% over your cpu core count is good. Example: If you have 8 real cores (excl. hyper-threading) use --workers=9.

To get even more performance (for static file serving or for rather fast applications) try a different event loop (see https://github.com/reactphp/event-loop).

Debugging

If you get strange issues in your application and you have no idea where they are coming from try using only one worker --workers=1 and enable -v or -vv.

When debugging you should use xdebug as you're used to. If you set a break point and hold the application, then only one worker is stopped until you release the break point. All other workers are fully functional.

Note for XDebug and PHPStorm: Since php-pm uses at least two processes, there are two xdebug instances as well. PHPStorm is per default configured to only accept one connection at a time. You need to increase that. You won't get xdebug working with your application if you don't increase that count.

Xdebug and PHPStorm

In all workers the STDOUT is redirected to the connected client. So take care, var_dump, echo are not displayed on the console. STDERR is not redirected to the client, but to the console. So, for very simple debugging you could use error_log('hi') and you'll see it on the console. Per default exceptions and errors are only displayed on the console, prettified with Symfony/Debug component.

Adapter

HttpKernel for Symfony/Laravel - https://github.com/php-pm/php-pm-httpkernel

Zend - https://github.com/php-pm/php-pm-zend

Command

ppm-help

ppm-start

Symfony

Laravel

Zend

Wordpress

For all Wordpress lovers out there: PPM is not going to work with Wordpress due to the lack of request-response abstraction. We highly doubt that Wordpress is ever going to be compatible because its architecture is written in a way that makes it currently impossible to serve multiple requests in one application process.

Performance (requests/s)

6x4GHz Intel i7, 16GB RAM. 10 concurrent, 1000 total request: ab -c 10 -n 1000 http://127.0.0.1:8080/

Symfony, CMS application

ppm start --bootstrap=symfony --app-env=prod --logging=0 --debug=0 --workers=20

https://github.com/jarves/jarves

PHP Version Dynamic at Jarves Static file
7.0.3, StreamSelectLoop 2387,67 3944,52
5.6.18, StreamSelectLoop 1663,56 2636,09
5.6.18, LibEventLoop 1811,76 3441,72

Laravel, example package

https://github.com/bestmomo/laravel5-example

ppm start --bootstrap=laravel --app-env=prod --debug=0 --logging=0 --workers=20

Issues

Please help us fix these issues by creating pull requests. :)

Setup

We provide ready-to-use docker images you can use right away. If you have own setup, see in the PHP-PM docker repository how to integrate PHP-PM in your NGiNX setup.

Trusted proxy Symfony

To get the real remote IP in your Symfony application for example, don't forget to add ppm (default 127.0.0.1) as trusted reverse proxy.

More information at http://symfony.com/doc/current/cookbook/request/load_balancer_reverse_proxy.html.


All versions of php-pm with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-pcntl Version *
symfony/console Version ^2.6|^3.0
symfony/debug Version ^2.6|^3.0
symfony/process Version ^2.6|^3.0
react/event-loop Version ^0.4
react/stream Version ^0.7.1
react/http Version ^0.8
react/socket Version ^0.8.6
react/child-process Version ^0.5
mkraemer/react-pcntl Version ^2.0|^3.0
monolog/monolog Version ^1.3
paragonie/random_compat Version ^2.0
http-interop/http-middleware Version ^0.5
ringcentral/psr7 Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package andreybolonin/php-pm contains the following files

Loading the files please wait ....