Browsing the archives for the PHP category

Getting Started With MongoDB GridFS

in GridFS, PHP

TweetOne really useful built-in feature of MongoDB is it’s GridFS. This filesystem within MongoDB was designed for … well, holding files, especially files over 4MB … why 4MB? Well BSON objects are limited to 4MB in size (BSON is the format that MongoDB uses to store it’s database information) so GridFS helps store files across [...]

9 Comments

Twitter 101: Store Tweets with MongoDB

in Drivers, PHP, Twitter

TweetTwitter has been changing their API and features so quickly that even planning out a structure to store tweets can be quite difficult. Luckily (compared to other, relational DB’s) MongoDB makes that much less of a problem with its schema-less documents. To start things off let’s a get a few prerequisites checked off our list … [...]

4 Comments

MongoDB and 64-bit Integers in PHP

in PHP, Twitter

TweetIf you’ve ever needed to work with PHP’s MongoDB driver and large integers (which Twitter and Facebook use for id’s) you might have run into a problem … Derick Rethans documents this problem at length at his post here … [A] Facebook UserID … [uses] a “64-bit int datatype”. Unfortunately, the MongoDB PHP Driver only had support for 32-bit [...]

5 Comments

MongoDB+PHP: Install and Connect

in PHP

TweetThis is Part 1 of a series of short posts on how to use MongoDB with PHP. Installing MongoDB support for PHP is really easy!  Here’s a short howto guide for installing MongoDB for PHP and preforming a simple query. Install MongoDB for PHP Support Unix/Linux Via your command line run pecl: $ sudo pecl install mongo [...]

9 Comments