Can't get Curl working in Linux

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I can't get curl working in Arch Linux with php7, i'm getting the following message:



Fatal error: Uncaught Error: Call to undefined function curl_init()



I have the curl package installed and php package updated, the curl.so is present at /usr/lib/php/modules.



In my php.ini:



...
extension=curl.so
...


output of php -m:



Core
ctype
date
dom
fileinfo
filter
hash
json
libxml
mbstring
mysqlnd
openssl
pcntl
pcre
PDO
Phar
posix
readline
Reflection
session
SimpleXML
SPL
standard
tokenizer
xml
xmlreader
xmlwriter
zlib






share|improve this question


























    up vote
    1
    down vote

    favorite












    I can't get curl working in Arch Linux with php7, i'm getting the following message:



    Fatal error: Uncaught Error: Call to undefined function curl_init()



    I have the curl package installed and php package updated, the curl.so is present at /usr/lib/php/modules.



    In my php.ini:



    ...
    extension=curl.so
    ...


    output of php -m:



    Core
    ctype
    date
    dom
    fileinfo
    filter
    hash
    json
    libxml
    mbstring
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    Phar
    posix
    readline
    Reflection
    session
    SimpleXML
    SPL
    standard
    tokenizer
    xml
    xmlreader
    xmlwriter
    zlib






    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I can't get curl working in Arch Linux with php7, i'm getting the following message:



      Fatal error: Uncaught Error: Call to undefined function curl_init()



      I have the curl package installed and php package updated, the curl.so is present at /usr/lib/php/modules.



      In my php.ini:



      ...
      extension=curl.so
      ...


      output of php -m:



      Core
      ctype
      date
      dom
      fileinfo
      filter
      hash
      json
      libxml
      mbstring
      mysqlnd
      openssl
      pcntl
      pcre
      PDO
      Phar
      posix
      readline
      Reflection
      session
      SimpleXML
      SPL
      standard
      tokenizer
      xml
      xmlreader
      xmlwriter
      zlib






      share|improve this question














      I can't get curl working in Arch Linux with php7, i'm getting the following message:



      Fatal error: Uncaught Error: Call to undefined function curl_init()



      I have the curl package installed and php package updated, the curl.so is present at /usr/lib/php/modules.



      In my php.ini:



      ...
      extension=curl.so
      ...


      output of php -m:



      Core
      ctype
      date
      dom
      fileinfo
      filter
      hash
      json
      libxml
      mbstring
      mysqlnd
      openssl
      pcntl
      pcre
      PDO
      Phar
      posix
      readline
      Reflection
      session
      SimpleXML
      SPL
      standard
      tokenizer
      xml
      xmlreader
      xmlwriter
      zlib








      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 24 at 17:07









      jasonwryan

      46.6k14127175




      46.6k14127175










      asked Mar 24 at 16:49









      vaati

      162




      162




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          You need to check extensions path:



          # php -r "phpinfo();"|grep extension
          extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules


          Maybe curl.so must be located in another path (i.e. /usr/lib64/php/modules).



          Also you need to check if curl library libcurl exists.






          share|improve this answer






















          • php-config --extension-dir shows me /usr/lib/php/modules
            – vaati
            Mar 24 at 17:25










          • Have you installed php from packages or build it from source?
            – Yurij Goncharuk
            Mar 24 at 17:29










          • installed from official repository, with pacman -S php
            – vaati
            Mar 24 at 17:38










          • I've just updated answer about libcurl.
            – Yurij Goncharuk
            Mar 24 at 17:39










          • Sorry If my suggestions is not worked in Arch. I try to help you from Centos 7. After removing libcurl package, my php -m doesn't show me curl module. So, I assume that you not have libcurl.
            – Yurij Goncharuk
            Mar 24 at 17:44










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f433285%2fcant-get-curl-working-in-linux%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          You need to check extensions path:



          # php -r "phpinfo();"|grep extension
          extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules


          Maybe curl.so must be located in another path (i.e. /usr/lib64/php/modules).



          Also you need to check if curl library libcurl exists.






          share|improve this answer






















          • php-config --extension-dir shows me /usr/lib/php/modules
            – vaati
            Mar 24 at 17:25










          • Have you installed php from packages or build it from source?
            – Yurij Goncharuk
            Mar 24 at 17:29










          • installed from official repository, with pacman -S php
            – vaati
            Mar 24 at 17:38










          • I've just updated answer about libcurl.
            – Yurij Goncharuk
            Mar 24 at 17:39










          • Sorry If my suggestions is not worked in Arch. I try to help you from Centos 7. After removing libcurl package, my php -m doesn't show me curl module. So, I assume that you not have libcurl.
            – Yurij Goncharuk
            Mar 24 at 17:44














          up vote
          0
          down vote













          You need to check extensions path:



          # php -r "phpinfo();"|grep extension
          extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules


          Maybe curl.so must be located in another path (i.e. /usr/lib64/php/modules).



          Also you need to check if curl library libcurl exists.






          share|improve this answer






















          • php-config --extension-dir shows me /usr/lib/php/modules
            – vaati
            Mar 24 at 17:25










          • Have you installed php from packages or build it from source?
            – Yurij Goncharuk
            Mar 24 at 17:29










          • installed from official repository, with pacman -S php
            – vaati
            Mar 24 at 17:38










          • I've just updated answer about libcurl.
            – Yurij Goncharuk
            Mar 24 at 17:39










          • Sorry If my suggestions is not worked in Arch. I try to help you from Centos 7. After removing libcurl package, my php -m doesn't show me curl module. So, I assume that you not have libcurl.
            – Yurij Goncharuk
            Mar 24 at 17:44












          up vote
          0
          down vote










          up vote
          0
          down vote









          You need to check extensions path:



          # php -r "phpinfo();"|grep extension
          extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules


          Maybe curl.so must be located in another path (i.e. /usr/lib64/php/modules).



          Also you need to check if curl library libcurl exists.






          share|improve this answer














          You need to check extensions path:



          # php -r "phpinfo();"|grep extension
          extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules


          Maybe curl.so must be located in another path (i.e. /usr/lib64/php/modules).



          Also you need to check if curl library libcurl exists.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 24 at 17:37

























          answered Mar 24 at 17:13









          Yurij Goncharuk

          2,2582521




          2,2582521











          • php-config --extension-dir shows me /usr/lib/php/modules
            – vaati
            Mar 24 at 17:25










          • Have you installed php from packages or build it from source?
            – Yurij Goncharuk
            Mar 24 at 17:29










          • installed from official repository, with pacman -S php
            – vaati
            Mar 24 at 17:38










          • I've just updated answer about libcurl.
            – Yurij Goncharuk
            Mar 24 at 17:39










          • Sorry If my suggestions is not worked in Arch. I try to help you from Centos 7. After removing libcurl package, my php -m doesn't show me curl module. So, I assume that you not have libcurl.
            – Yurij Goncharuk
            Mar 24 at 17:44
















          • php-config --extension-dir shows me /usr/lib/php/modules
            – vaati
            Mar 24 at 17:25










          • Have you installed php from packages or build it from source?
            – Yurij Goncharuk
            Mar 24 at 17:29










          • installed from official repository, with pacman -S php
            – vaati
            Mar 24 at 17:38










          • I've just updated answer about libcurl.
            – Yurij Goncharuk
            Mar 24 at 17:39










          • Sorry If my suggestions is not worked in Arch. I try to help you from Centos 7. After removing libcurl package, my php -m doesn't show me curl module. So, I assume that you not have libcurl.
            – Yurij Goncharuk
            Mar 24 at 17:44















          php-config --extension-dir shows me /usr/lib/php/modules
          – vaati
          Mar 24 at 17:25




          php-config --extension-dir shows me /usr/lib/php/modules
          – vaati
          Mar 24 at 17:25












          Have you installed php from packages or build it from source?
          – Yurij Goncharuk
          Mar 24 at 17:29




          Have you installed php from packages or build it from source?
          – Yurij Goncharuk
          Mar 24 at 17:29












          installed from official repository, with pacman -S php
          – vaati
          Mar 24 at 17:38




          installed from official repository, with pacman -S php
          – vaati
          Mar 24 at 17:38












          I've just updated answer about libcurl.
          – Yurij Goncharuk
          Mar 24 at 17:39




          I've just updated answer about libcurl.
          – Yurij Goncharuk
          Mar 24 at 17:39












          Sorry If my suggestions is not worked in Arch. I try to help you from Centos 7. After removing libcurl package, my php -m doesn't show me curl module. So, I assume that you not have libcurl.
          – Yurij Goncharuk
          Mar 24 at 17:44




          Sorry If my suggestions is not worked in Arch. I try to help you from Centos 7. After removing libcurl package, my php -m doesn't show me curl module. So, I assume that you not have libcurl.
          – Yurij Goncharuk
          Mar 24 at 17:44












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f433285%2fcant-get-curl-working-in-linux%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay