●バックアップ [root@web2 /www]# cp -p /etc/php.ini /etc/php.ini.org ●php.ini編集 [root@web2 /www]# vi /etc/php.ini 以下の内容に変更する。 [root@web2 /www]# diff -c /etc/php.ini /etc/php.ini.org *** /etc/php.ini Thu Nov 24 16:02:48 2011 --- /etc/php.ini.org Tue Nov 30 06:53:48 2010 *************** *** 302,317 **** ; (e.g. by adding its signature to the Web server header). It is no security ; threat in any way, but it makes it possible to determine whether you use PHP ; on your server or not. ! expose_php = Off ;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; ! max_execution_time = 60 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data ! memory_limit = 256M ; Maximum amount of memory a script may consume ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; --- 302,317 ---- ; (e.g. by adding its signature to the Web server header). It is no security ; threat in any way, but it makes it possible to determine whether you use PHP ; on your server or not. ! expose_php = On ;;;;;;;;;;;;;;;;;;; ; 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 request data ! memory_limit = 128M ; Maximum amount of memory a script may consume ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; *************** *** 345,351 **** ; ; - Show all errors, except for notices and coding standards warnings ; ! error_reporting = E_ALL & ~E_NOTICE ; ; - Show all errors, except for notices ; --- 345,351 ---- ; ; - Show all errors, except for notices and coding standards warnings ; ! ;error_reporting = E_ALL & ~E_NOTICE ; ; - Show all errors, except for notices ; *************** *** 357,375 **** ; ; - Show all errors, except coding standards warnings ; ! ;error_reporting = E_ALL ; Print out errors (as a part of the output). For production web sites, ; you're strongly encouraged to turn this feature off, and use error logging ; instead (see below). Keeping display_errors enabled on a production web site ; may reveal security information to end users, such as file paths on your Web ; server, your database schema or other information. ! display_errors = On ; Even when display_errors is on, errors that occur during PHP's startup ; sequence are not displayed. It's strongly recommended to keep ; display_startup_errors off, except for when debugging. ! display_startup_errors = On ; Log errors into a log file (server-specific log, stderr, or error_log (below)) ; As stated above, you're strongly advised to use error logging in place of --- 357,375 ---- ; ; - Show all errors, except coding standards warnings ; ! error_reporting = E_ALL ; Print out errors (as a part of the output). For production web sites, ; you're strongly encouraged to turn this feature off, and use error logging ; instead (see below). Keeping display_errors enabled on a production web site ; may reveal security information to end users, such as file paths on your Web ; server, your database schema or other information. ! display_errors = Off ; Even when display_errors is on, errors that occur during PHP's startup ; sequence are not displayed. It's strongly recommended to keep ; display_startup_errors off, except for when debugging. ! display_startup_errors = Off ; Log errors into a log file (server-specific log, stderr, or error_log (below)) ; As stated above, you're strongly advised to use error logging in place of *************** *** 474,486 **** auto_globals_jit = On ; Maximum size of POST data that PHP will accept. ! post_max_size = 50M ; Magic quotes ; ; Magic quotes for incoming GET/POST/Cookie data. ! magic_quotes_gpc = On ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. magic_quotes_runtime = Off --- 474,486 ---- auto_globals_jit = On ; Maximum size of POST data that PHP will accept. ! post_max_size = 8M ; Magic quotes ; ; Magic quotes for incoming GET/POST/Cookie data. ! magic_quotes_gpc = Off ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. magic_quotes_runtime = Off *************** *** 498,504 **** ; ; PHP's built-in default is text/html default_mimetype = "text/html" ! default_charset = "Shift_JIS" ; Always populate the $HTTP_RAW_POST_DATA variable. ;always_populate_raw_post_data = On --- 498,504 ---- ; ; PHP's built-in default is text/html default_mimetype = "text/html" ! ;default_charset = "iso-8859-1" ; Always populate the $HTTP_RAW_POST_DATA variable. ;always_populate_raw_post_data = On *************** *** 579,585 **** ;upload_tmp_dir = ; Maximum allowed size for uploaded files. ! upload_max_filesize = 50M ;;;;;;;;;;;;;;;;;; --- 579,585 ---- ;upload_tmp_dir = ; Maximum allowed size for uploaded files. ! upload_max_filesize = 2M ;;;;;;;;;;;;;;;;;; *************** *** 1122,1140 **** [mbstring] ; language for internal character representation. ! mbstring.language = Japanese ; internal/script encoding. ; Some encoding cannot work as internal encoding. ; (e.g. SJIS, BIG5, ISO-2022-*) ! mbstring.internal_encoding = SJIS ; http input encoding. ! mbstring.http_input = pass ; http output encoding. mb_output_handler must be ; registered as output buffer to function ! mbstring.http_output = pass ; enable automatic encoding translation according to ; mbstring.internal_encoding setting. Input chars are --- 1122,1140 ---- [mbstring] ; language for internal character representation. ! ;mbstring.language = Japanese ; internal/script encoding. ; Some encoding cannot work as internal encoding. ; (e.g. SJIS, BIG5, ISO-2022-*) ! ;mbstring.internal_encoding = EUC-JP ; http input encoding. ! ;mbstring.http_input = auto ; http output encoding. mb_output_handler must be ; registered as output buffer to function ! ;mbstring.http_output = SJIS ; enable automatic encoding translation according to ; mbstring.internal_encoding setting. Input chars are *************** *** 1145,1151 **** ; automatic encoding detection order. ; auto means ! mbstring.detect_order = SJIS,EUC-JP,UTF-8,JIS,ASCII ; substitute_character used when character cannot be converted ; one from another --- 1145,1151 ---- ; automatic encoding detection order. ; auto means ! ;mbstring.detect_order = auto ; substitute_character used when character cannot be converted ; one from another ●Apache再起動 [root@web2 /www]# /etc/init.d/httpd restart