[GData Protocol] Re: Bug in Google Data API/PHP-example Calendar.php
Thanks, that should do. On May 20, 8:09 pm, Ray Baxter wrote: > So, you are running it from a server. > > The problem is that your server is incorrectly reporting the host. > Your host is "localhost" but your server is reporting it as > "localhost:". > > If you fix your server configuration, then the getCurrentUrl will > return the correct value. > > Ray > > On Wed, May 20, 2009 at 11:55 AM, mhausenblas > > wrote: > > > Ray, > > >> The Calendar.php script is designed for running from the command line. > > > I don't think so. If you look at the code (line 28-30), it clearly > > says: > > > "* You can run this sample both from the command line (CLI) and also > > * from a web browser. When running through a web browser, only > > * AuthSub and outputting a list of calendars is demonstrated." > > > further lines 662-663 say: > > > "* Main logic for running this sample code via the command line or, > > * for AuthSub functionality only, via a web browser." > > > and also the lines 839-840: > > > " // running through web server - demonstrate AuthSub > > processPageLoad();" > > > I think I also clearly pointed out where the bug is, but I'm happy > > telling you again ;) > > > The bug is in the "function getCurrentUrl()" as "return $protocol . > > $host . $port . $php_request_uri;" falsely returns the port > > duplicated. > > > Your help is appreciated. > > > Cheers, > > Michael > > > On May 17, 10:25 pm, Ray Baxter wrote: > >> What exactly are you trying to do? The Calendar.php script is designed > >> for running from the command line. The value of the host and port come > >> from environment variables: > > >> $_SERVER['HTTP_HOST'] = value of the Host: header > >> $_SERVER['SERVER_PORT'] > > >> which you shouldn't need to set, but if you do, you aren't supposed to > >> include the port in the host. > > >> Ray > > >> On Sun, May 17, 2009 at 5:23 A > > >> M, mhausenblas wrote: > > >> > Just tried out GData/PHP/Zend API, the 'Calendar.php' example on MacOS > >> > using MAMP and had an issue with it. I got an error like > > >> > The "next" parameter was bad or missing." > > >> > Ok, so I'm digging into it and found a bug in 'Calendar.php': > > >> > the getCurrentUrl() function returnshttp://localhost::/yadayada > >> > rather thanhttp://localhost:/yadayadadueto $host having the > >> > port information already in it and it is hence duplicated. > > >> > If someone from the PHP team reads this, please fix it. > > >> > Cheers, > >> > Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Data Protocol" group. To post to this group, send email to google-help-dataapi@googlegroups.com To unsubscribe from this group, send email to google-help-dataapi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-help-dataapi?hl=en -~--~~~~--~~--~--~---
[GData Protocol] Re: Bug in Google Data API/PHP-example Calendar.php
So, you are running it from a server. The problem is that your server is incorrectly reporting the host. Your host is "localhost" but your server is reporting it as "localhost:". If you fix your server configuration, then the getCurrentUrl will return the correct value. Ray On Wed, May 20, 2009 at 11:55 AM, mhausenblas wrote: > > Ray, > >> The Calendar.php script is designed for running from the command line. > > I don't think so. If you look at the code (line 28-30), it clearly > says: > > "* You can run this sample both from the command line (CLI) and also > * from a web browser. When running through a web browser, only > * AuthSub and outputting a list of calendars is demonstrated." > > further lines 662-663 say: > > "* Main logic for running this sample code via the command line or, > * for AuthSub functionality only, via a web browser." > > and also the lines 839-840: > > " // running through web server - demonstrate AuthSub > processPageLoad();" > > I think I also clearly pointed out where the bug is, but I'm happy > telling you again ;) > > The bug is in the "function getCurrentUrl()" as "return $protocol . > $host . $port . $php_request_uri;" falsely returns the port > duplicated. > > Your help is appreciated. > > Cheers, > Michael > > > On May 17, 10:25 pm, Ray Baxter wrote: >> What exactly are you trying to do? The Calendar.php script is designed >> for running from the command line. The value of the host and port come >> from environment variables: >> >> $_SERVER['HTTP_HOST'] = value of the Host: header >> $_SERVER['SERVER_PORT'] >> >> which you shouldn't need to set, but if you do, you aren't supposed to >> include the port in the host. >> >> Ray >> >> On Sun, May 17, 2009 at 5:23 A >> >> M, mhausenblas wrote: >> >> > Just tried out GData/PHP/Zend API, the 'Calendar.php' example on MacOS >> > using MAMP and had an issue with it. I got an error like >> >> > The "next" parameter was bad or missing." >> >> > Ok, so I'm digging into it and found a bug in 'Calendar.php': >> >> > the getCurrentUrl() function returnshttp://localhost::/yadayada >> > rather thanhttp://localhost:/yadayadadue to $host having the >> > port information already in it and it is hence duplicated. >> >> > If someone from the PHP team reads this, please fix it. >> >> > Cheers, >> > Michael > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Data Protocol" group. To post to this group, send email to google-help-dataapi@googlegroups.com To unsubscribe from this group, send email to google-help-dataapi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-help-dataapi?hl=en -~--~~~~--~~--~--~---
[GData Protocol] Re: Bug in Google Data API/PHP-example Calendar.php
Ray, > The Calendar.php script is designed for running from the command line. I don't think so. If you look at the code (line 28-30), it clearly says: "* You can run this sample both from the command line (CLI) and also * from a web browser. When running through a web browser, only * AuthSub and outputting a list of calendars is demonstrated." further lines 662-663 say: "* Main logic for running this sample code via the command line or, * for AuthSub functionality only, via a web browser." and also the lines 839-840: " // running through web server - demonstrate AuthSub processPageLoad();" I think I also clearly pointed out where the bug is, but I'm happy telling you again ;) The bug is in the "function getCurrentUrl()" as "return $protocol . $host . $port . $php_request_uri;" falsely returns the port duplicated. Your help is appreciated. Cheers, Michael On May 17, 10:25 pm, Ray Baxter wrote: > What exactly are you trying to do? The Calendar.php script is designed > for running from the command line. The value of the host and port come > from environment variables: > > $_SERVER['HTTP_HOST'] = value of the Host: header > $_SERVER['SERVER_PORT'] > > which you shouldn't need to set, but if you do, you aren't supposed to > include the port in the host. > > Ray > > On Sun, May 17, 2009 at 5:23 A > > M, mhausenblas wrote: > > > Just tried out GData/PHP/Zend API, the 'Calendar.php' example on MacOS > > using MAMP and had an issue with it. I got an error like > > > The "next" parameter was bad or missing." > > > Ok, so I'm digging into it and found a bug in 'Calendar.php': > > > the getCurrentUrl() function returnshttp://localhost::/yadayada > > rather thanhttp://localhost:/yadayadadue to $host having the > > port information already in it and it is hence duplicated. > > > If someone from the PHP team reads this, please fix it. > > > Cheers, > > Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Data Protocol" group. To post to this group, send email to google-help-dataapi@googlegroups.com To unsubscribe from this group, send email to google-help-dataapi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-help-dataapi?hl=en -~--~~~~--~~--~--~---
[GData Protocol] Re: Bug in Google Data API/PHP-example Calendar.php
What exactly are you trying to do? The Calendar.php script is designed for running from the command line. The value of the host and port come from environment variables: $_SERVER['HTTP_HOST'] = value of the Host: header $_SERVER['SERVER_PORT'] which you shouldn't need to set, but if you do, you aren't supposed to include the port in the host. Ray On Sun, May 17, 2009 at 5:23 A M, mhausenblas wrote: > > Just tried out GData/PHP/Zend API, the 'Calendar.php' example on MacOS > using MAMP and had an issue with it. I got an error like > > The "next" parameter was bad or missing." > > Ok, so I'm digging into it and found a bug in 'Calendar.php': > > the getCurrentUrl() function returns http://localhost::/yadayada > rather than http://localhost:/yadayada due to $host having the > port information already in it and it is hence duplicated. > > If someone from the PHP team reads this, please fix it. > > Cheers, > Michael > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Data Protocol" group. To post to this group, send email to google-help-dataapi@googlegroups.com To unsubscribe from this group, send email to google-help-dataapi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-help-dataapi?hl=en -~--~~~~--~~--~--~---