The php.ini file is a configuration file where you can configure the PHP settings on the server. Depending on the software installed on servers, it may be necessary to change settings via
php.ini. In a standard server, once php.ini settings are configured, there is no need to edit them unless there is a special situation. However, changes to values or functions may be necessary for custom
software.
safe_mode
max_execution_time
max_input_time
memory_limit
register_globals
- magic_quotes_gpc
and many other properties can be changed.
How to
Edit?
You want to change the memory_limit property in php.ini. If you have not made any changes since the server installation, it defaults to 32M. To change this value to 256M, connect to the server via SSH and;
nano
/usr/local/lib/php.inirun this command. After running the command, the contents of the php.ini file will appear starting from the first line. To quickly find the property we are looking for, we switch to search mode with Ctrl+W. After switching to
search mode, when we type memory_limit and search, it will directly find the memory_limit property. By changing the value here to 256M and saving with Ctrl+X, our memory limit on the server will now be 256M. For changes to take effect, we need to restart the Apache
server with the /etc/init.d/httpd restart command.

You can change many other settings via php.ini in this way. What matters is performing these operations based on the error you receive for the script you want to install. The most commonly encountered issue is the safe_mode issue.
If a server’s php.ini file has safe_mode = off set, I do not recommend changing this. If the script you want to install gives an error stating that safe_mode = on is required, and you turn on safe mode to install this script, your sites among the other active sites
on the server that require safe_mode = off will give errors. Additionally, having safe mode enabled in older versions of PHP creates a security vulnerability. For this reason, if you are using a version older than PHP 5.3, we recommend keeping safe mode disabled.
Leave a Comment
* Your comment will be published after approval.
Comments
0No comments yet. Be the first to comment!