Knowledgebase

How to add own comments to PHP versions in PHP Selector

Adding custom comments to PHP versions in a PHP Selector typically involves modifying the PHP configuration files. Here's a general guide on how you might do this:

  1. Access Configuration Files:

    • Log in to your server via SSH or use a file manager provided by your hosting platform.
  2. Locate PHP Configuration Directory:

    • The PHP Selector configuration files are typically located in a directory like /opt/alt/phpXX/etc where XX corresponds to the PHP version you're interested in.
  3. Edit php.ini:

    • Inside the PHP configuration directory, you'll find a file named php.ini. Open it with a text editor. You might need superuser privileges to do this.
  4. Add Comments:

    • Scroll through the file and find a suitable place to add your comments. You can add comments by using a semicolon (;) at the beginning of a line.

    Example:

    ini

 

  • ; Custom comment here ; Another custom comment
  • Save the File:

    • After adding your comments, save the php.ini file.
  • Restart LiteSpeed:

    • To apply the changes, restart LiteSpeed. You can do this using the control panel provided by your hosting platform or via SSH with the command:

      bash

 

    • sudo service lsws restart
  1. Verify Comments:

    • Create a PHP file with phpinfo() a function to verify if your comments are displayed. Your comments should appear in the PHP info output.

Keep in mind that while this method allows you to add custom comments to the PHP configuration, it won't affect the actual behavior of PHP. These comments are for informational purposes and won't change how PHP functions.

Please note that the specific steps might vary depending on your hosting environment and control panel. Always consult the documentation or support resources provided by your hosting platform for the most accurate and specific instructions.

 
  • 0 Users Found This Useful
Was this answer helpful?