Posted under » PHP » Ubuntu updated on 13 April 2025
Other than using different versions of PHP which I think its quite obvious, some difference is a matter of configurations which may vary from one server from another. You can change all these from your PHP.ini file. In Ubuntu, its probably located at /etc/php/8.3/apache2/php.ini.
If you are not sure, you phpinfo() and you will find it.
You may want to adjust error reporting. If you are on development server its ok to see the messages, otherwise.. turn it off.
error_reporting = E_ALL & ~E_NOTICE
For some applications like moodle, you need to do this
max_input_vars = 5001
In old Ubuntu, the memory is set to 32mb. This is insufficient for most web server work.
memory_limit = 128M
If you want to have mail sending facilities ... .
When you done, you should restart Apache for the changes to come into effect.
You may wish to proceed in install missing PHP libraries.