PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 3.2.7
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v3.2.7
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / rosell-dk / locate-binaries / README.md

README.md in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 3.2.7, at vendor/rosell-dk/locate-binaries/README.md

40 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # Locate Binaries
2
3 [](https://github.com/rosell-dk/locate-binaries/actions/workflows/php.yml![Build Status](https://github.com/rosell-dk/locate-binaries/workflows/build/badge.svg)](https://github.com/rosell-dk/locate-binaries/actions/workflows/php.yml](https://github.com/rosell-dk/locate-binaries/actions/workflows/php.yml)
4 [](http://little-b.it/locate-binaries/code-coverage/coverage/index.html![Coverage](https://img.shields.io/endpoint?url=https://little-b.it/locate-binaries/code-coverage/coverage-badge.json)](http://little-b.it/locate-binaries/code-coverage/coverage/index.html](http://little-b.it/locate-binaries/code-coverage/coverage/index.html)
5 [](https://github.com/rosell-dk/locate-binary/blob/master/LICENSE![Software License](https://img.shields.io/badge/license-MIT-418677.svg)](https://github.com/rosell-dk/locate-binary/blob/master/LICENSE](https://github.com/rosell-dk/locate-binary/blob/master/LICENSE)
6 [](https://packagist.org/packages/rosell-dk/locate-binaries![Latest Stable Version](https://img.shields.io/packagist/v/rosell-dk/locate-binaries.svg)](https://packagist.org/packages/rosell-dk/locate-binaries](https://packagist.org/packages/rosell-dk/locate-binaries)
7 [](https://php.net![Minimum PHP Version](https://img.shields.io/packagist/php-v/rosell-dk/locate-binaries)](https://php.net](https://php.net)
8
9 Just a little class for locating binaries.
10 You need `exec()`, `shell_exec()` or similar enabled for it to work. Otherwise, it will throw.
11
12 Works on Linux, Windows and Mac.
13
14 ## Usage
15
16 To locate installed `cwebp` binaries (found on Linux with `which -a`, falling back to `whereis -b`; on Windows found using `where`):
17 ```
18 $cwebBinariesFound = LocateBinaries::locateInstalledBinaries('cwebp');
19 ```
20 Note that you get an array of matches - there may be several versions of a binary on a system.
21
22 The library also adds another method for locating binaries by peeking in common system paths, such as *usr/bin* and `C:\Windows\System32`
23 However, beware that these dirs could be subject to open_basedir restrictions which can lead to warning entries in the error log. The other method is therefore best.
24
25 Well warned, here it is the alternative, which you in some cases might want to fall back to after trying the first.
26 ```
27 $imagickBinariesFound = LocateBinaries::locateInCommonSystemPaths('convert');
28 ```
29
30 ## Notes
31 The library uses the [](https://github.com/rosell-dk/exec-with-fallbackexec-with-fallback](https://github.com/rosell-dk/exec-with-fallback](https://github.com/rosell-dk/exec-with-fallback) library in order to be able to use alternatives to exec() when exec() is disabled.
32
33 ## Do you like what I do?
34 Perhaps you want to support my work, so I can continue doing it :)
35
36 - [](https://www.patreon.com/rosellBecome a backer or sponsor on Patreon](https://www.patreon.com/rosell](https://www.patreon.com/rosell).
37 - [](https://ko-fi.com/rosellBuy me a Coffee](https://ko-fi.com/rosell](https://ko-fi.com/rosell)
38
39 Thanks!
40