471,616 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,616 software developers and data experts.

Symantec Using its own php.ini & IIS using its own.

Chrisjc
375 256MB
Good afternoon,
I am seeking some php configuration help. Here is the run down I am running Windows server 2003 and IIS V6.0 I have never had issues before until now. I have Symantec Antivirus 11.0 Manager, it controls all the Symantec clients in the company.

Now it uses a web interface for all of its commands and settings which is called (SEPM) This reporting unit uses php, Symantec by default is loading its php.ini from “C:\Program Files\Symantec\Symantec Endpoint Protection Manager\Php\php.ini”

Which is fine, however after I installed php 5.2.5 Symantec try’s to read the new php.ini located at “C:\Program Files\PHP\php.ini” When I need it to be reading from “C:\Program Files\Symantec\Symantec Endpoint Protection Manager\Php\php.ini” Because it is a custom php.ini for Symantec and the default php will not work. And I need the default php.ini for IIS websites.

So my question over all is, how can I run two php.ini files and make Symantec stop reading the default php location. Now I did contact Symantec support they gave me an article that tells me how to fix the registry to point to the correct one however this isn’t working.

Here is what the article says. THIS DIDN’T WORK unless I did it wrong? I did the regedit part.

Question/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 idividual 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:
1. Install and configure the FastCGI plugin for IIS:
1. The FastCGI plugin and instructions on installing it are included in CD2 of the Symantec Endpoint Protection (SEP) installation CD under the TOOL\NOSUPPORT\FASTCGI folder.
2. Follow the installation instructions contained in FASTCGI_SETUP_README.PDF contained in this folder.
2. After the FastCGI plugin is successfully installed, modify the fcgiext.ini:
1. Open My Computer and 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". Hit Enter.

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 idepended method:
1. Click Start->Run and type regedit. Hit Enter.
2. In the registry editor, expand My Computer, then HKEY_LOCAL_MACHINE\Software\
3. 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.
4. 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.
5. 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).
6. Close the registry editor
7. Click Start->Run and enter "iisreset.exe /restart". Hit 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. Hit Enter.
5. In the registry editor, expand My Computer, then HKEY_LOCAL_MACHINE\Software\
6. 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.
7. Right-click in the right-hand pane and choose New->Key.
8. Name the new registry key to correspond with the first 3 digits of the php-cgi.exe File version (ie 5.2.5 for the 5.2.5.5 version of PHP that ships with SEPM 11.0.2000).
9. Right-click on the right-hand pane and choosing New->String Value.
10. Name the new registry value IniFilePath.
11. 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).
12. Close the registry editor
13. Click Start->Run and enter "iisreset.exe /restart". Hit Enter.

Any ideas?

Thank you,

Chris
Jan 5 '09 #1
5 4372
Chrisjc
375 256MB
So I am going to take it that no one has ever used TWO php.ini files?
Jan 7 '09 #2
r035198x
13,262 8TB
My understanding is that since you have one PHP engine running, it will start using only one php.ini file.
Jan 8 '09 #3
Chrisjc
375 256MB
Correct, but is there anyway to make one application use a php.ini in another location... and then a 2nd php.ini be used by everything else...

Or are you stating that only one will work that you know of?

Thank you,

Chris
Jan 8 '09 #4
r035198x
13,262 8TB
If my understanding (stated above) is correct then I do not see how that is possible. The engine reads the php.ini at start up and uses it's settings for its subsequent execution. Using a different php.ini would require the engine to be reloaded (appserver to be restarted). Perhaps there is a way of starting multiple differently configured instances of the engine but I don't know about that one.
Jan 9 '09 #5
Chrisjc
375 256MB
hmm well I am just going to pull another server out of deep sleep and make it Mr. IIS Server. & let Mr. Symantec be on its own haha

Thanks for your help.
Jan 9 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

12 posts views Thread by Bill | last post: by
6 posts views Thread by George R. Gonzalez | last post: by
3 posts views Thread by rb | last post: by
reply views Thread by deba | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.