Install our PHP module

The Quanta PHP module is a PHP extension and will allow you to report information about the execution time of each part of your CMS.

Google_Chrome_2019-03-01_14-49-48_2x.png

Condition:

Before installing our PHP module, you should install the Quanta Agent
Indeed, the PHP module uses the Quanta agent to send its data back to our servers.
The PHP module is to be installed on each server running your PHP application.


 

In this Article

 

Install PHP for Debian:

You should have added the Quanta repository, already done if you completed the agent installation.

Given your PHP version, you will have to install the matching package

  • For PHP 5.3:
    apt-get install php53-quanta-mon
  • For PHP 5.4:
    apt-get install php54-quanta-mon
  • For PHP 5.5:
    apt-get install php55-quanta-mon
  • For PHP 5.6:
    apt-get install php56-quanta-mon
  • For PHP 7.0:
    apt-get install php70-quanta-mon
  • For PHP 7.1:
    apt-get install php71-quanta-mon
  • For PHP 7.2:
    apt-get install php72-quanta-mon
  • For PHP 7.3:
    apt-get install php73-quanta-mon

 

As from PHP 5.4, you will also need to activate the extension with the command:

php5enmod quanta_mon 

This command change from PHP7 to:

phpenmod quanta_mon

 

Install PHP for CentOS / RedHat:

You should have added the Quanta repository, already done if you completed the agent installation.

Given your PHP version, you will have to install the matching package

  • For PHP 5.3:
    yum install php53-quanta-mon
  • For PHP 5.4:
    yum install php54-quanta-mon
  • For PHP 5.5:
    yum install php55-quanta-mon
  • For PHP 5.6:
    yum install php56-quanta-mon
  • For PHP 7.0:
    yum install php70-quanta-mon
  • For PHP 7.1:
    yum install php71-quanta-mon
  • For PHP 7.2:
    yum install php72-quanta-mon

 

As from PHP 5.4, you will also need to activate the extension with the command:

php5enmod quanta_mon 

This command change from PHP7 to:

phpenmod quanta_mon

 

Install PHP for the other OS:

We do not provide packages for the other OS, however you can compile the module yourself, the sources are available on Github:
https://github.com/quanta-computing/quanta-php-module

Optional: Configure the URL of your backoffice if you use Magento

Is you are using Magento and a custom URL is used to access the Magento backoffice (i.e a URL that does not start with "/admin/")

You will have to modify the configuration of the module so that "Magento" type events are correctly reported in Quanta

The file is usually found in

/etc/php5/mods-available/quanta_mon.ini 

For Debian and

/etc/php.d/quanta_mon.ini

for Centos

However, this may vary depending on your PHP installation.

For example, if the URL of your back office is "http://admin.monsite.com/admin_123456/" you need to enter the following parameter:

quanta_mon.admin_url="/admin_123456/"

 

Reboot the web server

After installing the module, you will need to reboot the web service to load and enable the PHP extension.

  • For example if you're using Apache under Debian : 
    /etc/init.d/apache2 restart
  • If you're using PHP-FPM, the request might be: 
    /etc/init.d/php5-fpm restart

Checking if working properly

When everything is installed, and the web browsing scenario is created in Quanta, go to the Web Scenario menu, then click on "+ details" in the legend on one of the pages that require PHP to run (example: a Basket page that is usually never cached).

You should then see the "Application" tab (otherwise this tab is grayed out) of the information about the time spent in PHP like this:


Screen_Shot_2018-03-23_at_14.04.47.png

If you're using a Magento CMS (v1 or 2) or from OroCommerce platform, the color code will be different:
PHP3.png

 

And here you are ready to use Quanta!

Quanta_doodle.png

Have more questions? Submit a request

0 Comments

Article is closed for comments.