CodeIgniter Forums
CodeIgniter 3.1.5 On Ubuntu 16.04 and few issues - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: CodeIgniter 3.1.5 On Ubuntu 16.04 and few issues (/thread-68740.html)



CodeIgniter 3.1.5 On Ubuntu 16.04 and few issues - ciadvantage - 08-18-2017

I tested to have CI 3.15 code based project on Ubuntu 16.04.  The strange error is it can not find the CURL extension
when I actually already had it enabled on server.  Anyone has same problem and how you solve it , I appreciate it!

Here are the system config on mine:

PHP 7.1.8-2+ubuntu16.04.1+deb.sury.org+4 (cli) (built: Aug  4 2017 13:04:12) ( NTS )
Copyright © 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright © 1998-2017 Zend Technologies
    with Zend OPcache v7.1.8-2+ubuntu16.04.1+deb.sury.org+4, Copyright © 1999-2017, by Zend Technologies

and the curl curl 7.49.0 (x86_64-pc-linux-gnu) libcurl/7.49.0
Protocols: dict file ftp gopher http imap pop3 rtsp smtp telnet tftp 
Features: Largefile UnixSockets 

Regards


RE: CodeIgniter 3.1.5 On Ubuntu 16.04 and few issues - jarmen_kell - 08-18-2017

check your "php.ini" and make sure it loaded CURL lib correctly
(no 'semicolon' at the extension line)

modify from this
Code:
;extension=php_curl.so

into this
Code:
extension=php_curl.so

then, use PHPINFO() to verify your php configuration.


RE: CodeIgniter 3.1.5 On Ubuntu 16.04 and few issues - Narf - 08-21-2017

There are separate php.ini files for each SAPI. You may've enabled it only for CLI, or only for mod_php, etc. On Ubuntu, this is the easiest way to enable it for all SAPIs:

Code:
sudo phpenmod curl

Or you might've forgotten to restart/reload the configuration after enabling it.

Code:
sudo service apache2 reload # for mod_php
sudo service php-7.0-fpm reload # for FPM