php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73046 'ext/fileinfo/create_data_file.php' don't work on Fedora 24
Submitted: 2016-09-08 11:08 UTC Modified: 2016-09-09 07:53 UTC
From: spam2 at rhsoft dot net Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 7.0.11RC1 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: spam2 at rhsoft dot net
New email:
PHP Version: OS:

 

 [2016-09-08 11:08 UTC] spam2 at rhsoft dot net
Description:
------------
while trying to solve https://bugs.php.net/bug.php?id=67516 by use the systems "magic.mgc" in the rpm build-process this ends in a unuseable 'fileinfo.so' - the build process looks fine, the size reasonable but:
___________________________________________

Warning: finfo_open(): Failed to load magic database at '(null)'. in /mnt/data/lounge-daten/php-mimtype-bug/mime.php on line 15

Warning: finfo_file() expects parameter 1 to be resource, boolean given in /mnt/data/lounge-daten/php-mimtype-bug/mime.php on line 16


Warning: finfo_close() expects parameter 1 to be resource, boolean given in /mnt/data/lounge-daten/php-mimtype-bug/mime.php on line 17
___________________________________________

file-5.25-6.fc24.x86_64
file-libs-5.25-6.fc24.x86_64

https://koji.fedoraproject.org/koji/packageinfo?packageID=418


Test script:
---------------
%prep
%setup -q -n php-%{version}
%patch1 -p1

# generate 'data_file.c' from bundeled libmagic with current system data
/usr/bin/php ext/fileinfo/create_data_file.php /usr/share/misc/magic.mgc > ext/fileinfo/data_file.c
_____________________________________

above how i tried re-generate 'data_file.c' within rpmbuild (yes it's a bootsrap issue if PHP is not in any version installed but woul dbe OK for local packaging and can be warpped in a check if it exists too)



Expected result:
----------------
'data_file.c' created with updated magic-db and so for years fiuxed wrong detected filetypes corrected

Actual result:
--------------
unusable 'fileinfo.so' (--enable-fileinfo=shared) which loads but don#t work

Warning: finfo_open(): Failed to load magic database at '(null)'. in /mnt/data/lounge-daten/php-mimtype-bug/mime.php on line 15

Warning: finfo_file() expects parameter 1 to be resource, boolean given in /mnt/data/lounge-daten/php-mimtype-bug/mime.php on line 16


Warning: finfo_close() expects parameter 1 to be resource, boolean given in /mnt/data/lounge-daten/php-mimtype-bug/mime.php on line 17

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-08 23:00 UTC] ab@php.net
-Status: Open +Status: Not a bug
 [2016-09-08 23:00 UTC] ab@php.net
Thanks for the report. It is fine. Please check bug #67516 again - the magic database format might change from version to version. Bundling an incompatible magic file is same as using it externally.

Thanks.
 [2016-09-09 07:53 UTC] spam2 at rhsoft dot net
It is fine?

'ext/fileinfo/create_data_file.php' should realize that it's incompatible, do a exit(1) with e error message and so would stop 'rpmbuild' implicit instead compile and link for a long time to produce a non-working build without any warning
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 23:01:29 2024 UTC