Call us Toll-Free:
1-800-218-1525
Live ChatEmail us

 Sponsors

How to install PHP ChartDirector under FreeBSD

Michel Nadeau, 11-06-2009
PHP ChartDirector is a powerful PHP extension that allows to generate very complex charts. You can visit their Web site here.

This tutorial will show you how to install it under FreeBSD.

1. Download PHP ChartDirector

The download page is located here -
http://www.advsofteng.com/download.html

Make sure you pick the FreeBSD version for PHP, and make sure you choose the good version between 32 and 64-bit. At the time of writing this post, the latest 32-bit version available for FreeBSD was this one -
http://download2.advsofteng.com/char...freebsd.tar.gz

Now that you have the download link, the first thing to do is to find out where is your PHP extensions directory. You can find it by checking at phpinfo()'s output or in your php.ini file (which is usually located in /usr/local/lib/php.ini). Just search for "extension_dir" in php.ini - you will find it right away. In our case, our extensions directory was "/usr/local/lib/php/extensions/current". We can now download and extract ChartDirector...

cd /usr/local/lib/php/extensions/current
wget http://download2.advsofteng.com/chartdir_php_freebsd.tar.gz
tar xvfz chartdir_php_freebsd.tar.gz

When extracting ChartDirector, it creates a "ChartDirector" folder that contains these files/folders:

doc/
lib/
phpdemo/
LICENSE.TXT
README.TXT

We are mainly interested by the "lib" directory. Let's copy the files that we need...

cd /usr/local/lib/php/extensions/current
mv ChartDirector/lib/* .

You can get rid of these 2 PHP files:

rm FinanceChart.php
rm phpchartdir.php

2. Determine the right version

To determine the right version of the DLL that you must use, refer to this page -
http://www.advsofteng.com/doc/cdphpdoc/phpinstall.htm

For example, if you have PHP 4.4.9, you will use this one -
PHP Version 4.2.1 and above: phpchartdir421.dll

Even if it's FreeBSD and not Windows, you are going to specify a DLL as the extension in your php.ini file. You can delete all the others DLL's that you are not using, but make sure you keep the "fonts" folder and the "libchardir.so" file - they are required. So your extensions directory might look like this:

fonts/
libchartdir.so
phpchartdir421.dll

3. Configure the extension in php.ini

Now that we have all we need, we're going to configure php.ini to add the PHP ChartDirector extension.

Open your php.ini and add a line like this one in the extensions section:

extension=phpchartdir421.dll

Make sure you use the right DLL for your PHP version. Save your php.ini file and restart your PHP engine and/or Web server (Apache, FastCGI, etc.) to reload your PHP configuration.

To test PHP ChartDirector, you can use the "phpdemo" directory that you can find in the PHP ChartDirector archive. Just copy the folder in the root of your Web server and point it with your browser (ex: http://yourWebAddress/phpdemo). This demo is also very convenient for charts examples.

Tim Mcpherson, 11-23-2009
I share all of this with you, not to brag, but to let you know I am the real deal, that my Super Cash System this is the real deal and not only have I helped countless other people make real money on the internet …I’m here right now to help you.
Enjoyed this post?

Subscribe Now to receive new posts via Email as soon as they come out.

 Comments
Post your comments












Note: No link spamming! If your message contains link/s, it will NOT be published on the site before manually approved by one of our moderators.



About Us  |  Contact us  |  Privacy Policy  |  Terms & Conditions