1

I'm currently developing a web page that will pull data from my google drive spreadsheets and plot it onto the webpage. I've tested it on Mamp's localhost and everything worked fine.

When I tried to run the same code to my Wamp server I kept getting a php error that I was not receiving before. I am Authenticating both with different Redirect URI's so that not the problem.

The Error that I'm getting on the Wamp localhost is

enter image description here

When I checked Line 43 to see which String couldn't be parsed I found out the String was blank. So the String wasn't being generated.

I found out that this line wasn't generating the correct request in Wamp but it was generating the correct request in Mamp.

$request = new Google\Spreadsheet\Request($json_token);

The $json_token is being generated correctly in both version but when it runs the request the Wamp version comes back with empty information.

object(Google\Spreadsheet\Request)[10]
private 'method' => string 'GET' (length=3)
private 'headers' => 
array
  empty
private 'serviceUrl' => string 'https://spreadsheets.google.com/' (length=32)
private 'post' => string '' (length=0)
private 'accessToken' => string 'ya29.HIdingtheRestJustinCase'    (length=52)
private 'endpoint' => null
private 'userAgent' => string 'Byng Drive' (length=10)
private 'fullUrl' => null

I've tried running this on a webserver and it also runs fine, just not on Wamp. What am I missing here? Thanks!

Jaspreet Chauhan
  • 191
  • 4
  • 14
  • Just a thought, doesn't you access token have to be registered to the site that is making the call to request the spreadsheet. Have you registered the correct google service to localhost? – RiggsFolly Jul 01 '13 at 11:41
  • Yes, I'm pretty sure I've done that correctly. – Jaspreet Chauhan Jul 01 '13 at 19:55
  • Does your WAMP system have the same access to the internet as your MAMP system? Remember it will need to be able to get out to google. – RiggsFolly Jul 02 '13 at 08:57
  • When it makes the authentication call I'm able to access the internet correctly. Is there a way I can check my WAMP system to make sure? – Jaspreet Chauhan Jul 02 '13 at 18:32
  • Have you checked that the code that gets the json_token has worked properly. Are there any error codes/messages from that process? – RiggsFolly Jul 03 '13 at 08:40

0 Answers0