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


#1

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.


#2

What PHP version you are using?


#3

PHP 5.6.11-1~dotdeb+7.1


#4

Can you please paste command you are trying to run?


#5

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

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


#6

Is there anything else I can try?


#7

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?


#8

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


#9

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


#10

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.


#11

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


#12

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


#13