+--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ 8 rows in set (0.04 sec)
#!/usr/bin/perl use strict; use warnings; system("cp /etc/php.ini centos_php_ini.txt"); open(FILE,'centos_php_ini.txt') or die "$!"; my @file=<FILE>; close(FILE); foreach my $line(@file){ $line=~s|short_open_tag = Off|short_open_tag = On|; $line=~s|expose_php = On|expose_php = Off|; $line=~s|max_execution_time = 30|max_execution_time = 300|; $line=~s|;default_charset = "UTF-8"|default_charset = "UTF-8"|; $line=~s|post_max_size = 8M|post_max_size = 20M|; $line=~s|upload_max_filesize = 2M|upload_max_filesize = 20M|; $line=~s|;date.timezone =|date.timezone = Asia/Tokyo|; $line=~s|;mbstring.language = Japanese|mbstring.language = Japanese|; $line=~s|;mbstring.internal_encoding = EUC-JP|mbstring.internal_encoding = UTF-8|; $line=~s|;mbstring.http_input = auto|mbstring.http_input = UTF-8|; $line=~s|;mbstring.http_output = SJIS|mbstring.http_output = pass|; $line=~s|;mbstring.encoding_translation = Off|mbstring.encoding_translation = Off|; $line=~s|;mbstring.detect_order = auto|mbstring.detect_order = auto|; $line=~s|;mbstring.substitute_character = none;|mbstring.substitute_character = none;|; } open(NEWFILE, '>centos_php_ini2.txt') or die "$!"; print NEWFILE @file; close(NEWFILE); system("sudo cp centos_php_ini2.txt /etc/php.ini"); |
From: <taro@shiken.com> To: <hanako@gmail.com> Subject: Test This is a test. |