Tag Archives: PHP.INI

How To Configure PHP Directives On Your Server?

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:

  1. Open cPanel of your server or hosting option
  2. Navigate to the File Manager interface via cPanel -> Home -> Files -> File Manager
  3. Make sure that hidden files are visible to you or you can enable them via Settings, by ticking the Show hidden files checkbox option
  4. Navigate to the target directory.
  5. Create a new file – click New File / + File button
  6. Enter .user.ini filename
  7. Click Create New File button
  8. Select the new file from the list of files and click Edit
  9. Now enter the PHP directives you wish to adjust for the present directory
  10. 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.

Different Ways Of Increasing PHP Memory Limit When Using WordPress

Increasing PHP limit is easy. The most popular method of increasing PHP limit is by editing the PHP.ini file which is present on your site’s root directory. But here are few more menthods you can use for increasing PHP memory limit in your WordPress site.

Continue reading Different Ways Of Increasing PHP Memory Limit When Using WordPress

How To Easily Edit Your PHP.INI File From cPanel ?

What is PHP.INI File ? PHP.INI is a configuration file which is read when PHP starts up. For server module versions of PHP, it only happens once when the webserver is started. For the CGI and CLI versions, it happens on every invocation.

Continue reading How To Easily Edit Your PHP.INI File From cPanel ?