Specifying which php.ini the Endpoint Protection Manager (SEPM) Reporting website uses

Article:TECH105051  |  Created: 2008-01-02  |  Updated: 2011-06-16  |  Article URL http://www.symantec.com/docs/TECH105051
Article Type
Technical Solution

Environment

Issue



How do you specify which php.ini file the Symantec Endpoint Protection Manager website uses?

Symptoms
Multiple PHP versions are installed to the same web server.

  • A non-default php.ini file is being used to set environment variables for the SEPM Reporting website.

 


Solution



PHP (PHP Hypertext Processor) will check several locations for instructions on how to load php.ini in a specific order. Depending on how many other websites are being hosted on the SEPM server, and what versions of PHP (PHP Hypertext Processor) they use, some of these methods may interfere with the working of other PHP installations on the server. The best method to use will vary depending on individual scenarios.


How PHP determines where to load php.ini from (this method is used for versions 5.2 and newer):

  1. The -c command-line option
  2. The PHPRC environment variable
  3. Version specific registry value (ie HKEY_LOCAL_MACHINE\Software\PHP\5.2.5\IniFilePath if the version of PHP used is 5.2.5)
  4. Version independent registry value
  5. Current working directory (ie C:\Program Files\Symantec\Symantec Endpoint Protection Manager\Php for a default installation of SEPM)
  6. The Windows directory (ie C:\Windows by default on Windows 2003)



Configuring where php.ini is loaded from using the command-line:

    Instructions for Windows 2003 (IIS 6)
    This method relies on using the unsupported FastCGI plugin to configure IIS to call the SEPM's PHP Common Gateway Interface (CGI) with a command-line option to specify the correct php.ini file. This plugin has been included in the supplemental materials on the SEP installation media since the release of SEP MR2.
    1. Install and configure the FastCGI plugin for IIS:
      1. The FastCGI plugin and instructions on installing it are included in the following locations:
        1. MR2 - RU5: CD2 of the Symantec Endpoint Protection (SEP) installation CD under the TOOL\NOSUPPORT\FASTCGI folder
        2. RU6: The Symantec Endpoint Protection (SEP) installation DVD under the TOOL\NOSUPPORT\FASTCGI folder
      2. Follow the installation instructions (FASTCGI_SETUP_README.PDF on pre-RU5 installation media or FastCGI.html in RU5 and later installation media) contained in this folder.
    2. After the FastCGI plugin is successfully installed, modify the fcgiext.ini:
      1. Browse to the inetsrv directory (C:\Windows\System32\inetsrv by default)
      2. Open fcgiext.ini with a text editor.
      3. Find the php related settings under the [PHP] header.
      4. Beneath the line beginning with ExePath, add the following line:
        • Arguments=-c "<path to php.ini> "
        • The default location for this file is C:\Program Files\Symantec\Symantec Endpoint Protection Manager\Php\php.ini
      5. Click Start->Run and enter "iisreset.exe /restart".
      6. Press Enter.

 

    Instructions for Windows 2008/2008R2 (IIS 7x)
    Specifying the php.ini file to use with IIS 7x requires the ability to utilize 8.3 file paths. Please ensure that you can successfully navigate to the SEPM php folder via 8.3 a compliant file path before proceeding.
    1. Open Internet Information Systems (IIS) Manager
    2. Expand the <hostname>node in the Connections pane
    3. Expand the Sites node, locate and expand the Symantec Web Server node then select Reporting
    4. Double-click the Handler Mappings icon in the /Reporting Home pane
    5. Locate and double-click on the Handler Mapping entry named PHP
    6. Modify the Executable path to <8.3-Path-to-SEPM-php-cgi.exe> -c <8.3-Path-to-SEPM-php.ini> (ie C:\Progra~2\Symantec\Symant~2\Php\php-cgi.exe -c C:\Progra~2\Symantec\Symant~2\Php\php.ini)
    7. Click the Start button, enter "iisreset.exe /restart" into the Start Search field and press the Enter key

Note: To find the 8.3 short name of a folder, use the dir /X command switch on a command prompt.

Note 2: It is possible that a folder does not have a 8.3 path if the HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation has been set to 1 before installing the Symantec Endpoint Protection Manager. Check http://support.microsoft.com/kb/121007 for more information on this registry key.


Configuring where php.ini is loaded from using the registry:

This method can affect how other versions of PHP load the php.ini on this system. If other versions of PHP are installed on this system, please use the version-specific method. Please make sure to back up the registry before making any changes

Version independent method:

  1. Click Start->Run and type regedit.
  2. Press Enter.
  3. In the registry editor, expand My Computer, then HKEY_LOCAL_MACHINE\Software\
  4. If the sub-key PHP does not exist
    1. Create it by right-clicking on the right-hand pane and choosing New->Key.
    2. Name the new registry key PHP.
  5. If the value IniFilePath does not exist
    1. Create it by right-clicking on the right-hand pane and choosing New->String Value.
    2. Name the new registry value IniFilePath.
  6. Modify the IniFilePath value and add the file path to the SEPM Php.ini file (ie C:\Program Files\Symantec\Symantec Endpoint Protection Manager\PHP\Php.ini).
  7. Close the registry editor
  8. Click Start->Run and enter "iisreset.exe /restart".
  9. Press Enter.



Version dependent method:

  1. Browse to the PHP sub-folder inside the SEPM folder (C:\Program Files\Symantec\Symantec Endpoint Protection Manager\Php by default).
  2. Right-click on php-cgi.exe and choose Properties.
  3. Select the Version tab. Note the first three digits of the 4-digit File version number.
  4. Click Start->Run and type regedit.
  5. Press Enter.
  6. In the registry editor, expand My Computer, then HKEY_LOCAL_MACHINE\Software\
  7. If the sub-key PHP does not exist
    1. Create it by right-clicking on the right-hand pane and choosing New->Key.
    2. Name the new registry key PHP.
  8. Right-click in the right-hand pane and choose New->Key.
  9. Name the new registry key to correspond with the first 3 digits of the php-cgi.exe File version (ie 5.3.1 for the 5.3.1.0 version of PHP that ships with SEPM 11.0.6000).
  10. Right-click on the right-hand pane and choosing New->String Value.
  11. Name the new registry value IniFilePath.
  12. Modify the IniFilePath value and add the file path to the SEPM Php.ini file (ie C:\program files\Symantec\Symantec Endpoint Protection Manager\PHP\Php.ini).
  13. Close the registry editor
  14. Click Start->Run and enter "iisreset.exe /restart".
  15. Press Enter.



 



Legacy ID



2008060213161448


Article URL http://www.symantec.com/docs/TECH105051


Terms of use for this information are found in Legal Notices