Last active
March 19, 2020 14:18
-
-
Save murachi1208/b996e245c1133fb6fb13 to your computer and use it in GitHub Desktop.
Pukiwiki 1.5.2 キターので、早々に更新してみた(EUC⇒UTFにもしてみた) ref: https://qiita.com/murachi1208/items/7f6adeeb343f6a636152
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// max file size for upload on PHP(PHP default 2MB) | |
ini_set("upload_max_filesize","2M"); | |
↓ | |
ini_set("upload_max_filesize","50M"); | |
// Max file size for upload on script of PukiWikiX_FILESIZE | |
define('PLUGIN_ATTACH_MAX_FILESIZE', (1024 * 1024)); // default: 1MB | |
↓ | |
define('PLUGIN_ATTACH_MAX_FILESIZE', (51200 * 1024)); // default: 50MB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# chown -R apache:apache pukiwiki |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 最大アップロードサイズ | |
define('PLUGIN_DUMP_MAX_FILESIZE', 1024); // Kbyte | |
↓ | |
define('PLUGIN_DUMP_MAX_FILESIZE', 51200); // Kbyte |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: Not 'r+'. Don't check write permission here | |
//$ffile = fopen($filename, 'r') or | |
$ffile = fopen($filename, 'w+') or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ unzip pukiwiki-1_5_0_eucjp.zip | |
$ sudo /var/www/html/pukiwiki /var/www/html/pukiwiki.old | |
$ sudo cp -rp pukiwiki-1_5_0_eucjp /var/www/html/pukiwiki |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo su | |
# cd /var/www/html/pukiwiki | |
# sudo cp pukiwiki.old/pukiwiki.ini.php . | |
# sudo mv wiki wiki.old | |
# sudo cp -rp pukiwiki.old/wiki . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import glob | |
import codecs | |
files = glob.glob("*.txt") | |
for f_euc in files: | |
fname = f_euc[:len(f_euc) -4] | |
f_utf8 = codecs.decode(fname, 'hex').decode('euc-jp').encode('utf-8').hex().upper() + ".txt" | |
os.rename(f_euc, f_utf8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// max file size for upload on PHP(PHP default 2MB) | |
ini_set("upload_max_filesize","2M"); | |
↓ | |
ini_set("upload_max_filesize","50M"); | |
// Max file size for upload on script of PukiWikiX_FILESIZE | |
define('PLUGIN_ATTACH_MAX_FILESIZE', (1024 * 1024)); // default: 1MB | |
↓ | |
define('PLUGIN_ATTACH_MAX_FILESIZE', (51200 * 1024)); // default: 50MB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 最大アップロードサイズ | |
define('PLUGIN_DUMP_MAX_FILESIZE', 1024); // Kbyte | |
↓ | |
define('PLUGIN_DUMP_MAX_FILESIZE', 51200); // Kbyte |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB) | |
↓ | |
memory_limit = 80M ; Maximum amount of memory a script may consume (80MB) | |
; Maximum allowed size for uploaded files. | |
upload_max_filesize = 2M | |
↓ | |
upload_max_filesize = 50M | |
; Maximum size of POST data that PHP will accept. | |
post_max_size = 8M | |
↓ | |
post_max_size = 80M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: Not 'r+'. Don't check write permission here | |
//$ffile = fopen($filename, 'r') or | |
$ffile = fopen($filename, 'w+') or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# chown -R apache:apache pukiwiki |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PukiWiki 1.5.1 © 2001-2016 PukiWiki Development Team. Powered by PHP 5.x.x. HTML convert time: 0.065 sec. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="footer"> | |
Site admin: <a href="<?php echo $modifierlink ?>"><?php echo $modifier ?></a><p /> | |
<?php echo S_COPYRIGHT ?>. | |
Powered by PHP <?php echo PHP_VERSION ?>. HTML convert time: <?php echo elapsedtime() ?> sec. | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expose_php = On | |
↓ | |
expose_php = Off |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment