Doc #81661 [Com]: curl uses pkg-config as of PHP 7.4.0

[email protected] ("stevewest56 at aol dot com") Wed, 03 May 2023 02:34:36 +0000
Newsgroups php.doc.bugs
Message-ID <[email protected]>
Edit report at https://bugs.php.net/bug.php?id=81661&edit=1

 ID:                 81661
 Comment by:         stevewest56 at aol dot com
 Reported by:        oliver at erply dot com
 Summary:            curl uses pkg-config as of PHP 7.4.0
 Status:             Re-Opened
 Type:               Documentation Problem
 Package:            cURL related
 Operating System:   Centos 7
 PHP Version:        8.0.13
 Block user comment: N
 Private report:     N

 New Comment:

(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


Previous Comments:
------------------------------------------------------------------------
[2022-12-27 09:18:30] 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

------------------------------------------------------------------------
[2021-12-28 10:09:07] [email protected]

Good news, but this ticket should stay open until the docs are
updated.

------------------------------------------------------------------------
[2021-12-28 07:41:38] oliver at erply dot com

Thanks, I was now able to compile the package.

------------------------------------------------------------------------
[2021-11-26 13:28:01] [email protected]

> --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-11-26 12:53:07] 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


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=81661&edit=1