原來的RE無法判斷「xxx@a.b.c.d」的格式,
若是網域的組成超過3個,就會驗證失敗,
因為花了一點時間優化以前的RE,並把網域的組成加到4個。
測試網站:https://regex101.com/
原RE:^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$
新RE:^[_\.0-9a-z-]+@([_0-9a-z-]*\.)+[a-z]{2,4}$
原RE:^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$
新RE:^[_\.0-9a-z-]+@([_0-9a-z-]*\.)+[a-z]{2,4}$
For package size reasons the Firefly Sung font to show Chinese characters in the statistics graphs is not included with LimeSurvey.
Please download it from http://sourceforge.jp/projects/sfnet_chinesepuppy/downloads/ChineseSupport/Fonts/fireflysung-1.3.0.tar.gz/ , unzip and put the fireflysung.tff file into the /fonts directory of your LimeSurvey installation.
# vim /var/www/html/limesurvey/application/config/config-defaults.php
$config['chartfontfile']='fireflysung.ttf'; //原設定值為auto
# rm -f /var/www/html/limesurvey/tmp/*.png
# grep --color -R "pdffontsize" /var/www/html/limesurvey/
/var/www/html/limesurvey/application/config/config-defaults.php:$config['pdffontsize'] = 8;
# vim /var/www/html/limesurvey/application/config/config-defaults.php
$config['pdffontsize'] = 16;
# vim /var/www/html/application/third_party/tcpdf/fonts/chinese.php
$enc='UniCNS-UTF16-H'; //原始值為UniGB-UTF16-H
$cidinfo=array('Registry'=>'Adobe', 'Ordering'=>'CNS1','Supplement'=>0); //原始值為GB1及2
# grep --color -R "載入未完成" /var/www/html/limesurvey/
二進位格式檔案 /var/www/html/limesurvey/locale/zh-Hant-TW/LC_MESSAGES/zh-Hant-TW.mo 符合
# mv zh-Hant-TW.mo zh-Hant-TW.mo.bak20130807
# wget http://myftp/limesurvey2-zh-tw.mo
# mv limesurvey2-zh-tw.mo zh-Hant-TW.mo
# vim /var/www/html/limesurvey/upload/templates/test/template.css //test模板名稱
279 /* Save All button */
280 .saveall {
281 font-size: 16px;
282 margin: 5px;
283 }
# yum install -y httpd php mysql mysql-server phpMyAdmin //phpMyAdmin來源為EPEL,repo檔請至EPEL官網下載安裝。
# yum install -y php-mbstring php-mysql // Multibyte String Functions及PDO database driver for MySQL模組
# service httpd start
# chkconfig httpd on
# service httpd restart
# vim /var/www/html/info.php
<?php
phpinfo();
?>
# chkconfig mysqld on
# service mysqld start
# mysqladmin -u root password 12345
# /usr/bin/mysql_secure_installation
Enter current password for root (enter for none): 12345
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
產生一個新的資料庫給LimeSurvey使用,可以用指令,也可以用phpMyAdmin。
# mysql -u root -p
Enter password:
mysqld>CREATE DATABASE cc_survey;
Query OK, 1 row affected (0.00 sec)
mysqld>quit
# wget http://www.limesurvey.org/en/stable-release/finish/25-latest-stable-release/900-limesurvey200plus-build130708.tar.gz
# tar zxvf limesurvey200plus-build130708.tar.gz
# cp -r limesurvey/* /var/www/html/
# chmod -R 777 /var/www/html/tmp
# chmod 777 /var/www/html/application/config/
# chmod -R 777 /var/www/html/upload/
# yum list | grep --color -Ew 'php-|gd|ldap|imap'
php-gd
php-ldap
php-imap
# yum install -y php-gd php-ldap php-imap
# service httpd restart