Re: After dist upgrade to Ubuntu 18.04, PHP 7.2 no longer finds the cURL module
luis jury <[email protected]> Tue, 21 Aug 2018 09:39:27 -0300
| Newsgroups | gmane.comp.web.curl.php |
|---|---|
| Message-ID | <CAHvF5s1bdNR4f7h=vUJAJEZv-=JRL3+dT5Ms77yJSkTdEE5Tbw@mail.gmail.com> |
--===============0651601363== Content-Type: multipart/alternative; boundary="000000000000b812b90573f151c7" --000000000000b812b90573f151c7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Dave, Looking at your phpinfo and php.ini, it looks like you don't have curl extension enabled. Anyway I'm not sure if you really have it installed for php 7.2??. You changed your php version, and you need to install modules as well, upgrading ubuntu won't install modules by default. Try to install it with: `sudo apt-get install php-curl`, (you can also try with `sudo apt-get install php7.2-curl` but, as ubuntu 18 default php versi=C3=B3n is 7.2, with the first command should work. ) Then try to enable it with: `phpenmod curl` if the second command doesn't work, try `phpenmod -v 7.2 curl` (-v is for the php version, but, as default is 7.2, this should not be required) That should do the work, but, if any of those works, look at your php.ini for php 7.2 and look for this line `;extension=3Dcurl` and delete the `;` character. (the `;`is a comment, so, your .ini is not loading that extension) if any of those works, please share the versi=C3=B3n of php running on your= cli, `php -v`. Most of the time upgrading Ubuntu is a bad idea, things like those always happen when doing a dist upgrade. Hope this work for you. Good luck! *ars longa, vita brevis* El mar., 21 ago. 2018 a las 3:04, Dave Nelson (<[email protected]>) escribi=C3= =B3: > Hi people, I was using cURL successfully on Ubuntu 16.04 (server > edition) with PHP 5.6, and did a distribution upgrade to Ubuntu 18.04. > That now gives me PHP 7.2. I'm using cURL for a NextCloud instance > (that was running quite happily). Now my NextCloud instance is giving > me the following message when I go to the login page: > > "PHP module cURL not installed. > Please ask your server administrator to install the module. > PHP modules have been installed, but they are still listed as missing? > Please ask your server administrator to restart the web server." > > Running 'php -m' lists curl as being there, and curl.so is indeed > present at /usr/lib/php/20170718/curl.so > > Why isn't PHP seeing cURL? And what's the solution? > > For info, there is a pastebin of my /etc/php/7.0/apache2/php.ini at > http://pasted.co/791ed426 > > There is a pastebin of my /etc/php/7.2/apache2/php.ini at > http://pasted.co/eb43179d > > And there is a pastebin of my /etc/php/7.2/apache2/conf.d/20-curl.ini > at http://pasted.co/6930a601 > > My PHP info can be seen at https://tardis.world/info.php > > Many thanks in advance for any help, > > Dave > _______________________________________________ > https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php > --000000000000b812b90573f151c7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi Dave,<br><br>Looking at your phpinfo=C2=A0and php.ini, = it looks like you don't have curl extension enabled. Anyway I'm not= sure if you really have it installed for=C2=A0php 7.2??. You changed your = php version, and you need to install modules as well, upgrading ubuntu won&= #39;t install modules by default.<br><br><div>Try to install it with:=C2=A0= `<font face=3D"monospace, monospace">sudo apt-get install php-curl`, (</fo= nt><font face=3D"arial, helvetica, sans-serif">you can also try with</font>= <font face=3D"monospace, monospace"> `sudo apt-get install php7.2-curl` </f= ont><font face=3D"arial, helvetica, sans-serif">but, as ubuntu 18 default p= hp versi=C3=B3n is 7.2, with the first command should work. )</font></div><= div>Then try to enable it with:=C2=A0`<font face=3D"monospace, monospace">p= hpenmod curl`</font></div><div>if the second command doesn't work, try = `<font face=3D"monospace, monospace">phpenmod -v 7.2 curl`</font> (-v is fo= r the php version, but, as default is 7.2, this should not be required)</di= v><div><br></div><div>That should do the work, but, if any of those works, = look at your php.ini for php 7.2 and look for this line `<span class=3D"gma= il-pun" style=3D"font-family:monospace,"Lucida Grande",Verdana,Ar= ial,Helvetica,sans-serif;font-size:13px;white-space:pre-wrap;outline:none;c= olor:rgb(102,102,0)">;</span><span class=3D"gmail-pln" style=3D"font-family= :monospace,"Lucida Grande",Verdana,Arial,Helvetica,sans-serif;fon= t-size:13px;white-space:pre-wrap;outline:none;color:rgb(0,0,0)">extension</= span><span class=3D"gmail-pun" style=3D"font-family:monospace,"Lucida = Grande",Verdana,Arial,Helvetica,sans-serif;font-size:13px;white-space:= pre-wrap;outline:none;color:rgb(102,102,0)">=3D</span><span class=3D"gmail-= pln" style=3D"font-family:monospace,"Lucida Grande",Verdana,Arial= ,Helvetica,sans-serif;font-size:13px;white-space:pre-wrap;outline:none;colo= r:rgb(0,0,0)">curl</span>` and delete the `;` character. (the `;`is a comme= nt, so, your .ini is not loading that extension)</div><div><br>if any of th= ose works, please share the versi=C3=B3n of php running on your cli, `php -= v`. Most of the time upgrading Ubuntu is a bad idea, things like those alwa= ys happen when doing a dist upgrade.=C2=A0</div><div><br></div><div>Hope th= is work for you.</div><div>Good luck!</div><div><br></div><div><div><div di= r=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div= dir=3D"ltr"><div><blockquote style=3D"margin:0px 0px 0px 0.8ex;border-left= -width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;paddi= ng-left:1ex"><span style=3D"color:rgb(0,0,0);font-family:modern;font-size:m= edium"><i>ars longa, vita brevis</i></span></blockquote></div></div></div><= /div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">El mar= ., 21 ago. 2018 a las 3:04, Dave Nelson (<<a href=3D"mailto:[email protected]= om">[email protected]</a>>) escribi=C3=B3:<br></div><blockquote class=3D"gm= ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le= ft:1ex">Hi people, I was using cURL successfully on Ubuntu 16.04 (server<br= > edition) with PHP 5.6, and did a distribution upgrade to Ubuntu 18.04.<br> That now gives me PHP 7.2. I'm using cURL for a NextCloud instance<br> (that was running quite happily). Now my NextCloud instance is giving<br> me the following message when I go to the login page:<br> <br> "PHP module cURL not installed.<br> Please ask your server administrator to install the module.<br> PHP modules have been installed, but they are still listed as missing?<br> Please ask your server administrator to restart the web server."<br> <br> Running 'php -m' lists curl as being there, and curl.so is indeed<b= r> present at /usr/lib/php/20170718/curl.so<br> <br> Why isn't PHP seeing cURL? And what's the solution?<br> <br> For info, there is a pastebin of my /etc/php/7.0/apache2/php.ini at<br> <a href=3D"http://pasted.co/791ed426" rel=3D"noreferrer" target=3D"_blank">= http://pasted.co/791ed426</a><br> <br> There is a pastebin of my /etc/php/7.2/apache2/php.ini at<br> <a href=3D"http://pasted.co/eb43179d" rel=3D"noreferrer" target=3D"_blank">= http://pasted.co/eb43179d</a><br> <br> And there is a pastebin of my /etc/php/7.2/apache2/conf.d/20-curl.ini<br> at <a href=3D"http://pasted.co/6930a601" rel=3D"noreferrer" target=3D"_blan= k">http://pasted.co/6930a601</a><br> <br> My PHP info can be seen at <a href=3D"https://tardis.world/info.php" rel=3D= "noreferrer" target=3D"_blank">https://tardis.world/info.php</a><br> <br> Many thanks in advance for any help,<br> <br> Dave<br> _______________________________________________<br> <a href=3D"https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php" rel= =3D"noreferrer" target=3D"_blank">https://cool.haxx.se/cgi-bin/mailman/list= info/curl-and-php</a><br> </blockquote></div> --000000000000b812b90573f151c7-- --===============0651601363== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KaHR0cHM6Ly9j b29sLmhheHguc2UvY2dpLWJpbi9tYWlsbWFuL2xpc3RpbmZvL2N1cmwtYW5kLXBocAo= --===============0651601363==--