-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andreas Rindler wrote:
we are trying to change the default skin for all users
using the
userOptions script and we get an error. Any idea how to resolve the
error or change the skin user option for users with another method?
MW version: 1.11
Php: 5.1.6
Here is the command and the error:
[openm@machine maintenance]$ php userOptions.php -cli skin --old
monobook --new mike2
PHP Warning: array_shift() [<a
href='function.array-shift'>function.array-shift</a>]: The argument
should be an array in
/chroot/home/openmeth/openmethodology.org/html/mike2/w/maintenance/commandLine.inc
on line 39
PHP Warning: reset() [<a href='function.reset'>function.reset</a>]:
Passed variable is not an array or object in
/chroot/home/openmeth/openmethodology.org/html/mike2/w/maintenance/commandLine.inc
on line 49
X-Powered-By: PHP/5.1.6
Content-type: text/html
It looks like you're running a CGI (web interface) version of PHP. This
can behave a bit differently from the CLI (command-line interface)
version; in this case it fails to register the command-line arguments as
a global variable.
If you can't find a CLI version of PHP on your system (it might be
called php-cli in some cases), you might or might not have luck by
adding this line to maintenance/commandLine.inc, right before line 39:
$argv =& $_SERVER['argv'];
Also use the -q option on PHP to suppress the HTTP headers.
- -- brion vibber (brion @
wikimedia.org)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAkgM1kAACgkQwRnhpk1wk452QgCfVfJ6RwnTVAkiHt28Q9QaZmy8
Qs8AoKL5XcuALSdF1P+/S/v+tRtGnwcn
=1fpE
-----END PGP SIGNATURE-----