PHP allows you to control different aspects of your websites by using directives in php.ini files. These files contain the default configuration for the operation of PHP applications.
By using PHP directives you can control different variables such as upload size, file timeout, and resource limit, etc of websites running on your hosting, VPS, or dedicated server.
To add or edit a PHP directive – Log in to your SANGKRIT.net account and follow these steps:
- Open cPanel of your server or hosting option
- Navigate to the File Manager interface via cPanel -> Home -> Files -> File Manager
- Make sure that hidden files are visible to you or you can enable them via Settings, by ticking the Show hidden files checkbox option
- Navigate to the target directory.
- Create a new file – click New File / + File button
- Enter
.user.ini
filename - Click Create New File button
- Select the new file from the list of files and click Edit
- Now enter the PHP directives you wish to adjust for the present directory
- Click the Save button
INI files can be configured on per-directory basis and are processed only by the CGI/FASTCGI SAPI. This functionality obsoletes the PECL htscanner extension. If you are running PHP as an Apache module then the .htaccess file will do your thing.
In addition to the main INI file, PHP scans each directory for its INI file. In a case where the PHP file has been kept outside the document root, only its directory is scanned.