Changing PHP Settings - Advanced

Our PHP configuration has been set to allow as many scripts as possible to run, but there are some programs that require special settings. You can override the entire default PHP configuration for a specific directory by creating and uploading a php.ini file:

  1. Open your favourite text editor such as Notepad.

  2. Enter the setting you wish to change, a list of some common ones can be found below.

  3. Save the file as php.ini (be careful of the file type, make sure you don't save it as php.ini.txt):


  4. Upload this file to the same directory as your script.

Some Common PHP Configuration Changes

upload_max_filesize = 8M

Changes the maximum file size that can be uploaded. This example changes it to 8MB, you can use any figure.

magic_quotes_gpc = On

Enables Magic Quotes

register_globals = On

Enables Register Globals

memory_limit = 64M

Increases the maximum amount of memory a PHP script can use. This example changes it to 64MB, you can use any figure.

  • 7 Users Found This Useful
Was this answer helpful?

Related Articles

Executing PHP scripts in a cron job

Using a cron job is a great way to automatically perform a task at regular intervals all the way...

Increasing PHP upload limit

By default the maximum file size you can upload via PHP is 2MB, but sometimes this isn't enough....

Checking PHP Settings

You can check the PHP settings for your account, or a particular directory in your account using...

SSH Access

Secure Shell Handler is a command-line interface to the server, the majority of tasks possible...

Unique IP Address

Every computer connected to the internet has a unique IP address, this is a unique number that...

Powered by WHMCompleteSolution