A custom php.ini
file can be constructed and placed in your web account. For instance,
using a text editor such as Notepad, you can create a php.ini file with
the following custom setting which would override our default server
setting. For instance:
file_uploads=off
The
php.ini file should only contain the custom settings - each on it's own
line (such as the above example). When completed, save the file and
upload it to an area (folder) on your web account where the rest of
your php files are located.
NOTE: The php.ini file will only affect PHP files located in the same
directory as it. It will not affect any PHP files in a subdirectory or
in another directory level. This means if you need the settings or
configurations to take place in multiple areas of your web site that are
stored within different folders, you must create and place a php.ini
file in every folder.
When you create a custom php.ini file it is used instead of the default
one on our server. This means you will also need to redefine some
settings in your php.ini to ensure maximum compatibility with our
servers. The base settings that must be redefined are determined by
the version of PHP you are running.
PHP4
register_globals = on
session.save_path = "/mnt/w9999/.phpsessions"
upload_tmp_dir = "/tmp/"
upload_max_filesize = 20000000
zend_extension = /usr/local/nf/share/ioncube/ioncube_loader_fre_4.4.so
PHP5
session.save_path = "/mnt/w9999/.phpsessions"
register_globals = on
upload_tmp_dir = "/tmp/"
upload_max_filesize = 20000000
zend_extension = /usr/local/nf/share/ioncube/ioncube_loader_fre_5.2.so
extension_dir = /usr/local/nf/php5/lib/php/extensions
extension=pdo_mysql.so
With the above lines added to your custom php.ini file you are now free to add your own settings or
overwrite the defaults. For a complete list of settings that you may
configure in the php.ini file, please refer to the PHP manual page found
at http://www.php.net/manual/en/ini.php. Please be informed that the
php.ini file does not require all of these settings; only enter the line
that you wish to change from the default value.
NOTE: Memory limits (ie. upload_max_filesize)
cannot be manipulated via a custom php.ini as they are dictated by the hosting plan that you subscribe to. To see your default php.ini settings, load the following lines of code into a server_info.php file and run the file in your browser:
<HTML>
<BODY>
<?php
phpinfo();
?>
</BODY>
</HTML>