Google Groups Home
Help | Sign in
Sample code not working
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Niels  
View profile
 More options Jul 24, 7:52 am
From: Niels <nbtim...@gmail.com>
Date: Thu, 24 Jul 2008 04:52:53 -0700 (PDT)
Local: Thurs, Jul 24 2008 7:52 am
Subject: Sample code not working
If I want to run the sample code located in demos/Zend/Gdata/
Blogger.php, I get this errors:

Notice: Undefined variable: argv in demos\Zend\Gdata\Blogger.php on
line 359

Warning: Invalid argument supplied for foreach() in demos\Zend\Gdata
\Blogger.php on line 359
php Blogger.php -- --user=[username] --pass=[password]

Lines 355-366 from demos/Zend/Gdata/Blogger.php:

355  $user = null;
356  $pass = null;
357
358  // process command line options
359  foreach ($argv as $argument) {
360      $argParts = split('=', $argument);
361    if ($argParts[0] == '--user') {
362          $user = $argParts[1];
363      } else if ($argParts[0] == '--pass') {
364          $pass = $argParts[1];
365      }
366  }

I moved the library/Zend folder to demos/Zend/Gdata. So that won't be
the problem I think.

My question: how can I get this sample code running without errors?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Trevor Johns  
View profile
 More options Jul 25, 1:15 am
From: "Trevor Johns" <tjo...@google.com>
Date: Thu, 24 Jul 2008 22:15:44 -0700
Local: Fri, Jul 25 2008 1:15 am
Subject: Re: [bloggerDev] Sample code not working
Hi Niels,
That sample is designed to be run from the command line, not from
within a webserver. From a command line, run:

    php Blogger.php --user=your_usern...@example.com --pass=your_secret

(This assumes that the php executable is in your PATH variable. If it
isn't, you'll need to provide the full path to php.)

Once you do that, the error should disappear.

Note that even though this is a command-line based sample, all of the
concepts demonstrated are equally applicable to web development.

Happy coding!

--
Trevor Johns

On 7/24/08, Niels <nbtim...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Niels  
View profile
 More options Sep 16, 8:59 am
From: Niels <nbtim...@gmail.com>
Date: Tue, 16 Sep 2008 05:59:14 -0700 (PDT)
Local: Tues, Sep 16 2008 8:59 am
Subject: Re: Sample code not working
Thanks for your answer! I'm getting better with the Gdata API...

On 25 jul, 07:15, "Trevor Johns" <tjo...@google.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google