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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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.
 [2022-12-27 09:18 UTC] gallgeborg at gmail dot com
I'm happy to see the issue is soon regulated. Thankful to you for supporting us with the outcome. (https://www.cfa-home.com/)github.com
 [2023-05-03 02:34 UTC] stevewest56 at aol dot com
(https://www.cameo.com/jeremypiven)github.com
(https://www.facebook.com/jeremypivenpage/)github.com
(https://www.amazon.com/prime-video/actor/Jeremy-Piven/amzn1.dv.gti.785e61d6-1dd8-4777-88c4-b33c24097594)github.com
(https://pixarcars.fandom.com/wiki/Jeremy_Piven)github.com
(https://www.eonline.com/news/1371236/jeremy-piven-teases-his-idea-for-entourage-reboot)github.com
(https://www.rottentomatoes.com/celebrity/jeremy_piven)github.com
(https://twitter.com/jeremypiven)github.com
(https://www.emmys.com/bios/jeremy-piven)github.com
(https://www.blu-ray.com/Jeremy-Piven/70580/)github.com
(https://ramentertainment.com/jeremy-piven)github.com
(https://podcasts.apple.com/us/podcast/the-big-shark-jeremy-piven/id1558354780?i=1000608694599)github.com
(https://www.etonline.com/people/jeremy-piven)github.com
(https://www.ibdb.com/broadway-cast-staff/jeremy-piven-405986)github.com
(https://abcnews.go.com/GMA/Culture/video/jeremy-piven-talks-new-movie-sweetwater-98145023)github.com
(https://www.eonline.com/news/1371236/jeremy-piven-teases-his-idea-for-entourage-reboot)github.com
(https://www.youtube.com/watch?v=RtQRmT2cSAM)github.com
(https://www.instagram.com/jeremypiven/)github.com
(https://www.imdb.com/name/nm0005315/)github.com
(https://www.tvguide.com/celebrities/jeremy-piven/credits/3000397119/)github.com
(https://www.tcm.com/tcmdb/person/153053%7C174725/Jeremy-Piven#overview)github.com
(https://www.bravotv.com/watch-what-happens-live-with-andy-cohen/season-12/episode-96/videos/jeremy-pivens-mercury-poisoning)github.com
(https://www.tvinsider.com/people/jeremy-piven/)github.com
(https://en.wikipedia.org/wiki/Jeremy_Piven)github.com
(https://www.primetimer.com/item/Jeremy-Piven-to-host-celebrity-interview-podcast-How-U-Livin-J-Piven-WoSpdw)github.com
(https://www.imdb.com/name/nm0005315/news)github.com
(https://en.wikipedia.org/wiki/Jeremy_Piven)github.com
(https://www.the-sun.com/entertainment/tv/3810895/jeremy-piven-reveals-entourage-return-woke-twist-ari-gold/)github.com
(https://en.wikipedia.org/wiki/Jeremy_Piven)github.com
(https://www.imdb.com/title/tt3661590/)github.com
 [2023-05-04 09:06 UTC] samira dot akhlaqi314 at gmail dot com
This statement is incorrect. curl is a command-line tool and library for transferring data using various protocols, including HTTP, FTP, and SMTP. pkg-config is a tool used to retrieve information about installed libraries in the system, which can be used by other software to compile and link against those libraries.

PHP is a programming language that can be used to build web applications and has built-in support for using curl to make HTTP requests. However, PHP itself does not use pkg-config to interact with curl. Instead, it uses the curl library directly through its own functions and classes.

Therefore, the statement "curl uses pkg-config as of PHP 7.4.0" is incorrect.
(https://www.mylifetouch.us/)github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC