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

Message ListMessage List     Post MessagePost Message

  Unable to load dynamic library
Posted by Segers Pascal on May-23-2012 04:30
Dir sir,

I use ChartDir since a long time without any problem.
Now I'm trying to install it on a OVH server and I get the following message:

Error Loading ChartDirector for PHP Extension

It appears this PHP system has not loaded the ChartDirector extension by using an extension statement in the
PHP configuration file (typically called "php.ini"). An attempt has been made to dynamically load ChartDirector
on the fly, but it was not successful. Please refer to the Installation section of the ChartDirector for PHP
documentation on how to resolve this problem.

Error Log


Trying to load "phpchartdir530.dll" from the PHP extension directory "./" (note: directory ambiguous).

dl(): Unable to load dynamic library './phpchartdir530.dll' - ./phpchartdir530.dll: cannot open shared object file: No
such file or directory


System Information
Operating System : Linux web1047.90.ha.ovh.net 3.2.2-grsec-mutu-grs-ipv6-64 #1 SMP Thu Jan 26 14:55:34 UTC
2012 x86_64
PHP version : 5.3.10
PHP / Web Server interface : cgi-fcgi
PHP configuration file location : "/usr/local/lib/php.ini-2"
PHP extension directory : "./" (note: directory ambiguous)

I use de latest chartdir_php_linux_64.tar.gz version but without succ?s. Due to the  use of an OVH server I can't
modify the php.ini.

What do I have to do?

Thanks a lot

Pascal

  Re: Unable to load dynamic library
Posted by Peter Kwan on May-24-2012 01:09
Hi Segers,

There are several things you may check or try:

In your case, the error message is "No such file or directory" when loading "./phpchartdir530.dll". There are two possible reasons of this error:

(a) The file "./phpchartdir530.dll" does not exist. If this is the case, please try to copy *everything* from ChartDirector/lib to the "./" subdirectory. Unluckily, it is hard to know where is "./", as it depends on how your server is configured. It may be the directory that your script is running, or it may be the directory of the PHP executable, or some other directory. I suggest you to simply try the "same directory as the script" to see if it works.

(b) The error message can also occur if the "phpchartdir530.dll" is of a different OS architecture from that of PHP. (The Linux OS for some reason may issue this error if a 32-bit process tries to load a 64-bit shared object, or vice versa.) According to the error message, your OS architecture is Linux (x86_64). It is very likely that your PHP architecture is also Linux (x86_64), so using chartdir_php_linux_64.tar.gz should be appropriate. Please check that the files "phpchartdir530.dll" and "libchartdir.so" are both in the same directory as your script, and is of size 12224 bytes and 3923048 bytes (this is the file size from the latest chartdir_php_linux_64.tar.gz), just to confirm if they are really for x86_64.

There is also a remote possibility that the PHP is actually 32-bit, because 64-bit Linux can also be configured to run 32-bit programs. So if the above does not work, you may try chartdir_php_linux.tar.gz too see if it makes any difference. (I have never seen any hosting company putting 32-bit PHP on 64-bit Linux, but I have seen one of our customers doing this on his own server. So this possibility is remote but not impossible.)

(c) Although you may be unable to modify the "/usr/local/lib/php.ini-2" (which is the active "php.ini" as according to the error message), you may be able to set up a private "php.ini" in your own directory, totally under your control. This would allow you to configure the PHP to load any extension you like. See:

http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&thread=1314232836#N1314254282

If you can private a guest account to me to allow me to upload files to your web server document and CGI directories, I can try to install ChartDirector for you. You may email the details to me at pkwan@advsofteng.net.

Regards
Peter Kwan