To modify your PHP settings you need to edit the php.ini file.
There are some possible locations on Ubuntu for php.ini like
# locate php.ini
/etc/php/8.3/apache2/php.ini
/etc/php/8.3/cgi/php.ini
/etc/php/8.3/cli/php.ini
Ubuntu Server Tutorials
To modify your PHP settings you need to edit the php.ini file.
There are some possible locations on Ubuntu for php.ini like
# locate php.ini
/etc/php/8.3/apache2/php.ini
/etc/php/8.3/cgi/php.ini
/etc/php/8.3/cli/php.ini
To restart Apache on Ubuntu you have some options to execute.
A simple restart:
sudo service apache2 restart