Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a hint how to detect Vips is correctly installed #252

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,35 @@ zend.max_allowed_stack_size=-1

To your `php.ini`.

#### Troubleshooting

To make sure to have all correctly installed and your php correctly configure use the following script in your terminal:

```bash
php -r 'echo "Has FFI Extension: " . (extension_loaded("ffi") ? "true" : "false") . PHP_EOL;
echo "Has FFI Class: " . (class_exists(FFI::class) ? "true" : "false") . PHP_EOL;
echo "Has FFI Enabled: " . (ini_get("ffi.enable") === "1" ? "true" : "false") . PHP_EOL;
echo "Has zend.max_allowed_stack_size correct: " . (ini_get("zend.max_allowed_stack_size") === "-1" ? "true" : "false") . PHP_EOL;
try {
require_once("vendor/autoload.php");
$libVipsInstalled = \\Jcupitt\\Vips\\Config::version();
echo "Has LibVips Installed: " . $libVipsInstalled . PHP_EOL;
} catch (\Exception $e) {
echo "Has LibVips Installed: false " . PHP_EOL;
echo PHP_EOL . "Error: " . $libVipsError = $e->getMessage();
}'
```

It should output:

```bash
Has FFI Extension: true
Has FFI Class: true
Has FFI Enabled: true
Has zend.max_allowed_stack_size correct: true
Has LibVips Installed: 8.16.0
```

### Example

```php
Expand Down
Loading