Skip to content

Instantly share code, notes, and snippets.

---
# Ansible playbook to install Vagrant on Fedora.
#
# PREREQUISITES
# 1. Install Ansible:
# ```
# sudo dnf install ansible
# ```
#
# 2. Install Git
@kentr
kentr / gist:dca6cf2f253fd2ded6b8
Last active February 17, 2016 20:54
Request object parameters, nginx + PHP-FPM
Resulting Symfony Request object while running under nginx + PHP-FPM from the curl request
curl --max-redirs 0 \
--data "form_id=search_form&form_build_id=form-hBDOkME24rvyD5ePeZ2m_NryapLP3jHjZrTs&keys=Abico&op=Search" \
"http://localhost/search/node?keys=Foobar&q=Baz"
------------------------------------------------------------------------------------------------------
Symfony\Component\HttpFoundation\Request Object
(
[request] => Symfony\Component\HttpFoundation\ParameterBag Object
@kentr
kentr / gist:5e5501c619ade0fdecfc
Created February 17, 2016 20:53
Request object parameters, PHP-PM
Resulting Symfony Request object while running under PHP-PM from the curl request
curl --max-redirs 0 \
--data "form_id=search_form&form_build_id=form-hBDOkME24rvyD5ePeZ2m_NryapLP3jHjZrTs&keys=Abico&op=Search" \
"http://localhost/search/node?keys=Foobar&q=Baz"
------------------------------------------------------------------------------------------------------
Symfony\Component\HttpFoundation\Request Object
(
[request] => Symfony\Component\HttpFoundation\ParameterBag Object
@kentr
kentr / HttpKernel.php
Last active February 17, 2016 19:59
Suggested HttpKernel::mapRequest() code to inject full server vars into the Symfony request.
<?php
namespace PHPPM\Bridges;
use PHPPM\AppBootstrapInterface;
use PHPPM\Bootstraps\BootstrapInterface;
use PHPPM\Bridges\BridgeInterface;
use React\Http\Request as ReactRequest;
use React\Http\Response as ReactResponse;
use Stack\Builder;
@kentr
kentr / request-test-mod-php.txt
Last active February 17, 2016 19:42
Request parameters test under mod_php
Resulting magic globals under mod_php from a simple POST request that also contains query parameters in the URL.
$_REQUEST contains both $_GET and $_POST. If $_GET & $_POST have the same key, the value from $_POST is used.
$_GET =>
Array
(
[qs] => qs_data
[form_text] => qs_form_text_data
)