Parse error: syntax error, unexpected T_STRING in nginx-helper.php on line 16


#1

fatal error when trying to enable the plugin. php 5.2.17, wordpress 3.4.2 with nginx 1.2.5. installed everything mentioned in the description. what else am I missing.

thx


#2

Hi,

The minimum PHP version required by this plugin is 5.3. This was deliberate. Would you have permissions enough to upgrade PHP?

Regards.


#3

Hi,

Do let me know, because we’d consider modifying the code to rollback to PHP 5.2. We used 5.3 because of some superior options it offered and also because:

Fastcgi is automagically enabled in php-cgi in PHP 5.3, but for older versions configure PHP with --enable-fastcgi. To confirm that PHP has fastcgi enabled, php -v should contain PHP 5.2.5 (cgi-fcgi) Before PHP 5.2.3, fastcgi was enabled on the php binary (there was no php-cgi).

Since, the major functionality of the plugin uses fastcgi and because most users prefer the automagic of 5.3, we used that in great hope that we wouldn’t face issues like yours.

I’d still prefer to stick to 5.3 because of the superior OOP and other technical reasons and because it’ll be a tad unfair to hold back general 5.3 goodness from most users for rare cases like yours (as of now, we know this to be rare, but we may be wrong).

Of course, we might be wrong. So, if you can upgrade, do upgrade. Otherwise, depending on whether more users wish to use it on <5.3 and enable fastcgi manually, we will reconsider this philosophy of ours, wrt nginx helper.

Regards.


#4

thanks and got it. we can install another instance of php 5.3 in the same server, we need to keep the 5.2 running cuz some legacy system is still running and it’s cumbersome to upgrade.

another question about nginx configuration for multisite subdirectory setup. what’s the suppose to be if my wordpress installation at /var/www/wordpress/wp-content/blog.

map $uri $blogname{
~^(?/[^/]+/)files/(.*) $blogpath ;
}

I’ve tried putting the absolute path in place of but nginx return error:

nginx: [emerg] pcre_compile() failed: unrecognized character after (?< in “^(?/[^/]+/)files/(.)” at “blogpath>/[^/]+/)files/(.)”

thx


#5

Hi,

Did you mean /var/www/wordpress/wp-content/blog.dir or have you really installed wordpress at /var/www/wordpress/wp-content/blog folder?

Regards.


#6

I meant /var/www/wordpress/wp-content/blog.dir , wordpress installed at /var/www/wordpress

regards


#7

@rchen

Sorry for late reply.

You no need to put absolute path or anything in:

map $uri $blogname{
~^(?/[^/]+/)files/(.*) $blogpath ;
}

$uri checks http-style URL not file-system path. So it doesn’t matter where do you put your WordPress.

Now, for error nginx: [emerg] pcre_compile() failed: unrecognized character…

Please use following:

map $uri $blogname{
~^(?P/[^/]+/)files/(.*) $blogpath ;
}

That error is related to some old version of preg lib. Using ?P instead of ? should solve your problem.

Please let me know if you need any further assistance.


#8