title: RockMongo, "Unable to load dynamic library '/.../mongo.so' - wrong ELF class: ELFCLASS64 in Unknown"
body: <p>I just installed <a href="http://code.google.com/p/rock-php/wiki/rock_mongo" rel="nofollow" title="RockMongo">RockMongo</a> by extracting all the files to a lampp web folder <code>/opt/lampp/htdocs/rockMongo/</code>. Visiting index.php shows</p>
  
  <blockquote>
    <p>To make things right, you must install php_mongo module. <a href="http://www.php.net/manual/en/mongo.installation.php" rel="nofollow" title="Here for installation documents on PHP.net">Here for
    installation documents on PHP.net</a>.</p>
  </blockquote>
  
  <p>I followed the instructions there (I had to install <code>php-pear</code>):</p>
  
  <blockquote>
    <ul>
    <li>sudo pecl install mongo</li>
    <li>Add the following line to php.ini: extension=mongo.so</li>
    </ul>
  </blockquote>
  
  <p>Now, when I start the web server (apache), I get the following warning, repeated <strong>hundreds</strong> of times:</p>
  
  <blockquote>
    <p>Warning: PHP Startup: It is not safe to rely on the system's timezone
    settings. You are <em>required</em> to use the date.timezone setting or the
    date_default_timezone_set() function. In case you used any of those
    methods and you are still getting this warning, you most likely
    misspelled the timezone identifier. We selected 'America/New_York' for
    'EDT/-4.0/DST' instead in Unknown on line 0</p>
  </blockquote>
  
  <p>and also this warning a single time: </p>
  
  <blockquote>
    <p>Warning: PHP Startup: Unable to load dynamic library
    '/usr/lib/php5/20090626/mongo.so' - /usr/lib/php5/20090626/mongo.so:
    wrong ELF class: ELFCLASS64 in Unknown on line 0</p>
  </blockquote>
  
  <p>The index page stills shows the same message (which means that <code>class_exists("Mongo")</code> returns false)</p>
  
  <p>I tried putting in the absolute path to mongo.so, but that didn't do anything. What's going on?</p>
  
  <p><strong>edit:</strong> I used </p>
  
  <pre><code>$ file /usr/bin/php5
  /usr/bin/php5: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
  </code></pre>
  
  <p>which seems to suggest my php installation is 64 bits, yet when I print out <code>PHP_INT_MAX</code> I get <code>2147483647</code> which seems to indicate my installation is 32 bits. How can I know the "bitness" of my php installation?</p>