Top Nav

Install New Relic With Plesk 12.5

Plesk 12.5 allow for multiple PHP versions and integration methods. This is a great feature but it makes installing New Relic more difficult. New Relic by default installs to the Linux distribution’s version of PHP. With Plesk 12.5, there are multiple PHP versions in different locations. Also New Relic uses a unix socket to facilitate communication between the newrelic-daemon and the PHP component. When running PHP under php-fpm there are permission problems with multiple sites using New Relic. Here are the steps to get New Relic working on CentOS or RedHat. Other Linux distributions will be similar.

1. Install New Relic for the operating system following the standard instructions:

https://docs.newrelic.com/docs/agents/php-agent/installation/php-agent-installation-overview

2. Set the newrelic-daemon to run independently by copying the config file template:

3. Configure the newrelic-daemon to listen on a TCP port instead of a UNIX socket:

4. Start the newrelic-daemon:

5. Configure distribution provided PHP to use newrelic-daemon:

6. Restart Apache

7. Install New Relic on Plesk provided PHP installations using the instructions here:

https://docs.newrelic.com/docs/agents/php-agent/advanced-installation/php-agent-installation-non-standard-php-advanced

We’ll start with PHP 5.6:

8. Set the TCP port

9. Restart cooresponding php-fpm process:

10. Repeat steps 7, 8 and 9 for each additional PHP version installed on the server.

0

MySQL InnoDB File Per Table

By default MySQL 5.5 and prior store all InnoDB tables in a single table space or file. Improved performance and managability can be accheived by using the innodb_file_per_table option to cause MySQL to use a separate file for each table. This option is enabled by default on MySQL 5.6 and later.

To implement:
1. Add option to my.cnf:

2. Change table to use single file:

If you want to covert all databases then dump the entire database and import back into the server.

 

0

Mixing Basic Auth And IP Access Controls

In some cases you might want to require HTTP Basic authentication to a site but allow specific IP addresses to skip the username/password. For Apache this can be configured with:

For nginx the configuration is:

 

 

 

0

Magento SUPEE-7405 Parse Error

Applying the new SUPEE-7405 patch to Magento 1.7.0.2 (and probably other versions) results in a parse error in the sales order view page (admin/sales_order/view/order_id) if the site is running under PHP5.3. Here’s the error message:

The offending line is:

it can be changed to:

PHP 5.3 does not support the “[]” syntax for array initialization. Of course you should not be running PHP 5.3!

0

Plesk 12 / CentOS / PHP 5.3 Issue Causes “abrt” Crash From Yum

Recent on servers with Plesk 12 and the PHP 5.3 distribution from Odin, we’re seeing “abrt” crash reports from Yum with a back trace like:

Until Odin fixes their repository the only way to get updates to proceed normally is to disable the PHP 5.3 repository by editing:

And adding this line:

Since PHP 5.3 is EOL there aren’t any updates expected so disabling the repository should not cause problems.

 

0