A script you want to use requires a different setting then we have set? No problem, you can change the setting via .htaccess -- php.ini would be used in a different setup and you can take the same directives that you would need to change and apply them to the .htaccess.
To change PHP settings via .htaccess, please do the following:
- Edit or create a .htaccess file via file manager or a text editor (basic text editor such as notepad) -- this is a simple text file with no special requirements
- There are two different directive types you need to use for different setting types
- php_value -- Used for strings (text) and integers (numbers)
- php_flag -- Used for boolean settings -- true, false, on, off, 1, 0
- Find the value you need to use at the php.ini directive list and find what type it is.
- Put the setting directive in to the .htaccess with the following syntax:
- php_value/flag setting_name value
- Save the .htaccess file to the directory that the script is in or one of the parent directories. If you want this file to be global throughout all your domains and subdomains, put the .htaccess file within your home directory -- the directory that holds all your domain directories.
- Test your script for the new settings and you're done.
NOTE: Not all php.ini directives can be changed via .htaccess.