|
Why is ChartDirector trying to load a .dll on a Linux server? |
Posted by Jason on Dec-14-2010 10:36 |
|
Hi all,
I am running a LAMP server, PHP 5.3.3
I have copied my files into a directory called php-modules that is visible on the webserver
and is "owned" by apache.
I try and run any of the demos in the "phpdemo" directory, and I get the following error:
Error Loading ChartDirector for PHP Extension
An attempt has been made to dynamically load ChartDirector, but it was not successful.
Please refer to your ChartDirector for PHP documentation or click here for how to resolve
the problem.
Error Log
Trying to load "phpchartdir530.dll" from the PHP extension directory
"/usr/lib/php/modules".
I've done the following:
- the "/usr/lib/php/modules" directory contains the libchartdir.so file;
- i have created the "/etc/php.d/chartdirector.ini" file, that contains the following
information
; Enable ChartDirector extension module
extension=libchartdir.so
- my php.ini file contains the following excerpts relating to ChartDirector
; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/lib/php/modules"
;;;;
; Note: packaged extension modules are now loaded via the .ini files
; found in the directory /etc/php.d; these are loaded by default.
;;;;
Why aren't my demos working?
Thanks, Jason |
Re: Why is ChartDirector trying to load a .dll on a Linux server? |
Posted by Peter Kwan on Dec-15-2010 02:09 |
|
Hi Jason,
The error message you are seeing means that the PHP system and the ".ini" file is not set up correctly, so ChartDirector is not loaded. In this case, ChartDirector will attempt to auto-detect your system and load the correct PHP extension (which is phpchartdir530.dll) dynamically as a last resort. The attempt will probably fail because PHP has removed support of dynamic loading of extensions since PHP 5.2.5.
To solve the problem, please perform the followings instead:
(a) Copy *everything* in "ChartDirector/lib" to your PHP extension directory. For your specific case, you would need to at least copy "phpchartdir530.dll", "libchartdir.so" and the fonts subdirectory.
(b) In your ".ini" file, please use:
extension=phpchartdir530.dll
Please refer to the Installation section of the ChartDirector documentation for details.
Note: The extension is phpchartdir530.dll, even on Linux. Linux can dynamically load .dll and .so and files with other extensions. In fact, the Linux kernel itself frequently does not use .so for shared objects. The libchartdir.so is a file used internally by phpchartdir530.dll. It is not a PHP module and should not be placed in the extension statement.
(c) If your PHP/Web interface is SAPI (instead of CGI), you may need to restart Apache for the PHP to load the modified ".ini" file.
If the above still does not solve the problem, there should be error messages in the Apache error log, which shows the start up errors (the error that occurs when the PHP processes the ".ini" files - it occurs before any PHP script is run so it may not be visible in the browser output). Please kindly check what is the error message.
Also, note that there are two Linux architectures supported by ChartDirector - i386 or compatible (including i686), and x64_64 (64-bit Linux). Please make sure you are using the "ChartDirector for Linux" build that matches your Linux/PHP architecture. You may use phpinfo to check what is your Linux/PHP architecture.
If you need further help, please kindly inform me of the error message you find in the Apache error log.
Hope this can help.
Regards
Peter Kwan |
|