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

Message ListMessage List     Post MessagePost Message

  Can't get sample programs to run
Posted by Steve on Jul-15-2016 11:13
I have installed chartdirector as per the instruction but i get the following message when going to the index page and hitting the test link.


PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/phpchartdir550mt.dll' - /usr/lib/php5/20121212/phpchartdir550mt.dll: wrong ELF class: ELFCLASS32 in Unknown on line 0


I have no idea how to correct this message

here is the message i get from the test page

System Information

    Operating System : Linux daqsrv5 4.2.0-41-generic #48~14.04.1-Ubuntu SMP Fri Jun 24 17:09:15 UTC 2016 x86_64
    PHP version : 5.5.9-1ubuntu4.17
    PHP / Web Server interface : apache2handler
    PHP configuration file location : "/etc/php5/apache2/php.ini"
    PHP extension directory : "/usr/lib/php5/20121212"


I moved all files from chartdirector/lib file to the php extension folder listed above, i have added the following to my php.in file..

extension=phpchartdir550mt.dll

i have tried the other version as well without the mt............

any help would be appreciated i really would like to switch to a better graphing solution

  Re: Can't get sample programs to run
Posted by Peter Kwan on Jul-15-2016 12:45
Hi Steve,

The "ELFCLASS32" error usually is caused by trying to load a 32-bit shared object in a 64-bit process.

Is it possible you have downloaded ChartDirector for PHP for Linux (i386/i686), but your operating system is actually Linux (x86_64) as indicated in the "System Information"?

Please try to download "ChartDirector for PHP for Linux (x86_64), and copy *everything* (including the fonts subdirectory) in "ChartDirector/lib" to "/usr/lib/php5/20121212". To double check, the file size of "libchartdir.so" should be around 4.7MB, while the "phpchartdir550.dll" should be 12160 bytes in size.

Then please modify the extension statement to:

extension=phpchartdir550.dll

Then please restart Apache. If you are using Ubuntu, it might be "sudo apachectl restart" (it may depend on your Ubuntu Linux version).

(Usually, Linux PHP is non-thread-safe. It is because Linux using forking, so multi-threading is not necessary and can only make the system slower. As a result, most Linux distribution comes with non-thread-safe PHP. However, if you compile the PHP yourself or download it from other sources, it can be thread-safe, in which case please use phpchartdir550mt.dll. You can use phpinfo to check if the PHP is thread-safe or not.)

Hope this can help.

Regards
Peter Kwan