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

Sanitychecking environmentvariables regarding locales #1632

Closed
MikeMikjaer opened this issue Jan 28, 2015 · 5 comments
Closed

Sanitychecking environmentvariables regarding locales #1632

MikeMikjaer opened this issue Jan 28, 2015 · 5 comments

Comments

@MikeMikjaer
Copy link

I get the following error when running the version available on the webpage:

www-data@www:~$ php wp-cli.phar plugin status
PHP Notice: Use of undefined constant ‘WPLANG’ - assumed '‘WPLANG’' in phar:///var/www/wp-cli.phar/php/wp-cli.php(23) : eval()'d code on line 71
PHP Notice: Use of undefined constant ‘da_DK’ - assumed '‘da_DK’' in phar:///var/www/wp-cli.phar/php/wp-cli.php(23) : eval()'d code on line 71
[snip]

www-data@www:~$ php wp-cli.phar --info
PHP binary: /usr/bin/php5
PHP version: 5.4.35-0+deb7u2
php.ini used: /etc/php5/cli/php.ini
WP-CLI root dir: phar://wp-cli.phar
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 0.18.0

Im going to download from git to se wether the error persists and if i find it does im going to investegate further ... however if anybody seen this before please provide insight if posible.

@danielbachhuber
Copy link
Member

Seems like your wp-config.php references constants that aren't defined. Can you share its contents here (minus any secrets) ?

@MikeMikjaer
Copy link
Author

I suspect this is the culprit: (from wp-config.php)

define(?~@XWPLANG?@Y, ?@Xda_DK?@~Y);

@MikeMikjaer
Copy link
Author

I changed it to:

define("WPLANG", "da_DK");

Now the warning's gone.

Should we implement some way of validating the php-code before we invoke it?

@danielbachhuber
Copy link
Member

It's ultimately a problem of #1631, which we need to solve more holistically.

@MikeMikjaer
Copy link
Author

Fair .. i wont submit a patch then :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants