php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53436 RFE: add check for php headers in phpize
Submitted: 2010-12-01 15:49 UTC Modified: 2017-01-10 07:07 UTC
Votes:6
Avg. Score:3.0 ± 1.2
Reproduced:3 of 4 (75.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: fedora at famillecollet dot com Assigned:
Status: Wont fix Package: Compile Failure
PHP Version: 5.3SVN-2010-12-01 (SVN) OS: GNU/Linux (Fedora 14)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fedora at famillecollet dot com
New email:
PHP Version: OS:

 

 [2010-12-01 15:49 UTC] fedora at famillecollet dot com
Description:
------------
phpize is used to build pecl extension.
This script already does a lot of sanity check before the build.

On GNU/Linux distribution, PHP headers are available in a sub-package

phpize should check if header are available before running the build.

See : https://bugzilla.redhat.com/657812

Note than pecl command is usefull, even without "php-devel" to register/unregister packaged extension (--nobuild option), to list regitered extensions, etc.


Test script:
---------------
# yum remove php-devel # or any other command, apt, ...
# pecl install APC


Expected result:
----------------
49 source files, building
running: phpize
Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command.
ERROR: `phpize' failed



Patches

phpize.in.patch (last revision 2010-12-01 16:03 UTC by fedora at famillecollet dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-20 15:28 UTC] jani@php.net
-Package: *Compile Issues +Package: Compile Failure
 [2011-08-28 09:44 UTC] stas@php.net
This patch can not be incorporated as-is - it refers to "php-devel package", 
which has no meaning outside of certain binary distributions of PHP.

In general, I'm not sure why PECL command should always fail on --version if 
headers are not present, especially since, as you suggest, it may be useful 
without them. 

As for the build, if I understand correctly, the build would fail anyway if 
headers are not present, so how this patch improves things?
 [2011-08-28 09:44 UTC] stas@php.net
-Status: Open +Status: Feedback
 [2011-08-28 10:35 UTC] fedora at famillecollet dot com
-Status: Feedback +Status: Open
 [2011-08-28 10:35 UTC] fedora at famillecollet dot com
> This patch can not be incorporated as-is - it refers to "php-devel package", 
Yes, the message need to be more "generic"


> In general, I'm not sure why PECL command should always fail on --version
> if headers are not present,
Because phpize get version from headers (see phpize_get_api_numbers)


> so how this patch improves things?
Giving a comprehensive explanation to the user (the reason why the build fails)
 [2017-01-10 07:07 UTC] krakjoe@php.net
-Status: Open +Status: Wont fix
 [2017-01-10 07:07 UTC] krakjoe@php.net
This always was a downstream problem, and was fixed downstream.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Apr 28 14:01:33 2025 UTC