Getting Started » Installation
|
|
Latest updates
Toolbox
Google AdSense
|
Installation - How to install pChart on your web frontend Most of the time it will be really easy to install pChart on your web server, sometimes it will be impossible.. This documentation explains how to make it works with PHP 4+ and an apache daemon (benchmarks are showing that pChart runs faster with PHP5). To install pChart, extract the contents of the latest pChart archive you‘ve downloaded on your web server folder. You‘ll find in the class folders the core of the pChart library composed of : pData.class.php
pDraw.class.php
pImage.class.php Those files will be called from your PHP scripts so they must be located under the root of your web site. Font Files All the ttf files must be accessible from your web scripts, you may need to update the path of the default font using the setFontProperties function : $myPicture->setFontProperties(array("FontName"=>"/home/var/fonts/myfont.ttf");
Recommended way of working
Prerequisites To run on your web server, you need to ensure that apache has been configured with the GD library. This free library is most of the time integrated in the PHP installation you‘ve already made, only thing to do is to activate it from the php.ini file. If GD support is not enabled in your PHP installation, you may see the following error message : PHP Fatal error: Call to undefined function imagecreatetruecolor() On windows, uncomment the following line : ;extension=php_gd2.dll On linux environment, you‘ll need to recompile PHP with the GD library. (usually with the --enable-gd command line switch) How to check your current PHP configuration? To see the configuration of PHP on your web server, make a file named test.php in the web directory root and write the following in it : <?php phpinfo(); ?>The presence of the GD library is tested in the pImage class by the following lines : if (!extension_loaded(‘gd‘) && !extension_loaded(‘gd2‘)) { /* Extension not loaded */ } Hosted web services If you‘re using an hosted environment that you are not managing, you may face a serious issue here. Depending of the quality of services offered by your web provider, GD support may be enabled or not. As the GD library can add an additional load on the backends (creating pictures can be CPU consuming), some providers will not allow it to be installed.
© Copyrights
Components used on this web site : Famfamfam icons has been made by Mark James, Rounded corners lite has been coded by Cameron Cooke and Tim Hutchison, SyntaxHighlighter has
been written by Alex Gorbatchev. pChart and this web site have been created by Jean-Damien POGOLOTTI. This documentation contains 185 pages and 56 comments. 415 users have registered.
This page has been rendered in 0,02 seconds. Wiki revision 1.37.
|