php code works with mamp but not on ubuntu server

I have start looking at a twitter php library, but i can't get it to work on my ubuntu server, but on my mac, with mamp it works without any problems.

This is the code that don't won't to work on my server, but in mamp. Yes i have edit config file


/* Start session and load library. */

/* Build TwitterOAuth object with client credentials. */
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);

/* Get temporary credentials. */
$request_token = $connection->getRequestToken(OAUTH_CALLBACK);

/* Save temporary credentials to session. */
$_SESSION['oauth_token'] = $token = $request_token['oauth_token'];
$_SESSION['oauth_token_secret'] = $request_token['oauth_token_secret'];

/* If last connection failed don't display authorization link. */
switch ($connection->http_code) {
  case 200:
    /* Build authorize URL and redirect user to Twitter. */
    $url = $connection->getAuthorizeURL($token);
    header('Location: ' . $url); 
    /* Show notification if something went wrong. */
    echo 'Could not connect to Twitter. Refresh the page or try again later.';

I have enable php session on my ubuntu server, because this code works

       $_SESSION["secretword"] = "hello there";
       $secretword = $_SESSION["secretword"] ;
<title>A PHP Session Example</title>
    <?php echo $secretword; ?>


Make sure you have curl installed - for ubuntu should be as easy as sudo apt-get install curl

Also turn your PHP errors on ini_set('display_errors',1); error_reporting(E_ALL|E_STRICT); if you're not getting any clues from error messages.

Need Your Help

Texture lookup into rendered FBO is off by half a pixel

opengl glsl textures shader

I have a scene that is rendered to texture via FBO and I am sampling it from a fragment shader, drawing regions of it using primitives rather than drawing a full-screen quad: I'm conserving resourc...