Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/313422-php-74-alternative-libcurl/
Share on other sites

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.