Knowledgebase

How to change PHP Selector options

To change PHP Selector options in a CloudLinux environment, follow these steps:

  1. Access PHP Selector: Log in to your server's control panel (such as cPanel or Plesk) and navigate to the PHP Selector or Alt-PHP Manager section. This is where you can configure PHP options.

  2. Select PHP Version: Choose the PHP version you want to modify the options for. This can usually be done via a drop-down menu or similar interface in the PHP Selector.

  3. Access PHP Options: Look for an option like "PHP Options", "Select PHP Options", or similar wording. Click on it to access the configuration panel for the selected PHP version.

  4. Adjust PHP Options: In the PHP Options panel, you'll find a list of various settings that can be customized. These settings may include options related to memory limits, execution time, error reporting, and more.

  5. Modify the Desired Settings: Locate the specific options you want to change and adjust their values according to your requirements. For example, you can increase the max_execution_time to allow scripts to run for a longer period.

  6. Save Changes: Once you've made the necessary adjustments, look for a "Save" or "Apply" button and click it to save your changes.

  7. Verify Changes: It's a good practice to verify that the changes have taken effect. You can do this by running a PHP script that displays the current configuration using the phpinfo() function.

    Create a PHP file (e.g., phpinfo.php) with the following content:

    php

 

  • <?php phpinfo(); ?>

    Access this file through a web browser. It will display detailed information about your PHP configuration, including the changes you made.

  • Restart Web Server (if necessary): Depending on the changes you've made, you may need to restart your web server for the new PHP settings to take effect. This is especially important for changes related to performance or resource limits.

    Use one of the following commands based on your web server:

    For Apache:

    bash

 

sudo systemctl restart httpd

For Nginx with PHP-FPM:

bash
  1. sudo systemctl restart php-fpm sudo systemctl restart nginx

Remember that the exact steps and terminology may vary depending on your specific hosting panel and server configuration. If you're unsure about any of the steps, consult the documentation provided by your hosting provider or CloudLinux for specific instructions. Always make sure to back up any critical data and configurations before making significant changes to your server's PHP settings.

  • 0 Users Found This Useful
Was this answer helpful?