Skip to content

Instantly share code, notes, and snippets.

View teriyakisan's full-sized avatar

Hiroki Tanaka teriyakisan

View GitHub Profile
@teriyakisan
teriyakisan / gist:3780649
Created September 25, 2012 08:32
cakePHP2のShellでメール送信する内容を標準出力する
/** output check code **/
App::uses('Controller', 'Controller');
$this->controller = new Controller();
$this->controller->autoLayout = null;
$this->controller->autoRender = null;
$this->controller->output = null;
$this->controller->response = new CakeResponse();
$this->controller->set($content);
echo $this->controller->render('Emails/text/XXXXXXXXXX');
exit();
@teriyakisan
teriyakisan / mod_rpaf-2.0.c.patch
Created May 17, 2012 03:30
mod_rpafのApache2.4系対応パッチ / patch file of mod_rpaf for apache 2.4+
--- mod_rpaf-2.0.c.org 2012-05-17 12:05:34.082130109 +0900
+++ mod_rpaf-2.0.c 2012-05-17 12:16:41.648138252 +0900
@@ -147,8 +147,8 @@
static apr_status_t rpaf_cleanup(void *data) {
rpaf_cleanup_rec *rcr = (rpaf_cleanup_rec *)data;
- rcr->r->connection->remote_ip = apr_pstrdup(rcr->r->connection->pool, rcr->old_ip);
- rcr->r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(rcr->r->connection->remote_ip);
+ rcr->r->connection->client_ip = apr_pstrdup(rcr->r->connection->pool, rcr->old_ip);
+ rcr->r->connection->client_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(rcr->r->connection->client_ip);