php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #81661 curl uses pkg-config as of PHP 7.4.0
Submitted: 2021-11-26 12:53 UTC Modified: 2021-12-28 10:09 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: oliver at erply dot com Assigned:
Status: Re-Opened Package: cURL related
PHP Version: 8.0.13 OS: Centos 7
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: oliver at erply dot com
New email:
PHP Version: OS:

 

 [2021-11-26 12:53 UTC] oliver at erply dot com
Description:
------------
I compiled PHP version 8.0.13 with following options:

./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --prefix=/opt/ews-24-80/php --libdir=/opt/ews-24-80/php/lib64 --with-config-file-path=/usr/local/etc/ews-24-80/php --with-apxs2=/opt/ews-24-80/apache2/bin/apxs --with-openssl --with-libxml-dir --with-pcre-regex --with-zlib --with curl=/opt/ews-24-80/curl


There are no errors indicating anything went wrong in the compiling process, however when running the test script shared below I get an error with Undefined constant. Using /opt/ews-24-80/curl directly from the CLI works fine.

CURL version used: 7.80.0

Same setup works fine with PHP 7.3

Test script:
---------------
<?php
print_r(CURLINFO_TOTAL_TIME_T);
?>

Expected result:
----------------
Get the actual value of CURLINFO_TOTAL_TIME_T constant.

Actual result:
--------------
#0 {main}
  thrown in /curl.php on line 2

Fatal error: Uncaught Error: Undefined constant "CURLINFO_TOTAL_TIME_T" in /curl.php on line 2

Error: Undefined constant "CURLINFO_TOTAL_TIME_T" in /curl.php on line 2

Call Stack:
    0.0003     390752   1. {main}() /curl.php:0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-11-26 13:28 UTC] cmb@php.net
-Summary: Undefined constant "CURLINFO_TOTAL_TIME_T" +Summary: curl uses pkg-config as of PHP 7.4.0 -Type: Bug +Type: Documentation Problem
 [2021-11-26 13:28 UTC] cmb@php.net
> --with curl=/opt/ews-24-80/curl

As of PHP 7.4.0, that argument is ignored; instead, pkg-config is
used to find the location of libcurl, and in your case it likely
finds an older version somewhere else.  Use PKG_CONFIG_PATH to
tell pkg-config where to look for your desired libcurl version.

Anyhow, that pkg-config change is not documented for curl yet[1],
so I'm switching to doc issue.

[1] <https://www.php.net/manual/en/curl.installation.php>
 [2021-12-28 07:41 UTC] oliver at erply dot com
-Status: Open +Status: Closed
 [2021-12-28 07:41 UTC] oliver at erply dot com
Thanks, I was now able to compile the package.
 [2021-12-28 10:09 UTC] cmb@php.net
-Status: Closed +Status: Re-Opened
 [2021-12-28 10:09 UTC] cmb@php.net
Good news, but this ticket should stay open until the docs are
updated.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Oct 02 16:05:51 2022 UTC