Connecting to GSM/GPRS unstable, eventually hangs

I too am having the issue with my shield hanging on gsm.begin().

The workaround by altering GSM3ShieldV1AccessProvider.cpp as suggested above does solve this problem, but introduces a new problem! I am checking for a returned 200 status, and the workaround breaks this - nothing is recieved.

This is the code I am using (with personal details removed)

/*
  Web client
 
 This sketch connects to a website through a GSM shield.
 
 Circuit:
 * GSM shield attached to an Arduino
 * SIM card with a data plan
 * Temperature sensor on A0
 
 */

// libraries
#include <GSM.h>

 // PIN Number
 #define PINNUMBER ""

 // APN data
 #define GPRS_APN       "internet.com" // your GPRS APN
 #define GPRS_LOGIN     "wapuser1"    // your GPRS login
 #define GPRS_PASSWORD  "wap" // your GPRS password

 // initialize the library instance
 GSMClient client;
 GPRS gprs;
 GSM gsmAccess; 

void setup()
{
}

void loop()
{
  // initialize serial communications
  Serial.begin(9600);

 // URL, path & port
 char server[] = "foobar.com";
 // char path[] = "/data/test.php?temperature_1=1.5&temperature_2=1.9";
 int port = 80; // port 80 is the default for HTTP



  Serial.println("Starting Arduino web client.");
  // connection state
  boolean notConnected = true;

  // After starting the modem with GSM.begin()
  // attach the shield to the GPRS network with the APN, login and password
  while(notConnected)
  {
    if((gsmAccess.begin(PINNUMBER)==GSM_READY) &
      (gprs.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD)==GPRS_READY))
      notConnected = false;
    else
    {
      Serial.println("Not connected");
      delay(1000);
    }
  }

  Serial.println("connecting...");

  // if you get a connection, report back via serial:
  if (client.connect(server, port))
  {
    // read temperature sensor
    String sensorValueString = String(analogRead(A0), DEC);
    
    // put reading into path
    String path = String("/data/test.php?temperature_1=" + sensorValueString + "&temperature_2=1.9");
    
    Serial.println("connected");
    // Make a HTTP request:
    client.print("GET ");
    client.print(path);
    client.println(" HTTP/1.1");
    client.print("Host: ");
    client.println(server);
    client.println("Connection: close");
    client.println();
  } 
  else
  {
    // if you didn't get a connection to the server:
    Serial.println("connection failed");
  }

  // wait until there are no more bytes to be read, and the server disconnects
  String outputString = "";
  while (client.available() || client.connected())
  {
    // if there are incoming bytes available 
    // from the server, read them and print them:
    if (client.available())
    {
      char c = client.read();
      
      outputString = outputString + c;
    }
  }
  Serial.print(outputString);
  
  // check output for 200 OK
  boolean serverOK = false;
  if (outputString.startsWith("HTTP/1.1 200 OK"))
  {
    serverOK = true;
  }
  
  // stop the client:
  Serial.println("disconnecting.");
  client.stop();
  Serial.println("Terminating GSM");
  gsmAccess.shutdown();
  // digitalWrite(3,LOW); // power saving??

  // wait for half an hour (less 60s to account for communication)
  if (serverOK)
  {
    Serial.println("29 minutes delay....");
    // delay(1680000); // 28 minutes
  }
  delay(60000); // 1 minute
}

With the GSM libraries as is, I get;

Starting Arduino web client.
connecting...
connected
HTTP/1.1 200 OK
Date: Fri, 04 Jul 2014 03:44:44 GMT
Server: Apache
X-Powered-By: PHP/5.2.17
Content-Length: 0
Connection: close
Content-Type: text/html


disconnecting.
Terminating GSM
29 minutes delay....

but with the workaround in place I get;

Starting Arduino web client.
gsm.begin()
gsm.begin() waiting for ready
connecting...
connected


disconnecting.
Terminating GSM

The data still gets through to the server, but no response is recieved! Could anyone shed light on this please?