chapinh Posted July 23, 2021 Share Posted July 23, 2021 I've been installing a separate libcurl module - compiled against a custom cURL installation. This seems to have stopped working with PHP 7.4. Prior to PHP 7.4, I could do: wget -O %phpversion%.tar.gz https://www.php.net/distributions/%phpversion%.tar.gz tar --no-same-owner -zxf %phpversion%.tar.gz cd %phpversion%/ext/curl /path/to/phpize ./configure --with-curl=/path/to/custom/curl --with-php-config=/path/to/php-config make ldd modules/curl.so And the ldd command would show it being linked to the curl in /path/to/custom/curl It seems that with PHP 7.4, the ability to specify a directory to --with-curl was removed. If you compare a ./configure --help with PHP 7.4 and PHP 7.3 PHP 7.4 --with-curl Include cURL support PHP 7.3 --with-curl=DIR Include cURL support Is there a reason for this or is this something that was overlooked by the folks that release PHP? Or am I missing something? Quote Link to comment https://forums.phpfreaks.com/topic/313422-php-74-alternative-libcurl/ Share on other sites More sharing options...
requinix Posted July 23, 2021 Share Posted July 23, 2021 PHP uses pkg-config. Make sure you've added your cURL libraries to it, or whatever process it takes I don't know. Then PHP should get the library from there. Quote Link to comment https://forums.phpfreaks.com/topic/313422-php-74-alternative-libcurl/#findComment-1588531 Share on other sites More sharing options...
chapinh Posted July 23, 2021 Author Share Posted July 23, 2021 Well... I didn't have to do that with PHP 7.3. But, that's not to say that the way I was doing it with PHP 7.3 was correct. Perhaps it wasn't and it just so happened to work. Ideally, I don't really want the custom cURL to be associated with anything system related. This version of cURL is compiled specifically intended to use with PHP only. That's what I liked about the way I could compile this with PHP 7.3 (and 7.2 and 7.1), I could "hide" the custom cURL and compile the PHP modules against it. I can kind of get around this by manually modifying the CURL_SHARED_LIBADD and INCLUDES variables in the resulting Makefile before issuing the make command. Just seems to me that PHP 7.4's libcurl is missing the option to specify a directory path with the --with-curl parameter. Quote Link to comment https://forums.phpfreaks.com/topic/313422-php-74-alternative-libcurl/#findComment-1588537 Share on other sites More sharing options...
kicken Posted July 23, 2021 Share Posted July 23, 2021 It's been a long time since I compiled PHP, or anything really, but if it's setup to use pkg-config then I presume what you'd do is use PKG_CONFIG_PATH to point to a location for your special version of curl. Something like PKG_CONFIG_PATH=/path/to/curl ./configure --with-curl The actual path you use may be different, it needs to point to the .pc file with the curl configuration information. Quote Link to comment https://forums.phpfreaks.com/topic/313422-php-74-alternative-libcurl/#findComment-1588541 Share on other sites More sharing options...
chapinh Posted July 23, 2021 Author Share Posted July 23, 2021 That works. I guess maybe I should have been doing that all along? Even for PHP 7.3 Quote Link to comment https://forums.phpfreaks.com/topic/313422-php-74-alternative-libcurl/#findComment-1588545 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.