How to update php.ini settings
Author: admin admin Reference Number: AA-00433 Views: 27647 Created: 2016-11-24 16:35 Last Updated: 2025-08-15 09:35 0 Rating/ Voters

How to Update PHP.ini Settings

Overview

This guide will show you how to modify PHP settings on your iFastNet hosting account. Your hosting uses a user-friendly interface called "Select PHP Version" that allows you to easily change most PHP configuration settings without directly editing php.ini files.

What Are PHP.ini Settings?

PHP.ini is a configuration file that controls how PHP (the programming language that powers many websites) behaves on your server. These settings control things like:

  • How much memory PHP can use
  • How long scripts can run
  • File upload limits
  • Error reporting levels
  • Security settings

Accessing PHP Settings

Getting to cPanel

First, you'll need to access your cPanel control panel:

Method 1 - Via Client Portal:

  1. Go to https://ifastnet.com/portal/clientarea.php
  2. Log in with your account credentials
  3. Click the cPanel login button for easy access

Method 2 - Direct Access:

  1. Go to https://yourdomain.com/cpanel (replace "yourdomain.com" with your actual domain)
  2. Log in with your cPanel username and password

Finding the Select PHP Version Tool

  1. In cPanel, look for the "Software" section
  2. Click on "Select PHP Version"
  3. This tool makes PHP configuration much easier than traditional methods

Method 1: Managing PHP Extensions

Enabling and Disabling PHP Extensions

  1. In the Select PHP Version interface, you'll see a list of available PHP extensions
  2. Extensions are additional features that add functionality to PHP (like image processing, database connections, etc.)
  3. To enable an extension:
    • Find the extension in the list
    • Check the box next to it
    • Click "Save" at the bottom
  4. To disable an extension:
    • Uncheck the box next to the extension
    • Click "Save"

Common useful extensions include:

  • gd - For image processing
  • curl - For making web requests
  • mysqli - For MySQL database connections
  • zip - For handling ZIP files
  • json - For handling JSON data

Method 2: Changing PHP Options

Accessing PHP Options

  1. In the Select PHP Version interface, click the "Options" tab
  2. This opens a list of PHP settings you can modify
  3. Each setting has a current value that you can change

Important PHP Settings You Can Modify

Here are the key settings available and what they do:

allow_url_fopen

  • What it does: Allows PHP to open files from URLs
  • Typical values: On or Off
  • When to use: Enable if your scripts need to fetch content from other websites

date.timezone

  • What it does: Sets the default timezone for date/time functions
  • Example values: America/New_York, Europe/London, Asia/Tokyo
  • When to use: Set this to match your location or business timezone

disable_functions

  • What it does: Disables specific PHP functions for security
  • Common disabled functions: link,symlink,exec,shell_exec,system,passthru
  • When to use: These are usually disabled for security and shouldn't be changed unless specifically needed

display_errors

  • What it does: Shows PHP errors on web pages
  • Typical values: On or Off
  • When to use: Turn On for development/debugging, Off for live websites

error_reporting

  • What it does: Controls which types of errors are reported
  • Common values: E_ALL (show all errors), E_ERROR (only fatal errors)
  • When to use: Set to E_ALL during development, E_ERROR for production

file_uploads

  • What it does: Enables or disables file uploads
  • Typical values: On or Off
  • When to use: Enable if your website needs file upload functionality

include_path

  • What it does: Tells PHP where to look for included files
  • Default value: .:/opt/alt/php82/usr/share/pear:/opt/alt/php82/usr/share/php:/usr/share/pear:/usr/share/php
  • When to change: Usually leave as default unless you have specific requirements

log_errors

  • What it does: Enables logging of PHP errors to files
  • Typical values: On or Off
  • When to use: Keep On to track errors without showing them to visitors

mail.force_extra_parameters

  • What it does: Adds extra parameters to mail functions
  • When to use: Usually used for custom mail configurations

max_execution_time

  • What it does: Maximum time a script can run (in seconds)
  • Common values: 30, 60, 120, 300
  • When to use: Increase for scripts that need more time to complete

max_input_time

  • What it does: Maximum time for processing input data (in seconds)
  • Common values: 60, 120, 300
  • When to use: Increase for large file uploads or form processing

max_input_vars

  • What it does: Maximum number of input variables allowed
  • Common values: 1000, 3000, 5000
  • When to use: Increase if you have forms with many fields

mbstring.func_overload

  • What it does: Controls multi-byte string function overloading
  • Common values: 0 (disabled), 2, 4, 6
  • When to use: Usually left at 0 unless working with multi-byte character sets

mbstring.internal_encoding

  • What it does: Sets the internal character encoding
  • Common values: UTF-8, ISO-8859-1
  • When to use: Set to UTF-8 for international character support

