New install: Getting a PHP Fatal error in nginx-helper.php

Tried uploading manually via shell. Plugin could not be activated because it triggered a fatal error.

Removed *zip and nginx-folder from plugins folder, then tried installing from WordPress administration interface. Plugin could not be activated because it triggered a fatal error.

When trying to run from command line: PHP Fatal error: Call to undefined function rtCamp\WP\Nginx\plugin_dir_path() in /web/sites/[redacted]/wpcontent/plugins/nginx-helper/nginx-helper.php on line 15

Please advise.

What PHP version you are using?

PHP 5.6.11-1~dotdeb+7.1

Can you please paste command you are trying to run?

Trying to use the “Activate” link in WP plugins.

From CMD line, trying: php nginx-helper.php

Is there anything else I can try?

Can’t you just install the plugin normally? Either by adding it from the WordPress dashboard or uploading the zip file. Maybe even using wp-cli?

Dave: I tried both WordPress dashboard and uploading zip file, as I mentioned in my original post.

So does the same thing happen for any plugin or just nginx-helper?

I have the same issue on two different servers. One was an existing debian install and the other was a fresh ubuntu install.

The existing server and fresh test server both hosted a single site. The existing site/server has a number of other plugins, and the fresh test server only has what comes with WordPress.

A quick check of the existing server shows none of the other plugins are trying to use the namespace command.

What versions of PHP has this been tested on? Should it be working in 5.6.11?