Skip to content

Instantly share code, notes, and snippets.

KentR kentr

Block or report user

Report or block kentr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fedora-25-install-vagrant.yml
---
# Ansible playbook to install Vagrant on Fedora.
#
# PREREQUISITES
# 1. Install Ansible:
# ```
# sudo dnf install ansible
# ```
#
# 2. Install Git
@kentr
kentr / gist:5e5501c619ade0fdecfc
Created Feb 17, 2016
Request object parameters, PHP-PM
View gist:5e5501c619ade0fdecfc
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 / gist:dca6cf2f253fd2ded6b8
Last active Feb 17, 2016
Request object parameters, nginx + PHP-FPM
View gist:dca6cf2f253fd2ded6b8
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 / HttpKernel.php
Last active Feb 17, 2016
Suggested HttpKernel::mapRequest() code to inject full server vars into the Symfony request.
View HttpKernel.php
<?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 Feb 17, 2016
Request parameters test under mod_php
View request-test-mod-php.txt
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
)
You can’t perform that action at this time.