| 
      1
     | 
    
      ●バックアップ
 
     | 
  
  
    | 
      2
     | 
    
      [root@web2 /www]# cp -p /etc/php.ini /etc/php.ini.org
 
     | 
  
  
    | 
      3
     | 
    
      
 
     | 
  
  
    | 
      4
     | 
    
      ●php.ini編集
 
     | 
  
  
    | 
      5
     | 
    
      [root@web2 /www]# vi /etc/php.ini
 
     | 
  
  
    | 
      6
     | 
    
      
 
     | 
  
  
    | 
      7
     | 
    
      以下の内容に変更する。
 
     | 
  
  
    | 
      8
     | 
    
      [root@web2 /www]# diff -c /etc/php.ini /etc/php.ini.org
 
     | 
  
  
    | 
      9
     | 
    
      *** /etc/php.ini        Thu Nov 24 16:02:48 2011
 
     | 
  
  
    | 
      10
     | 
    
      --- /etc/php.ini.org    Tue Nov 30 06:53:48 2010
 
     | 
  
  
    | 
      11
     | 
    
      ***************
 
     | 
  
  
    | 
      12
     | 
    
      *** 302,317 ****
 
     | 
  
  
    | 
      13
     | 
    
        ; (e.g. by adding its signature to the Web server header).  It is no security
 
     | 
  
  
    | 
      14
     | 
    
        ; threat in any way, but it makes it possible to determine whether you use PHP
 
     | 
  
  
    | 
      15
     | 
    
        ; on your server or not.
 
     | 
  
  
    | 
      16
     | 
    
      ! expose_php = Off
 
     | 
  
  
    | 
      17
     | 
    
      
 
     | 
  
  
    | 
      18
     | 
    
      
 
     | 
  
  
    | 
      19
     | 
    
        ;;;;;;;;;;;;;;;;;;;
 
     | 
  
  
    | 
      20
     | 
    
        ; Resource Limits ;
 
     | 
  
  
    | 
      21
     | 
    
        ;;;;;;;;;;;;;;;;;;;
 
     | 
  
  
    | 
      22
     | 
    
      
 
     | 
  
  
    | 
      23
     | 
    
      ! max_execution_time = 60     ; Maximum execution time of each script, in seconds
 
     | 
  
  
    | 
      24
     | 
    
        max_input_time = 60   ; Maximum amount of time each script may spend parsing request data
 
     | 
  
  
    | 
      25
     | 
    
      ! memory_limit = 256M      ; Maximum amount of memory a script may consume
 
     | 
  
  
    | 
      26
     | 
    
      
 
     | 
  
  
    | 
      27
     | 
    
      
 
     | 
  
  
    | 
      28
     | 
    
        ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
     | 
  
  
    | 
      29
     | 
    
      --- 302,317 ----
 
     | 
  
  
    | 
      30
     | 
    
        ; (e.g. by adding its signature to the Web server header).  It is no security
 
     | 
  
  
    | 
      31
     | 
    
        ; threat in any way, but it makes it possible to determine whether you use PHP
 
     | 
  
  
    | 
      32
     | 
    
        ; on your server or not.
 
     | 
  
  
    | 
      33
     | 
    
      ! expose_php = On
 
     | 
  
  
    | 
      34
     | 
    
      
 
     | 
  
  
    | 
      35
     | 
    
      
 
     | 
  
  
    | 
      36
     | 
    
        ;;;;;;;;;;;;;;;;;;;
 
     | 
  
  
    | 
      37
     | 
    
        ; Resource Limits ;
 
     | 
  
  
    | 
      38
     | 
    
        ;;;;;;;;;;;;;;;;;;;
 
     | 
  
  
    | 
      39
     | 
    
      
 
     | 
  
  
    | 
      40
     | 
    
      ! max_execution_time = 30     ; Maximum execution time of each script, in seconds
 
     | 
  
  
    | 
      41
     | 
    
        max_input_time = 60   ; Maximum amount of time each script may spend parsing request data
 
     | 
  
  
    | 
      42
     | 
    
      ! memory_limit = 128M      ; Maximum amount of memory a script may consume
 
     | 
  
  
    | 
      43
     | 
    
      
 
     | 
  
  
    | 
      44
     | 
    
      
 
     | 
  
  
    | 
      45
     | 
    
        ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
     | 
  
  
    | 
      46
     | 
    
      ***************
 
     | 
  
  
    | 
      47
     | 
    
      *** 345,351 ****
 
     | 
  
  
    | 
      48
     | 
    
        ;
 
     | 
  
  
    | 
      49
     | 
    
        ;   - Show all errors, except for notices and coding standards warnings
 
     | 
  
  
    | 
      50
     | 
    
        ;
 
     | 
  
  
    | 
      51
     | 
    
      ! error_reporting = E_ALL & ~E_NOTICE
 
     | 
  
  
    | 
      52
     | 
    
        ;
 
     | 
  
  
    | 
      53
     | 
    
        ;   - Show all errors, except for notices
 
     | 
  
  
    | 
      54
     | 
    
        ;
 
     | 
  
  
    | 
      55
     | 
    
      --- 345,351 ----
 
     | 
  
  
    | 
      56
     | 
    
        ;
 
     | 
  
  
    | 
      57
     | 
    
        ;   - Show all errors, except for notices and coding standards warnings
 
     | 
  
  
    | 
      58
     | 
    
        ;
 
     | 
  
  
    | 
      59
     | 
    
      ! ;error_reporting = E_ALL & ~E_NOTICE
 
     | 
  
  
    | 
      60
     | 
    
        ;
 
     | 
  
  
    | 
      61
     | 
    
        ;   - Show all errors, except for notices
 
     | 
  
  
    | 
      62
     | 
    
        ;
 
     | 
  
  
    | 
      63
     | 
    
      ***************
 
     | 
  
  
    | 
      64
     | 
    
      *** 357,375 ****
 
     | 
  
  
    | 
      65
     | 
    
        ;
 
     | 
  
  
    | 
      66
     | 
    
        ;   - Show all errors, except coding standards warnings
 
     | 
  
  
    | 
      67
     | 
    
        ;
 
     | 
  
  
    | 
      68
     | 
    
      ! ;error_reporting  =  E_ALL
 
     | 
  
  
    | 
      69
     | 
    
      
 
     | 
  
  
    | 
      70
     | 
    
        ; Print out errors (as a part of the output).  For production web sites,
 
     | 
  
  
    | 
      71
     | 
    
        ; you're strongly encouraged to turn this feature off, and use error logging
 
     | 
  
  
    | 
      72
     | 
    
        ; instead (see below).  Keeping display_errors enabled on a production web site
 
     | 
  
  
    | 
      73
     | 
    
        ; may reveal security information to end users, such as file paths on your Web
 
     | 
  
  
    | 
      74
     | 
    
        ; server, your database schema or other information.
 
     | 
  
  
    | 
      75
     | 
    
      ! display_errors = On
 
     | 
  
  
    | 
      76
     | 
    
      
 
     | 
  
  
    | 
      77
     | 
    
        ; Even when display_errors is on, errors that occur during PHP's startup
 
     | 
  
  
    | 
      78
     | 
    
        ; sequence are not displayed.  It's strongly recommended to keep
 
     | 
  
  
    | 
      79
     | 
    
        ; display_startup_errors off, except for when debugging.
 
     | 
  
  
    | 
      80
     | 
    
      ! display_startup_errors = On
 
     | 
  
  
    | 
      81
     | 
    
      
 
     | 
  
  
    | 
      82
     | 
    
        ; Log errors into a log file (server-specific log, stderr, or error_log (below))
 
     | 
  
  
    | 
      83
     | 
    
        ; As stated above, you're strongly advised to use error logging in place of
 
     | 
  
  
    | 
      84
     | 
    
      --- 357,375 ----
 
     | 
  
  
    | 
      85
     | 
    
        ;
 
     | 
  
  
    | 
      86
     | 
    
        ;   - Show all errors, except coding standards warnings
 
     | 
  
  
    | 
      87
     | 
    
        ;
 
     | 
  
  
    | 
      88
     | 
    
      ! error_reporting  =  E_ALL
 
     | 
  
  
    | 
      89
     | 
    
      
 
     | 
  
  
    | 
      90
     | 
    
        ; Print out errors (as a part of the output).  For production web sites,
 
     | 
  
  
    | 
      91
     | 
    
        ; you're strongly encouraged to turn this feature off, and use error logging
 
     | 
  
  
    | 
      92
     | 
    
        ; instead (see below).  Keeping display_errors enabled on a production web site
 
     | 
  
  
    | 
      93
     | 
    
        ; may reveal security information to end users, such as file paths on your Web
 
     | 
  
  
    | 
      94
     | 
    
        ; server, your database schema or other information.
 
     | 
  
  
    | 
      95
     | 
    
      ! display_errors = Off
 
     | 
  
  
    | 
      96
     | 
    
      
 
     | 
  
  
    | 
      97
     | 
    
        ; Even when display_errors is on, errors that occur during PHP's startup
 
     | 
  
  
    | 
      98
     | 
    
        ; sequence are not displayed.  It's strongly recommended to keep
 
     | 
  
  
    | 
      99
     | 
    
        ; display_startup_errors off, except for when debugging.
 
     | 
  
  
    | 
      100
     | 
    
      ! display_startup_errors = Off
 
     | 
  
  
    | 
      101
     | 
    
      
 
     | 
  
  
    | 
      102
     | 
    
        ; Log errors into a log file (server-specific log, stderr, or error_log (below))
 
     | 
  
  
    | 
      103
     | 
    
        ; As stated above, you're strongly advised to use error logging in place of
 
     | 
  
  
    | 
      104
     | 
    
      ***************
 
     | 
  
  
    | 
      105
     | 
    
      *** 474,486 ****
 
     | 
  
  
    | 
      106
     | 
    
        auto_globals_jit = On
 
     | 
  
  
    | 
      107
     | 
    
      
 
     | 
  
  
    | 
      108
     | 
    
        ; Maximum size of POST data that PHP will accept.
 
     | 
  
  
    | 
      109
     | 
    
      ! post_max_size = 50M
 
     | 
  
  
    | 
      110
     | 
    
      
 
     | 
  
  
    | 
      111
     | 
    
        ; Magic quotes
 
     | 
  
  
    | 
      112
     | 
    
        ;
 
     | 
  
  
    | 
      113
     | 
    
      
 
     | 
  
  
    | 
      114
     | 
    
        ; Magic quotes for incoming GET/POST/Cookie data.
 
     | 
  
  
    | 
      115
     | 
    
      ! magic_quotes_gpc = On
 
     | 
  
  
    | 
      116
     | 
    
      
 
     | 
  
  
    | 
      117
     | 
    
        ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
 
     | 
  
  
    | 
      118
     | 
    
        magic_quotes_runtime = Off
 
     | 
  
  
    | 
      119
     | 
    
      --- 474,486 ----
 
     | 
  
  
    | 
      120
     | 
    
        auto_globals_jit = On
 
     | 
  
  
    | 
      121
     | 
    
      
 
     | 
  
  
    | 
      122
     | 
    
        ; Maximum size of POST data that PHP will accept.
 
     | 
  
  
    | 
      123
     | 
    
      ! post_max_size = 8M
 
     | 
  
  
    | 
      124
     | 
    
      
 
     | 
  
  
    | 
      125
     | 
    
        ; Magic quotes
 
     | 
  
  
    | 
      126
     | 
    
        ;
 
     | 
  
  
    | 
      127
     | 
    
      
 
     | 
  
  
    | 
      128
     | 
    
        ; Magic quotes for incoming GET/POST/Cookie data.
 
     | 
  
  
    | 
      129
     | 
    
      ! magic_quotes_gpc = Off
 
     | 
  
  
    | 
      130
     | 
    
      
 
     | 
  
  
    | 
      131
     | 
    
        ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
 
     | 
  
  
    | 
      132
     | 
    
        magic_quotes_runtime = Off
 
     | 
  
  
    | 
      133
     | 
    
      ***************
 
     | 
  
  
    | 
      134
     | 
    
      *** 498,504 ****
 
     | 
  
  
    | 
      135
     | 
    
        ;
 
     | 
  
  
    | 
      136
     | 
    
        ; PHP's built-in default is text/html
 
     | 
  
  
    | 
      137
     | 
    
        default_mimetype = "text/html"
 
     | 
  
  
    | 
      138
     | 
    
      ! default_charset = "Shift_JIS"
 
     | 
  
  
    | 
      139
     | 
    
      
 
     | 
  
  
    | 
      140
     | 
    
        ; Always populate the $HTTP_RAW_POST_DATA variable.
 
     | 
  
  
    | 
      141
     | 
    
        ;always_populate_raw_post_data = On
 
     | 
  
  
    | 
      142
     | 
    
      --- 498,504 ----
 
     | 
  
  
    | 
      143
     | 
    
        ;
 
     | 
  
  
    | 
      144
     | 
    
        ; PHP's built-in default is text/html
 
     | 
  
  
    | 
      145
     | 
    
        default_mimetype = "text/html"
 
     | 
  
  
    | 
      146
     | 
    
      ! ;default_charset = "iso-8859-1"
 
     | 
  
  
    | 
      147
     | 
    
      
 
     | 
  
  
    | 
      148
     | 
    
        ; Always populate the $HTTP_RAW_POST_DATA variable.
 
     | 
  
  
    | 
      149
     | 
    
        ;always_populate_raw_post_data = On
 
     | 
  
  
    | 
      150
     | 
    
      ***************
 
     | 
  
  
    | 
      151
     | 
    
      *** 579,585 ****
 
     | 
  
  
    | 
      152
     | 
    
        ;upload_tmp_dir =
 
     | 
  
  
    | 
      153
     | 
    
      
 
     | 
  
  
    | 
      154
     | 
    
        ; Maximum allowed size for uploaded files.
 
     | 
  
  
    | 
      155
     | 
    
      ! upload_max_filesize = 50M
 
     | 
  
  
    | 
      156
     | 
    
      
 
     | 
  
  
    | 
      157
     | 
    
      
 
     | 
  
  
    | 
      158
     | 
    
        ;;;;;;;;;;;;;;;;;;
 
     | 
  
  
    | 
      159
     | 
    
      --- 579,585 ----
 
     | 
  
  
    | 
      160
     | 
    
        ;upload_tmp_dir =
 
     | 
  
  
    | 
      161
     | 
    
      
 
     | 
  
  
    | 
      162
     | 
    
        ; Maximum allowed size for uploaded files.
 
     | 
  
  
    | 
      163
     | 
    
      ! upload_max_filesize = 2M
 
     | 
  
  
    | 
      164
     | 
    
      
 
     | 
  
  
    | 
      165
     | 
    
      
 
     | 
  
  
    | 
      166
     | 
    
        ;;;;;;;;;;;;;;;;;;
 
     | 
  
  
    | 
      167
     | 
    
      ***************
 
     | 
  
  
    | 
      168
     | 
    
      *** 1122,1140 ****
 
     | 
  
  
    | 
      169
     | 
    
      
 
     | 
  
  
    | 
      170
     | 
    
        [mbstring]
 
     | 
  
  
    | 
      171
     | 
    
        ; language for internal character representation.
 
     | 
  
  
    | 
      172
     | 
    
      ! mbstring.language = Japanese
 
     | 
  
  
    | 
      173
     | 
    
      
 
     | 
  
  
    | 
      174
     | 
    
        ; internal/script encoding.
 
     | 
  
  
    | 
      175
     | 
    
        ; Some encoding cannot work as internal encoding.
 
     | 
  
  
    | 
      176
     | 
    
        ; (e.g. SJIS, BIG5, ISO-2022-*)
 
     | 
  
  
    | 
      177
     | 
    
      ! mbstring.internal_encoding = SJIS
 
     | 
  
  
    | 
      178
     | 
    
      
 
     | 
  
  
    | 
      179
     | 
    
        ; http input encoding.
 
     | 
  
  
    | 
      180
     | 
    
      ! mbstring.http_input = pass
 
     | 
  
  
    | 
      181
     | 
    
      
 
     | 
  
  
    | 
      182
     | 
    
        ; http output encoding. mb_output_handler must be
 
     | 
  
  
    | 
      183
     | 
    
        ; registered as output buffer to function
 
     | 
  
  
    | 
      184
     | 
    
      ! mbstring.http_output = pass
 
     | 
  
  
    | 
      185
     | 
    
      
 
     | 
  
  
    | 
      186
     | 
    
        ; enable automatic encoding translation according to
 
     | 
  
  
    | 
      187
     | 
    
        ; mbstring.internal_encoding setting. Input chars are
 
     | 
  
  
    | 
      188
     | 
    
      --- 1122,1140 ----
 
     | 
  
  
    | 
      189
     | 
    
      
 
     | 
  
  
    | 
      190
     | 
    
        [mbstring]
 
     | 
  
  
    | 
      191
     | 
    
        ; language for internal character representation.
 
     | 
  
  
    | 
      192
     | 
    
      ! ;mbstring.language = Japanese
 
     | 
  
  
    | 
      193
     | 
    
      
 
     | 
  
  
    | 
      194
     | 
    
        ; internal/script encoding.
 
     | 
  
  
    | 
      195
     | 
    
        ; Some encoding cannot work as internal encoding.
 
     | 
  
  
    | 
      196
     | 
    
        ; (e.g. SJIS, BIG5, ISO-2022-*)
 
     | 
  
  
    | 
      197
     | 
    
      ! ;mbstring.internal_encoding = EUC-JP
 
     | 
  
  
    | 
      198
     | 
    
      
 
     | 
  
  
    | 
      199
     | 
    
        ; http input encoding.
 
     | 
  
  
    | 
      200
     | 
    
      ! ;mbstring.http_input = auto
 
     | 
  
  
    | 
      201
     | 
    
      
 
     | 
  
  
    | 
      202
     | 
    
        ; http output encoding. mb_output_handler must be
 
     | 
  
  
    | 
      203
     | 
    
        ; registered as output buffer to function
 
     | 
  
  
    | 
      204
     | 
    
      ! ;mbstring.http_output = SJIS
 
     | 
  
  
    | 
      205
     | 
    
      
 
     | 
  
  
    | 
      206
     | 
    
        ; enable automatic encoding translation according to
 
     | 
  
  
    | 
      207
     | 
    
        ; mbstring.internal_encoding setting. Input chars are
 
     | 
  
  
    | 
      208
     | 
    
      ***************
 
     | 
  
  
    | 
      209
     | 
    
      *** 1145,1151 ****
 
     | 
  
  
    | 
      210
     | 
    
      
 
     | 
  
  
    | 
      211
     | 
    
        ; automatic encoding detection order.
 
     | 
  
  
    | 
      212
     | 
    
        ; auto means
 
     | 
  
  
    | 
      213
     | 
    
      ! mbstring.detect_order = SJIS,EUC-JP,UTF-8,JIS,ASCII
 
     | 
  
  
    | 
      214
     | 
    
      
 
     | 
  
  
    | 
      215
     | 
    
        ; substitute_character used when character cannot be converted
 
     | 
  
  
    | 
      216
     | 
    
        ; one from another
 
     | 
  
  
    | 
      217
     | 
    
      --- 1145,1151 ----
 
     | 
  
  
    | 
      218
     | 
    
      
 
     | 
  
  
    | 
      219
     | 
    
        ; automatic encoding detection order.
 
     | 
  
  
    | 
      220
     | 
    
        ; auto means
 
     | 
  
  
    | 
      221
     | 
    
      ! ;mbstring.detect_order = auto
 
     | 
  
  
    | 
      222
     | 
    
      
 
     | 
  
  
    | 
      223
     | 
    
        ; substitute_character used when character cannot be converted
 
     | 
  
  
    | 
      224
     | 
    
        ; one from another
 
     | 
  
  
    | 
      225
     | 
    
      
 
     | 
  
  
    | 
      226
     | 
    
      ●Apache再起動
 
     | 
  
  
    | 
      227
     | 
    
      [root@web2 /www]# /etc/init.d/httpd restart 
     |