In the demo script demo.basic.php, it was working fine under PHP 5.3, but since I upgraded to PHP 5.5.15 the last statement just gives me a blank page:
echo '<pre>'. htmlentities(print_r($ThisFileInfo, true)). '</pre>';
Unless I change it to this:
echo '<pre>'. htmlentities(print_r($ThisFileInfo, true), ENT_COMPAT, 'iso-8859-1'). '</pre>';
And then it works fine.
getID3 version: 1.9.8-20140511
OS: Win7 x86
Chrome
htmlentities returning nothing in demo
-
- User
- Posts:3
- Joined:Sun Oct 05, 2014 3:51 pm
- Are you a spambot?:no
-
- getID3() v1 developer
- Posts:1477
- Joined:Fri May 04, 2001 4:00 pm
- Are you a spambot?:no
- Location:Northern Ontario, Canada
- Contact:
Re: htmlentities returning nothing in demo
The default character set for htmlentities changed from ISO-8859-1 to UTF-8 in PHP v5.4
getID3 by default should output UTF-8, unless you override $getid3->encoding.
I did a quick test with demo.basic.php on PHP v5.4.7 and htmlentities(print_r($ThisFileInfo, true)) and it worked fine.
Does this problem occur for you on only one particular sample file or all files?
Can you show the full code snippet you used to call getID3 and get blank output?
getID3 by default should output UTF-8, unless you override $getid3->encoding.
I did a quick test with demo.basic.php on PHP v5.4.7 and htmlentities(print_r($ThisFileInfo, true)) and it worked fine.
Does this problem occur for you on only one particular sample file or all files?
Can you show the full code snippet you used to call getID3 and get blank output?
-
- User
- Posts:3
- Joined:Sun Oct 05, 2014 3:51 pm
- Are you a spambot?:no
Re: htmlentities returning nothing in demo
I tested another random file and the same thing happens.
Code: Select all
$filename = 'Grind.mp3';
require_once('../getid3.php');
$getID3 = new getID3;
$ThisFileInfo = $getID3->analyze($filename);
getid3_lib::CopyTagsToComments($ThisFileInfo);
echo '<pre>'. htmlentities(print_r($ThisFileInfo, true)).'</pre>';
//echo '<pre>'. htmlentities(print_r($ThisFileInfo, true), ENT_COMPAT, 'iso-8859-1'). '</pre>';