When I receive the value using $_POST['Name'] it works, when I receive it using utf8_normalize_nfc(request_var('Name', '', true)) I receive an empty value (nothing at all).
I've tried several variations e.g. request_var('Name', '', false), with or without the utf8_normalize_nfc() but nothing so far as worked. request_var() simply returns an empty string every single time.
I've checked the Wiki article and searched, both just suggest repeatedly setting the 'true' in multibyte and it should work, but it is not.
Any suggestions are helpful. If you try the code below and it works for you please let me know, as it doesn't for me and that might indicate a problem with the PHPBB installation itself.
Board version: 3.1.2
PHP Version: 5.6.0
mbstring Multibyte Support: Enabled
mbstring Multibyte string engine: libmbfl
mbstring HTTP input encoding translation: disabled
libmbfl version: 1.3.2
Full code:
Code: Select all
<!DOCTYPE html>
<html>
<body>
<form name="Application" method=post action="/phpBB3/test.php" >
Name:<input type="text" name="Name" size=20 maxlength=15>
<input type="submit" value="Apply">
</form>
</body>
</html>
Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
include ($phpbb_root_path . 'includes/functions_display.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
$allow_bbcode = 1;
$allow_smilies = 1;
$allow_urls = 1;
echo utf8_normalize_nfc(request_var('Name', '', true));
//echo $_POST['Name'];
?>