All Projects β†’ hjr3 β†’ Php Rpm

hjr3 / Php Rpm

Licence: other
PHP Rust Process Manager

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to Php Rpm

Swarmmskit
Provisioning a Full MS NanoServer Cluster Swarm on Hyper-V with Consul + Vault + Private Registry + Management UI for your cluster Swarm Docker (all these tools will be configure during the deployment) ... all VMs integrated in an Active Directory Domain or using a Local account. You can use (means configure the FW rules for you !) or disable it ...
Stars: ✭ 13 (-88.5%)
Mutual labels:  hyper
Hyper
πŸ§›πŸ»β€β™‚οΈ Dark theme for Hyper
Stars: ✭ 74 (-34.51%)
Mutual labels:  hyper
Nord Hyper
An arctic, north-bluish clean and elegant Hyper theme plugin.
Stars: ✭ 96 (-15.04%)
Mutual labels:  hyper
Hyperbeast
Supreme Terminal prompt
Stars: ✭ 20 (-82.3%)
Mutual labels:  hyper
Hyper Router
Simple routing middleware for rust HTTP library hyper.
Stars: ✭ 51 (-54.87%)
Mutual labels:  hyper
Hyper Snazzy
Elegant Hyper theme with bright colors
Stars: ✭ 1,248 (+1004.42%)
Mutual labels:  hyper
Hyper Pokemon
Tailor-made PokΓ©mon themes for your Hyper terminal
Stars: ✭ 939 (+730.97%)
Mutual labels:  hyper
Hyper
A terminal built on web technologies
Stars: ✭ 37,504 (+33089.38%)
Mutual labels:  hyper
Dotfiles
Windows + WSL 2 Ubuntu + Windows Terminal + zsh + p10k + Docker + IntelliJ IDEA
Stars: ✭ 54 (-52.21%)
Mutual labels:  hyper
Sincere
Sincere is a micro web framework for Rust(stable) based on hyper and multithreading
Stars: ✭ 91 (-19.47%)
Mutual labels:  hyper
Hyper
An HTTP library for Rust
Stars: ✭ 8,912 (+7786.73%)
Mutual labels:  hyper
Hyper Hide Title
Hide the Hyper window title when there is only one tab
Stars: ✭ 46 (-59.29%)
Mutual labels:  hyper
Piping Server Rust
Infinitely transfer between any device over pure HTTP, designed for everyone using Unix pipe and even for browser users
Stars: ✭ 88 (-22.12%)
Mutual labels:  hyper
Hyper Match
HyperTerm extension which matches regular expressions with predefined commands
Stars: ✭ 15 (-86.73%)
Mutual labels:  hyper
Hyperhue
🌈 A fun HyperTerm theme that responds to your Philips Hue lights
Stars: ✭ 97 (-14.16%)
Mutual labels:  hyper
Findergo
🐒 Open terminal quickly from Finder
Stars: ✭ 862 (+662.83%)
Mutual labels:  hyper
Automatedlab
AutomatedLab is a provisioning solution and framework that lets you deploy complex labs on HyperV and Azure with simple PowerShell scripts. It supports all Windows operating systems from 2008 R2 to 2019, some Linux distributions and various products like AD, Exchange, PKI, IIS, etc.
Stars: ✭ 1,194 (+956.64%)
Mutual labels:  hyper
Hyper
🎨 Omni for Hyper
Stars: ✭ 108 (-4.42%)
Mutual labels:  hyper
Awesome Hyper
πŸ–₯ Delightful Hyper plugins, themes, and resources
Stars: ✭ 9,687 (+8472.57%)
Mutual labels:  hyper
Dotfiles
My configuration files
Stars: ✭ 89 (-21.24%)
Mutual labels:  hyper

PHP Rust Process Manager (php-rpm)

Build Status

An experimental process manager that uses Rust's hyper library to act as a frontend for PHP.

Problem

The standard way to run PHP is to use nginx + php_fpm. Not only is this a pain to setup, but FastCGI is not very fast.

Solution

Embed PHP into Rust so that hyper can accept the HTTP request, spawn a thread in which we pass that information off to a PHP script and then have hyper return the HTTP response.

Installation

This package depends on PHP. The default location for the PHP includes is in /usr/include/php. You can set an environment variable PHP_INCLUDE_DIR to override this. The default location for libphp7 is in /usr/lib. You can set an environment variable PHP_LIB_DIR to override this. For details on how to install or compile PHP, see php-sys/README.md. Please note that in order to safely spawn threads with PHP, --enable-maintainer-zts must be used.

The code uses bindgen to dynamically build bindings for PHP 7. If you want to compile against a static libphp7, then specify PHP_LINK_STATIC=1. Using cargo build should give you a working binary.

Usage

Depending on the location of libphp7 you may need to provide LD_LIBRARY_PATH. The first argument to the program is the document root. Currently the index is hardcoded to index.php. Example: PHP_LIB_DIR="/path/to/lib" PHP_INCLUDE_DIR="/path/to/include" LD_LIBRARY_PATH="/path/to/lib" cargo run -- tests/. This will send requests to a script in ./tests/index.php.

The tests/index.php is the entry point of the PHP program. A hyper server listens for new requests and dispatches each request to the PHP engine, which executes tests/index.php. The response headers and body are sent back through hyper and then to the client.

Inspiration

I thought of this idea while working on weldr and thinking about how weldr would be used at my day job (which uses PHP).

Related

See php_fpm.

Thanks

A big thanks to Sara Goleman and her book Extending and Embedding PHP. Also thanks to the people that created bindgen.

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].