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

Message ListMessage List     Post MessagePost Message

  Struggling with extension dynamic loading
Posted by Gregory on Jul-20-2012 18:12
Hello,

I'm trying to use the extension dynamic loading on a hosted server, but am always hitting the following message :

Error Log

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

dl(): Unable to load dynamic library './phpchartdir520.dll' - ./phpchartdir520.dll: wrong ELF class: ELFCLASS64


System Information

    Operating System : Linux web652.media.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.2.17
    PHP / Web Server interface : cgi
    PHP configuration file location : "/usr/local/lib/php.ini"
    PHP extension directory : "./" (note: directory ambiguous)

I am using the Linux x86_64 distribution, what exactly means this ELF class message ?

Thanks for any advice.

Gregory

  Re: Struggling with extension dynamic loading
Posted by Peter Kwan on Jul-21-2012 00:15
Hi Gregory,

Whether you are using 64-bit Linux OS or not actually does not matter. What is important is the PHP OS architecture you are using. Is your PHP compiled for the Linux (x86_64) architecture, or is the PHP for the Linux (i386) architecture?

I believe virtually all Linux (x86_64) distribution includes PHP for Linux (x86_64). However, sometimes people are not satisfied with the PHP included in the OS, and may install and compile another version of PHP. That other version of PHP can be for Linux (x86_64) or for Linux (i386/i686), depending on how it is compiled. (The Linux (x86_64) OS can run both type of executables.)

For your case, if you are using PHP for Linux (i386/i686) on Linux (x86_64), please use the ChartDirector for PHP for Linux (i386/i686(. The "ChartDirector for PHP" should match the PHP architecture, not the OS architecture.

If you re not sure which type of PHP you are using, you may try to use the Linux (i386/i686) edition of ChartDirector for PHP, as the error message apparently means that the PHP you are using is 32-bit (and so it cannot load 64-bit binaries).

Please kindly let me know if this can solve the problem.

Regards
Peter Kwan

  Re: Struggling with extension dynamic loading
Posted by Gregory on Jul-21-2012 00:27
Perfect explanation, switching to i386 made it.
The server was built by my hosting company so I didn't know what they did, but anyway I
was not aware you can mix builds of php with the machine type.

Thank you !