With this simple component you can force the user to use a secure connection to the server. Usage To force a SSL connection for a all the action for a single controller just add the force() call in your beforeFilter(). Controller Class: <?php class MyController extends AppController { var $name = 'My'; var $components = array('Ssl'); function beforeFilter() { parent:
New CakePHP 5.1 Chiffon. Faster. Simple. Delicious. What's new in 5.1 The migration guide has a complete list of what's new in 5.1. We recommend you give that page a read when upgrading. A few highlights from 5.1 are: new plugin commands Components can now have dependencies injected by the container Upgraded to support PHPUnit 11.1+ Improved enum validation More events, so you can observe your app
以前にも書いたんだけど、CentOS5系を利用していると、バリデーションのAlphaNumericが動作してくれない。その回答としては、環境に問題あるので、PCREをバージョンアップして、という風に書いたが、これだと、納品後どのサーバに配置するかによって、アプリケーションの動作に差が出てしまう。環境差によって差があるのであれば、それを検証するテスト書かなきゃいけなくなるので、今回は本体を修正して、環境非依存な状態にする方法を紹介する。 libsディレクトリの中にあるvalidation.phpを修正する。 修正前 function alphaNumeric($check) { $_this =& Validation::getInstance(); $_this->__reset(); $_this->check = $check; if (is_array($check)) { $_th
今回、自分なりにcore.phpの各設定値を調査してみたのでブログに載せておきます。 あまり情報が載っていなかった項目や、説明の意味が分かりにくかった項目があって 自分なりの解釈で行っている所もありますが、とりあえず全部の項目をまとめました。 今回、自分なりにcore.phpの各設定値を調査してみたのでブログに載せておきます。 あまり情報が載っていなかった項目や、説明の意味が分かりにくかった項目があって 自分なりの解釈で行っている所もありますが、とりあえず全部の項目をまとめました。 Configure::write(‘debug’, 0); 0 = 運用モード 1 = エラーと警告を表示 2 = エラーと警告、SQLを表示 3 = エラーと警告、SQL、コントローラのdumpを表示 Configure::write(‘App.encoding’, ‘UTF-8’); システム内部での文字コ
結論から言うと、初期状態では上手く動かない。 apacheの設定で、/appというパスがある特殊なフォルダにリンクされてしまい、CakePHPのappフォルダの中身にリンクしないからである。次の設定をしてやることで動くようになる。 cd /var/www/vhosts/あなたのドメイン/conf vim httpd_vh_base.confしてconfファイルを開く。そして、上から13行目あたりの Alias /app /var/www/vhosts/あなたのドメイン/appを、次のようにコメントアウトしてやる。 #Alias /app /var/www/vhosts/あなたのドメイン/appそして上書き保存し、apacheを再起動する。 以上でCakePHPのアプリが動くようになるはずだ。
A little over a week ago I finally got my cast removed from my right hand. It felt so good to get the cast off after 3-4 weeks of wearing one. I was unable to move my pinky finger nor wiggle my wrist for the first hour, but my hand is good as new now. However, the knuckle does not heal back in place so I no longer have a visible pinky knuckle (so weird looking). I still have some pain and discomfo
CakePHP のディレクトリ構成に関してちょっとハマって、とりあえず解決したのでメモ。 たとえば Cake を使っているときに http://example.com/test/ ってアドレスにアクセスすると、デフォルトでは test コントローラの index アクションに処理が移ると思います。しかしここで、すでにサイトに /test ってフォルダが存在する場合は 403 Forbidden のエラーになってしまいました。 Cake ではすでにその URL がページとして存在する場合、Cake に処理を移さずそのまま表示されます。それは問題なし。 しかし今回は /test フォルダはあるけれども、その配下に index.html がなかったため、/test 配下の一覧を表示できないよーという 403 Forbidden エラーになってしまうと。あ、ここには index.html 以外に必
*************************************************************************** CakePHP1.2+Smarty用View「SmartyView」説明書 Copyright 2008-2009 ECWorks ( http://www.ecworks.jp/ ) *************************************************************************** ダウンロードいただきましてありがとうございます。 本ドキュメントでは、SmartyViewの設置方法および設定方法について簡単に ご説明させていただきます。設置する前にご一読いただきますよう、お願い 申し上げます。 -----------------------------------------------
今回はCakePHPのデバッグに重要な「DEBUG値」を極めます。CakePHPバージョンは1.1系を対象としています。 DEBUG値とは DEBUG値は、app/config/core.php内で定義するDEBUG定数の値です。 app/config/core.php /** * Set debug level here: * - 0: production * - 1: development * - 2: full debug with sql * - 3: full debug with sql and dump of the current object * * In production, the "flash messages" redirect after a time interval. * With the other debug levels you get to c
function add() { if(empty($this->data)) { $this->set('login', null); } else { $this->cleanUpFields(); if($this->Login->save($this->data)) { if(is_object($this->Session)) { $this->Session->setFlash('The Login has been saved'); $this->redirect('/login/index'); } else { $this->flash('Login saved.', '/login/index'); } } else { if(is_object($this->Session)) { $this->Session->setFlash('Please correct er
Smarty を CakePHP で使用する方法を調べたメモ Smarty の用意 Smarty ディレクトリを/vendors ディレクトリへコピー /vendors/smarty/Smarty.class.php のようになる。 Smarty が使用するディレクトリを作成 /app/tmp/smarty/cache/ /app/tmp/smarty/compile/ Smarty 用の View クラスの準備 レンダリングを任せる Smarty View Class を設定します。 Smarty View Class をダウンロードして smarty.php とリネームして /app/views/ に配置する。 smarty という名前のサブディレクトリを使用しないなら $this->subDir = 'smarty'.DS; をコメントアウトする。 また、 $this->Smarty
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く