|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57445 compilation error
Submitted: 2006-12-19 08:12 UTC Modified: 2007-02-15 09:37 UTC
From: indeyets at gmail dot com Assigned: mike (profile)
Status: No Feedback Package: pecl_http (PECL)
PHP Version: 5.1.4 OS: MacOS X 10.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: indeyets at gmail dot com
New email:
PHP Version: OS:


 [2006-12-19 08:12 UTC] indeyets at gmail dot com
I am trying to install package using pecl. It results in compilation error,

Exactly the same error is present in latest stable version

Actual result:
/private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c: In function '_http_request_body_encode':
/private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:209: error: 'curl_formget_callback' undeclared (first use in this function)
/private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:209: error: (Each undeclared identifier is reported only once
/private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:209: error: for each function it appears in.)
/private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:209: error: parse error before 'phpstr_append'
/private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:213: error: 'str' undeclared (first use in this function)
/private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:235: error: break statement not within loop or switch
/private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c: At top level:
/private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:238: error: parse error before 'case'
make: *** [http_request_body_api.lo] Error 1
ERROR: `make' failed


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-12 10:24 UTC]
What's the output of configure (regarding curl)?
 [2007-02-15 09:37 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

 [2008-06-25 17:20 UTC] ww dot galen at gmail dot com
I was experiencing the same issue when trying to install pecl_http 1.6.0 under MacOS X 10.4.11 and PHP 5.2.6_1 (installed via MacPorts).  The machine had both the Apple and MacPorts distributions of cURL.  The installer was finding Apple's installation of cURL rather than the MacPorts one.  Just hiding the native cURL by renaming files & folders wasn't sufficient, as the configure script wasn't checking where MacPorts had installed cURL (/opt/local).  Adding '/opt/local' before '/usr' in all directory searches in the configure script seemed to work.  This may not be a suitable alteration for pecl_http configuration in general; perhaps a port is in order.  Does anyone have any comments on whether the fix should be integrated into the main pecl_http package, or rolled into a port for MacPorts?  I'm guessing a similar fix is needed for Fink, adding '/sw' (I think) to the search paths.

I also needed to manually set extension_dir in php.ini and enable the extension, but this is (probably) a different issue.

Here's the patch for my changes:
--- config9.m4.orig     2008-06-25 15:51:48.000000000 -0400
+++ config9.m4  2008-06-25 16:18:58.000000000 -0400
@@ -21,6 +21,9 @@
 [  --with-http-magic-mime[=LIBMAGICDIR]
                            HTTP: with magic mime response content type guessing], "no", "no")
+SEARCHDIRS="/opt/local /usr/local /usr /opt"
 if test "$PHP_HTTP" != "no"; then
        ifdef([AC_PROG_EGREP], [
@@ -121,7 +124,7 @@
        if test "$PHP_HTTP_ZLIB_COMPRESSION" != "no"; then
                AC_MSG_CHECKING([for zlib.h])
-               for i in "$PHP_HTTP_ZLIB_COMPRESSION" "$PHP_ZLIB_DIR" "$PHP_ZLIB" /usr/local /usr /opt; do
                        if test -f "$i/include/zlib.h"; then
@@ -151,7 +154,8 @@
        if test "$PHP_HTTP_CURL_REQUESTS" != "no"; then
                AC_MSG_CHECKING([for curl/curl.h])
-               for i in "$PHP_HTTP_CURL_REQUESTS" /usr/local /usr /opt; do
+               for i in "$PHP_HTTP_CURL_REQUESTS" $SEARCHDIRS; do
+                       AC_MSG_RESULT([looking for curl.h in $i])
                        if test -f "$i/include/curl/curl.h"; then
@@ -322,7 +326,7 @@
                        ], [
                                AC_MSG_CHECKING([for event.h])
-                               for i in "$PHP_HTTP_CURL_LIBEVENT" /usr/local /usr /opt; do
+                               for i in "$PHP_HTTP_CURL_LIBEVENT" $SEARCHDIRS; do
                                        if test -f "$i/include/event.h"; then
@@ -370,7 +374,7 @@
        if test "$PHP_HTTP_MAGIC_MIME" != "no"; then
                AC_MSG_CHECKING([for magic.h])
-               for i in "$PHP_HTTP_MAGIC_MIME" /usr/local /usr /opt; do
+               for i in "$PHP_HTTP_MAGIC_MIME" $SEARCHDIRS; do
                        if test -f "$i/include/magic.h"; then
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 23:01:29 2024 UTC