Skip to content

Instantly share code, notes, and snippets.

View freen's full-sized avatar

Daniel B. freen

View GitHub Profile
@freen
freen / gist:a7e3bb9099eece25d554
Last active August 29, 2015 14:09
homebrew_php54-http_install_failure_make_log.txt
2014-11-14 18:55:22 -0500
make
/bin/sh /private/tmp/php54-http-iQkoUm/pecl_http-2.1.2/libtool --mode=compile clang -I. -I/private/tmp/php54-http-iQkoUm/pecl_http-2.1.2 -DPHP_ATOM_INC -I/private/tmp/php54-http-iQkoUm/pecl_http-2.1.2/include -I/private/tmp/php54-http-iQkoUm/pecl_http-2.1.2/main -I/private/tmp/php54-http-iQkoUm/pecl_http-2.1.2 -I/usr/local/Cellar/php54/5.4.33/include/php -I/usr/local/Cellar/php54/5.4.33/include/php/main -I/usr/local/Cellar/php54/5.4.33/include/php/TSRM -I/usr/local/Cellar/php54/5.4.33/include/php/Zend -I/usr/local/Cellar/php54/5.4.33/include/php/ext -I/usr/local/Cellar/php54/5.4.33/include/php/ext/date/lib -I/usr/local/include -I/usr/local/Cellar/php54/5.4.33/include/php/ext/hash -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php54-http-iQkoUm/pecl_http-2.1.2/php_http_buffer.c -o php_http_buffer.lo
/bin/sh /private/tmp/php54-http-iQkoUm/pecl_http-2.1.2/libtool --mode=compile clang -I. -I/private/tmp/php54-http-iQkoUm/pecl_http-2.1.2 -DPHP_ATOM_INC -I/private/tmp/php54-http-iQko
@freen
freen / slimRouteClosureTreatedAsMiddleware.php
Created June 18, 2013 18:45
Slim Route closure is treated as Route Middleware when I include Route Middleware after my Route Closure.
<?php
$app->get('/collection/:id/', function($id) use ($app) {
// This is true:
if('Slim\Route' === get_class($id)) {
die('Oh no it thinks my route closure is route middleware :(');
}
@freen
freen / zf-form-broken-composer-install.txt
Created May 22, 2013 22:05
Installing zendframework/zend-form via Composer is broken.
My composer.json:
{
"require": {
"slim/slim": "dev-master",
"slim/extras": "dev-develop",
"symfony/class-loader": "2.3.*@dev",
"zendframework/zend-db": "2.1.*@dev",
"zendframework/zend-form": "2.3.*@dev",
"mynetx/codebird-php": "dev-master",
@freen
freen / slim_still_generates_pretty_exception.php
Last active December 16, 2015 15:09
No matter what, I get a pretty Slim Application Error, with a 500 header
<?php
// ...
$loggerSettings = array(
'path' => APPLICATION_PATH . '/api/logs'
);
$app = new Slim(array(
'mode' => APPLICATION_ENV,
'debug' => false,
@freen
freen / zf2_sql_offset_limit_order.php
Last active December 15, 2015 14:08
ZF2 Zend\Db\Sql should know (for the MySQL platform) that OFFSET has to follow LIMIT.
<?php
// ...
// This works:
$select->from($table)
->group('id')
->limit($limit)
->offset($offset);
@freen
freen / gist:5006382
Created February 21, 2013 17:16
Symfony2 Exception - Attempting to implement a custom Authentication Provider. For some reason SF2 is loading the DaoAuthenticationProvider.
( ! ) Fatal error: Cannot access parent:: when current class scope has no parent in /[...]/WordRot/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php on line 43
Call Stack
# Time Memory Function Location
1 0.0001 228264 {main}( ) ../app_dev.php:0
2 0.0072 1213440 Symfony\Component\HttpKernel\Kernel->handle( ) ../app_dev.php:25
3 0.0187 1698352 Symfony\Bundle\FrameworkBundle\HttpKernel->handle( ) ../bootstrap.php.cache:617
4 0.0187 1700104 Symfony\Component\HttpKernel\HttpKernel->handle( ) ../bootstrap.php.cache:1566
5 0.0187 1700168 Symfony\Component\HttpKernel\HttpKernel->handleRaw( ) ../bootstrap.php.cache:1390
6 0.0187 1701016 Symfony\Component\HttpKernel\Debug\ContainerAwareTraceableEventDispatcher->dispatch( ) ../bootstrap.php.cache:1410
7 0.0189 1713000 Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch( ) ../ContainerAwareTraceableEventDispatcher.php:78