How to Install Tideways on My Custom PHP Installation
When using our packages or the tarball, the installers look to identify the PHP installation based on common patterns. If you are using a method of installing PHP that is not very wide-spread or unsupported by us, you need to customly install the extension yourself.
This guide is here to help you with this.
Commonly this happens when you use:
-
a self compiled PHP installation into a custom directory
-
Plesk, cPanel or another web panel like software
The goal is to link the extension into your PHP’s extension directory and then add the required minimal php ini configuration and if the installer doesn’t find your PHP installation, you need to perform these steps manually.
Find out where the extension directory of your PHP installation is with the following command on the CLI:
php -r 'echo ini_get("extension_dir");'
Or with a script executed from your web-server with the contents:
<?php
// show-extension-dir.php
echo ini_get('extension_dir');
Or from the output of phpinfo by searching for the value of extension_dir
.
Then symlink the tideways extension for the correct PHP version to this directory. in this example we assume PHP 8.1 is used:
ln -sf /usr/lib/tideways/tideways-php-8.3.so /path/to/my/extension-directory/tideways.so
You then need to find the PHP.ini or the better the additional INI files directory, either on the CLI with:
php -r 'echo php_ini_loaded_file() . "\n" . php_ini_scanned_files();'
Or again a script executed on the webserver:
<?php
echo php_ini_loaded_file() . "<br />";
echo php_ini_scanned_files();
Or the phpinfo() output:
Lastly, put the minimal necessary configuration to load the tideways extension into the INI. Pick the additional files directory if its present and put a new tideways.ini in there:
extension=tideways.so
tideways.api_key=....
You then need to restart your Apache webserver or php-fpm to make this configuration visible to your PHP process. From here you can continue to configure Tideways.