Question

I help to administer a shared hosting service, with multiple clients.

A lot of the sites on there are built by my company, so we set the newrelic.license in the web server's default php.ini to our new relic license.

However we have a client who has their own code, who wants to use new relic for reporting. I can add the newrelic.appname string to their site's php.ini using the Plesk hosting control panel, and it works fine. However when I add the client's newrelic.license string to the client's php.ini, it doesn't override the default license key.

This is shown by looking at a phpinfo.php file, as well as noticing that the client's data is coming through to our New Relic administration interface.

Versions are: Plesk hosting 11.5, New relic daemon 3.0, PHP5.3.3 running as FastCGI.

Does anyone know of any tricks to get the client's license key to come through?

Was it helpful?

Solution

PHP configuration files are order dependent. If the same parameter settings exists in more than one file the last one read will take precedent. It sounds like the client's php.ini file is read first and your default is read second. This sounds odd, and Plesk is not something with which I am intimately familiar, but it would explain what you are seeing.

If your client has access to the source code they can use the New Relic PHP API method call newrelic_set_appname (name,license) to set a unique name as well as their own license key.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top