August 11, 2006
///// フォーム送信でバックスラッシュが割り込む /////
magic_quotes_gpcがON設定となっていると、フォームから受け取った文字の中に\(バックスラッシュ)、"(ダブルクォーテーション)、'(シングルクォーテーション)があった際、その後ろに自動で「\」をつけエスケープ処理を行います。SQL injection 対策でもあるのですが、SJIS の文字コードの場合、パソコンの「ソ」のコードは「0x83 0x5c」なので、「パソコン」→「パソ\コン」となり、上手く表示ができなくなります。
PHP.ini - magic_quotes_gpc を OFF
htaccess - php_flag magic_quotes_gpc off
Code - if (get_magic_quotes_gpc()) { $str = stripslashes($str); }
///// サイズが大きいファイルをアップロードできない /////
/etc/httpd/conf.d/php.conf 内の以下の個所を変更する。
#
# Cause the PHP interpreter handle files with a .php extension.
#
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
</Files>
///// メモリ不足エラー /////
/etc/php.ini 内の以下の個所を変更する。
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing...
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
Posted by funa : 05:13 PM | Web | Comment (0) | Trackback (0)
| < August 2006 > | ||||||
| Sun | Mon | Tue | Wed | Thi | Fri | Sat |
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||