WP-API / client-cli

65 stars 20 forks source link

I can't use with this project #22

Open KingYes opened 10 years ago

KingYes commented 10 years ago

Hi ! When I just try to link the client with my server, this is what I get:

$ wp --require=client.php api oauth1 connect "http://wordpress-local/" --key=L3CnXXXXXDU6 --secret=N7tJrvUbEZh0TVriMuP4LkXXXXXXXXXXYVWdDPkgWSgj4
PHP Notice:  Undefined index: url in /home/yakir/Git/client-cli/lib/locator.php on line 34
PHP Stack trace:
PHP   1. {main}() /usr/bin/wp:0
PHP   2. include() /usr/bin/wp:4
PHP   3. include() phar:///usr/bin/wp/php/boot-phar.php:5
PHP   4. WP_CLI\Runner->before_wp_load() phar:///usr/bin/wp/php/wp-cli.php:20
PHP   5. WP_CLI\Runner->do_early_invoke() phar:///usr/bin/wp/php/WP_CLI/Runner.php:599
PHP   6. WP_CLI\Runner->_run_command() phar:///usr/bin/wp/php/WP_CLI/Runner.php:52
PHP   7. WP_CLI\Runner->run_command() phar:///usr/bin/wp/php/WP_CLI/Runner.php:311
PHP   8. WP_CLI\Dispatcher\Subcommand->invoke() phar:///usr/bin/wp/php/WP_CLI/Runner.php:304
PHP   9. call_user_func:{phar:///usr/bin/wp/php/WP_CLI/Dispatcher/Subcommand.php:293}() phar:///usr/bin/wp/php/WP_CLI/Dispatcher/Subcommand.php:293
PHP  10. WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}() phar:///usr/bin/wp/php/WP_CLI/Dispatcher/Subcommand.php:293
PHP  11. call_user_func:{phar:///usr/bin/wp/php/WP_CLI/Dispatcher/CommandFactory.php:52}() phar:///usr/bin/wp/php/WP_CLI/Dispatcher/CommandFactory.php:52
PHP  12. WP_JSON\CLI\Commands\OAuth1->connect() phar:///usr/bin/wp/php/WP_CLI/Dispatcher/CommandFactory.php:52
PHP  13. WP_JSON\CLI\Locator->locate() /home/yakir/Git/client-cli/lib/commands/oauth1.php:51
Error: Could not locate API; are you sure it's enabled?

When I try to send var_dump( $real_links ); in lib/locator.php:90 (before the return), This is the output:

array(1) {
  [0] =>
  array(2) {
    '<http://wordpress-local/?json_route' =>
    string(2) "/>"
    'rel' =>
    string(32) "https://github.com/WP-API/WP-API"
  }
}

What you think the problem? Thanks!

KingYes commented 9 years ago

Are this project is dead?