memory_limit

  • What it does: Maximum amount of memory a script can use
  • Common values: 128M, 256M, 512M, 1024M
  • When to use: Increase for memory-intensive applications

open_basedir

  • What it does: Restricts file access to specified directories
  • When to use: Security setting, usually managed by your hosting provider

output_buffering

  • What it does: Controls output buffering
  • Common values: On, Off, or a number (buffer size)
  • When to use: Can help with performance and header management

post_max_size

  • What it does: Maximum size of POST data
  • Common values: 8M, 32M, 64M, 128M
  • When to use: Increase for large file uploads or form submissions

session.save_path

  • What it does: Where PHP sessions are stored
  • Default value: /opt/alt/php82/var/lib/php/session
  • When to change: Usually leave as default

short_open_tag

  • What it does: Allows short PHP opening tags (<?)
  • Typical values: On or Off
  • When to use: Generally recommended to keep Off for better compatibility

upload_max_filesize

  • What it does: Maximum size for uploaded files
  • Common values: 2M, 32M, 64M, 128M
  • When to use: Increase to allow larger file uploads

How to Change These Settings

  1. Click on the setting you want to modify
  2. Enter the new value in the text field
  3. Click "Apply" to save the change
  4. The change takes effect immediately

Method 3: Using .htaccess for Additional Control

What is .htaccess?

The .htaccess file is a configuration file that sits in your website's directory and can override certain server settings, including some PHP settings.

Creating or Editing .htaccess

  1. Access your File Manager in cPanel
  2. Navigate to your website's root directory (usually public_html)
  3. Look for the .htaccess file (it starts with a dot, so you may need to show hidden files)
  4. If it doesn't exist, create a new file named .htaccess
  5. Edit the file to add PHP settings

Common .htaccess PHP Settings

You can add these lines to your .htaccess file:

# Enable error display for debugging
php_value display_errors on

# Set memory limit
php_value memory_limit 256M

# Set upload file size limit
php_value upload_max_filesize 64M

# Set maximum POST size
php_value post_max_size 64M

# Set execution time limit
php_value max_execution_time 300

# Set timezone
php_value date.timezone "America/New_York"

Important .htaccess Notes

  • Be careful with .htaccess - incorrect syntax can break your website
  • Always backup your .htaccess file before making changes
  • Some settings may not work in .htaccess depending on server configuration
  • The Select PHP Version method is usually preferable and safer

Which Method Should You Use?

Use Select PHP Version When:

  • You want a user-friendly interface
  • You're not comfortable editing files manually
  • You want to enable/disable PHP extensions
  • You need to change common PHP settings

Use .htaccess When:

  • You need settings that aren't available in Select PHP Version
  • You want different settings for different directories
  • You're comfortable with manual file editing
  • You need quick, temporary changes

Troubleshooting

Common Issues and Solutions

Settings Not Taking Effect:

  • Wait a few minutes for changes to propagate
  • Clear your browser cache
  • Check if the setting is supported in your PHP version

Website Shows Errors After Changes:

  • Revert the last change you made
  • Check error logs in cPanel
  • Ensure syntax is correct in .htaccess

Can't Find Select PHP Version:

  • Make sure you're in the correct cPanel account
  • Look in the "Software" section
  • Contact support if the tool is missing

Additional Resources

Managing Your Hosting Account

Client Portal: https://ifastnet.com/portal/clientarea.php

  • Access your hosting dashboard
  • Monitor account usage
  • Quick access to cPanel tools

Direct cPanel Access: https://yourdomain.com/cpanel

  • Replace "yourdomain.com" with your actual domain
  • Direct access to all hosting tools
  • Manage files and databases

Getting Support

Support Portal: https://support.ifastnet.com/login.php

  • Get technical assistance with PHP configuration
  • First-time users: Register for an account before creating your first ticket
  • Include specific error messages when requesting help

Best Practices

  1. Always test changes on a development site first if possible
  2. Keep track of what you change so you can revert if needed
  3. Don't increase limits unnecessarily - higher limits can impact performance
  4. Use the Select PHP Version tool whenever possible for easier management
  5. Monitor your website after making changes to ensure everything works properly

When to Contact Support

Contact iFastNet support if:

  • You need help understanding which settings to change
  • Changes aren't taking effect after following these instructions
  • You encounter errors related to PHP configuration
  • You need assistance with specific hosting features
  • You're unsure about the impact of certain settings

When creating a support ticket, include:

  • What you're trying to achieve
  • Which settings you've tried to change
  • Any error messages you're seeing
  • Your domain name and PHP version

Your iFastNet hosting provides flexible PHP configuration options designed to give you control while maintaining server stability and security.

Quick Jump Menu