Installing RedBeanPHP is very easy. First of all, you need to download the tarball from our server. Just head over to the download section and click on the download link to start downloading the package. You can also use a tool like wget of course.url=http://www.redbeanphp.com/downloadredbean.php
wget $url --output-document="redbeanphp.tar.gz"
tar xvf redbeanphp.tar.gz
RedBeanPHP is always distributed as a TGZ package, also known as a 'tarball'. To extract the contents of this package use:tar xvf redbeanphp.tar.gz
You'll then see...license.txt
Inside the package you'll find a license.txt and a rb.php file. The first file contains the license information. The second file is the compiled RedBeanPHP all-in-one script. All RedBeanPHP code has been combined into a single file for your convenience.
Including in your project
To include RedBeanPHP in your project, simply copy the file to a location somewhere inside your PHP project and then use the PHP 'require' command to load it:
You are now ready to use RedBeanPHP!
Let's try to setup a database connection!
Patch for PHP 5.3.3 and earlier
This patch is only required for people using old versions of PHP, i.e. PHP 5.3.3 or earlier. If you are running a PHP instance with a higher version number please skip this section. People using PHP version 5.3.3 or older should run the p533patch.php file first and then include the newly generated rb-p533.php file. The patch will modify the source for compatibility with these older PHP editions. Use the patch like this:php p533patch.php
You will now see the following output:Running Patch P533...
Applied patch for PHP < 5.3.3
After running the patch, you'll see a new file in your folder:rb-p533.php
This is the file to be used with your version of PHP.