Configuring PHP environment variables through your custom PHP.INI
- Date added:
- Wednesday, 09 June 2010
- Last revised:
- Thursday, 10 June 2010
Answer
This will walk you through how to use the php.ini file for the purpose of changing PHP environment variables.
- Locate the php.ini file in your /public_html folder or sub-folders of your hosting account.
- If you are unable to locate the php.ini file, simply create it in the directory of which the script requires it. If you do not know, contact your script developer/programmer.
Create a file in public_html called php.ini, add the following lines of code.
You can add / change:
register_globals = On / Off
upload_max_filesize = 30M
post_max_size = 30M
memory_limit = 30M
upload_tmp_dir = 30M
max_execution_time = 180
to view if your changes have taken place, you can create a phpinfo.php file. Add the following line of code to the blank file:
<? phpinfo(); ?>
Upload to the root of your site and load the page in your browser to see if the changes were made : eg www.yoursitename.com/phpinfo.php

