You need to install the curl extension for PHP.
sudo apt-get install php8.2-curl
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I'm new at deployment on Linux servers. I have a Debian 11 server and i installed nginx and mysql. But i keep getting error on my queues like;
"Call to undefined function App\Helpers\curl_init()"
at my code;
$ch = curl_init();
I research about this problem and everyone says i have to enable "extension=curl" line in my php.ini. The problem is i have 4 php.ini in my server. When i type my terminal "php-v" i see i'm using php 8.2. When i go to "/etc/php/8.2" i have 4 folders;
apache2
cgi
cli
fpm
mods-available
Under first 4 folders, i have 4 php.ini. I tried enable every line on those files but still not working. I also check nginx site conf and i see this line;
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
So i thougth i have to edit this "fpm" folder php.ini. I'm so confused and spent 2 days with this problem. Any ideas?
Kind regards.
Please or to participate in this conversation.