Portal Home > Knowledgebase > How-to > PHP Configuration

PHP Configuration

Using the phpinfo() Function

If you're unsure where you're php.ini file is located, you can use the phpinfo() function to see all the settings of your PHP configuration including the config file directory. Create a new file called phpinfo.php and add the following code: 

<?php phpinfo(); ?>

Upload that file anywhere on your website and call it up in your browser.


Customizing your PHP.INI file

If you need a copy of the php.ini file, just contact our tech support and request for a copy, or you can create your own php.ini file using any text editor. If you create your own php.ini file, see samples of the command lines:

register_globals = On
safe_mode = Off ;not everything works with safe mode
max_execution_time = 300 ; Maximum execution time of each script, in seconds
max_input_time = 120 ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
file_uploads = On ;If you want users to be able to upload files using PHP scripts.
upload_max_filesize = 32M ;Max file size that can be uploaded.
disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open, allow_url_fopen, ini_set
enable_dl = Off

Many other command lines can be added in order to customize your PHP settings or you can just get a copy of the php.ini file from the server and modify it accordingly.

Was this answer helpful?

Print this Article Print this Article

Also Read
How to use WHM - Basics (Views: 3119)