ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Error loading libchartdir.so
Posted by J on Feb-01-2017 18:34
Downloaded ChartDirector for PHP Linux(x86_64) today. I'm seeing the following error in my apache log:

PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library) 'libchartdir.so' in Unknown on line 0

The libchartdir.so and chartdir.lic are placed in /usr/lib/php/20151012
The file /etc/php/7.0/apache2/php.ini contains a line: extension=libchartdir.so

When attempting to use ChartDirector in a .php script I get the following system information:

    Operating System : Linux sys220 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64
    PHP version : 7.0.13-0ubuntu0.16.04.1
    PHP / Web Server interface : apache2handler
    PHP configuration file location : "/etc/php/7.0/apache2/php.ini"
    PHP extension directory : "/usr/lib/php/20151012"

Any idea what I'm doing wrong?

  Re: Error loading libchartdir.so
Posted by Peter Kwan on Feb-02-2017 00:39
Hi J,

As according to the ChartDirector installation documentation, please copy *everything* in ChartDirector/lib (including the fonts subdirectory) to your PHP extension directory. For your case, at the minimum, you need to copy the "phpchartdir700.dll", "libchartdir.so" and entire "fonts" subdirectory (which means after copying, there should be a subdirectory "/usr/lib/php/20151012/fonts" and inside it there should be some fonts files.)

Then in "php.ini", please use:

extension=phpchartdir700.dll

The restart Apache.

(Note: There is a common misconception that Linux uses ".so" while Windows uses ".dll". In reality, the ".so" is only used for pre-linked shared objects. For loadable modules, any extension can be used. Even the Linux operating system itself does not use ".so" for many of its loadable modules. We use ".dll" as the extension for Linux as well as Windows so that we can use the same "php.ini" in both Linux and Windows.)

Then restart Apache.

Please let me know if this can solve the problem.

Regards
Peter Kwan