Issues Following Ubuntu 18.04 Upgrade

Hi guys - I recently upgraded from Ubuntu 16.04 to 18.04. After logging into Invoice Ninja I get ‘Whoops, lookslike something went wrong’

My log shows

Symfony\Component\Debug\Exception\FatalThrowableError*** [0] : /var/www/ninja/app/Libraries/CurlUtils.php [Line 21] => Call to undefined function App\Libraries\curl_init()

php -m

[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
intl
json
libxml
mbstring
memcache
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

php -v

PHP 7.2.7-0ubuntu0.18.04.2 (cli) (built: Jul 4 2018 16:55:24) ( NTS )

I’ve tried clearing the php:artisan cache - no luck. One thing I did notice is that php-mcrypt is no longer available in PHP 7.2 for installation, not sure if this is the issue.

Any help greatly appreciated.

Many thanks!

Maybe this will help?

https://stackoverflow.com/questions/6382539/call-to-undefined-function-curl-init

Thanks Hillel - I can see from php -m that php-curl is already installed.

Running apt-get install php-curl confirms this.

Any ideas what else could be causing this?

Sorry, I’m not sure…

Managed to resolve this issue. For anyone else having the same issue after upgrading to Ubuntu 18.04.

Navigate to /etc/apache2/mods-enabled

ls -l

If you see php.7.0.conf then apache2 is still using an older version of PHP.

a2dismod php7.0 - Disable PHP 7.0

a2enmod php7.2 - Enable PHP 7.2

Restart Apache2

systemctl apache2 restart

Working again!

Great to hear, thanks for sharing the solution!