Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Thread Closed 
Solved: Thumbnail Generator Issue in 9.0.0
#23
Hi Tim,

The other MP3 file fails in /var/www/util/thumb-gen.php line 168 (file_get_contents):


Code:
workerLog('thumb-gen: 10');

        // Image file path, convert image to string
        if (strlen($imgStr) < 512) {
workerLog('thumb-gen: 11, imgStr = ' .$imgStr);
                //workerLog('thumb-gen: Image file: ' . $imgStr);
                $imgStr = file_get_contents($imgStr);
workerLog('thumb-gen: 12');
        }
        else {
                //workerLog('thumb-gen: Embedded image: ' . $file);
        }


My log shows:


Code:
20240528 211547 thumb-gen: 10
20240528 211547 thumb-gen: 11, imgStr =

The function file_get_contents seems a PHP build-in function?

Might be that getImage (using the Zend Framework) does not crash now, but returns an empty string. Would that cause file_get_contents to crash in PHP?
Update: seems that imgStr contains binary date: 4 bytes of '0x00'.

If I add '$image = false' to /var/www/util/thumb-gen.php near line 322 the thumbnail generator works fine:


Code:
                case 'mp3':
                        require_once __DIR__ . '/../inc/Zend/Media/Id3v2.php';
                        try {
                                $id3v2 = new Zend_Media_Id3v2($path, array('hash_only' => false)); // r44a

                                if (isset($id3v2->apic)) {
                                        //workerLog('thmcache; mp3: id3v2: apic->imageData: length: ' . strlen($id3v2->apic->imageData));
                                        $image = outImage($id3v2->apic->mimeType, $id3v2->apic->imageData);
$image = false; // OVERRIDE DUE TO BUG ???
                                }
                        }

Seems another issue in Zend Framework ($id3v2->apic->imageData seems to contain four bytes of '0x00', confusing outImage() ? )


-Frank


Messages In This Thread
Thumbnail Generator Issue in 9.0.0 - by haeckse - 05-22-2024, 03:28 PM
RE: Thumbnail Generator Issue in 9.0.0 - by radu- - 05-23-2024, 08:45 AM
RE: Thumbnail Generator Issue in 9.0.0 - by radu- - 05-23-2024, 12:21 PM
RE: Thumbnail Generator Issue in 9.0.0 - by radu- - 05-24-2024, 09:44 AM
RE: Thumbnail Generator Issue in 9.0.0 - by Nutul - 05-27-2024, 12:38 PM
RE: Thumbnail Generator Issue in 9.0.0 - by Mattt - 05-27-2024, 07:43 PM
RE: Thumbnail Generator Issue in 9.0.0 - by ftw64 - 05-27-2024, 08:30 PM
RE: Thumbnail Generator Issue in 9.0.0 - by ftw64 - 05-28-2024, 06:23 PM
RE: Thumbnail Generator Issue in 9.0.0 - by ftw64 - 05-28-2024, 07:06 PM
RE: Thumbnail Generator Issue in 9.0.0 - by ftw64 - 05-28-2024, 07:20 PM
RE: Thumbnail Generator Issue in 9.0.0 - by ftw64 - 05-28-2024, 08:06 PM
RE: Thumbnail Generator Issue in 9.0.0 - by ftw64 - 05-29-2024, 05:59 PM
RE: Thumbnail Generator Issue in 9.0.0 - by Nutul - 05-28-2024, 08:25 PM
RE: Thumbnail Generator Issue in 9.0.0 - by Nutul - 05-28-2024, 08:32 PM
RE: Thumbnail Generator Issue in 9.0.0 - by ftw64 - 05-31-2024, 08:02 PM
RE: Thumbnail Generator Issue in 9.0.0 - by radu- - 06-03-2024, 06:31 AM

Forum Jump: