|
Unable to load dynamic library |
Posted by Stephen on Jul-24-2011 17:48 |
|
hi
i am attempting to get chartdirector to work in a centos install.
[root@comdata phpdemo]# uname -a
Linux comdata 2.6.18-238.el5 #1 SMP Thu Jan 13 15:51:15 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@comdata phpdemo]#
i have downloaded and installed chartdir_php_linux_64.tar into /var/www/html
i have copied the lib/* into "/usr/lib64/php/modules"
i have put the extension "extension=phpchartdir421.dll" into php.ini
and restarted everything... (as well as restarting centos).
i am getting this error in the chartdirector log...
Error Log
Trying to load "phpchartdir530.dll" from the PHP extension directory "/usr/lib64/php/modules".
Fatal error: Call to undefined function dl() in /var/www/html/ChartDirector/lib/phpchartdir.php on line 44
and my php version...
[root@comdata phpdemo]# php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/phpchartdir421.dll' - /usr/lib64/php/modules/phpchartdir421.dll: undefined symbol: _zval_copy_ctor in Unknown on line 0
PHP 5.3.3 (cli) (built: Mar 30 2011 13:51:54)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
[root@comdata phpdemo]#
shows the error as well.
it's all x86_64 the os and the chartdirector version..
i have no idea when i am doing wrong.... |
Re: Unable to load dynamic library |
Posted by Stephen on Jul-24-2011 18:19 |
|
I have just downloaded chartdir_php_linux_64.tar again in binary format.
gunzipped it, and reinstalled the binaries/libraries.
still the same problem. |
Re: Unable to load dynamic library |
Posted by Peter Kwan on Jul-25-2011 18:29 |
|
Hi Stephen,
Your PHP version is 5.3.3. Please performs the followings:
(a) Put "extension=phpchartdir530.dll" in your "php.ini" (not phpchartdir421.dll)
(b) Copy *everything* from ChartDirector/lib (including "phpchartdir530.dll", "libchartdir.so" and the fonts subdirectory) to your PHP extension directory "/usr/lib64/php/modules".
(c) Restart Apache.
Please kindly let me know if the above can solve the problem.
Regards
Peter Kwan |
Re: Unable to load dynamic library |
Posted by Kevin Yilmaz on Aug-31-2011 12:28 |
|
I got the same issue.
There was "enable_dl Off" in php.ini.
I changed it to "enable_dl on"
Then I did what wrote and I got these 2 error messages.
1-
---------------------------
php-win.exe - Bad Image
---------------------------
c:\\wamp\\bin\\php\\php5.3.4\\ext\\phpchartdir530.dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support.
---------------------------
OK
---------------------------
2-
---------------------------
Warning
---------------------------
PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.4/ext/phpchartdir530.dll' - %1 is not a valid Win32 application.
---------------------------
OK
---------------------------
Peter Kwan wrote:
Hi Stephen,
Your PHP version is 5.3.3. Please performs the followings:
(a) Put "extension=phpchartdir530.dll" in your "php.ini" (not phpchartdir421.dll)
(b) Copy *everything* from ChartDirector/lib (including "phpchartdir530.dll", "libchartdir.so" and the fonts subdirectory) to your PHP extension directory "/usr/lib64/php/modules".
(c) Restart Apache.
Please kindly let me know if the above can solve the problem.
Regards
Peter Kwan
|
Re: Unable to load dynamic library |
Posted by Peter Kwan on Aug-31-2011 13:48 |
|
Hi Kevin,
The error message seems to suggest you are using Windows, but the "phpchartdir530.dll" is not a Windows DLL.
Would you mind to verify if you are using the Windows edition of "ChartDirector for PHP"? (There are many editions of "ChartDirector for PHP" for different OS, such as Windows, Linux, FreeBSD, Solaris and Mac OS X.) There should be at least two files "phpchartdir530.dll" and "chartdir.dll" in your PHP extension directory "c:\\wamp\\bin\\php\\php5.3.4\\ext". The file size of "phpchartdir530.dll" should be 65536 bytes.
If the above still cannot solve the problem, would you mind to perform the followings and inform me of the results:
cd c:\\wamp\\bin\\php\\php5.3.4\\ext
dir
Regards
Peter Kwan |
Re: Unable to load dynamic library |
Posted by Kevin Yilmaz on Aug-31-2011 23:01 |
|
You are right!
I am trying to install Linux version on Windows!!!
I will download the Windows version and let you know the result.
Now I am trying to install it on Linux server, shared hosting. I will write about that under the proper support topic.
Thank you. |
Re: Unable to load dynamic library |
Posted by Kevin Yilmaz on Sep-01-2011 01:28 |
|
Hi Peter,
I deleted ChartDirector folder.
Downloaded and unzipped Windows version of ChartDirector.
Copied lib folder to 'c:/wamp/bin/php/php5.3.4/ext.
Added extension=phpchartdir530.dll to all php.ini's
Exited WAMPServer and started again.
Logged off Windows and started again.
etc.
That's what I got:
1-
This is the file that I have:
phpchartdir530.dll 7/8/2009 64 kb
When I run WampServer I get this error:
---------------------------
Warning
---------------------------
PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.4/ext/phpchartdir530.dll' - %1 is not a valid Win32 application.
---------------------------
OK
---------------------------
2-
I have php.ini says:
; http://php.net/enable-dl
enable_dl = on
extension=phpchartdir530.dll
BUT
http://localhost/chart1.php says:
Error Log
Trying to load "phpchartdir530.dll" from the PHP extension directory "c:/wamp/bin/php/php5.3.4/ext/".
Fatal error: Call to undefined function dl() in C:\\wamp\\www\\ChartDirector\\lib\\phpchartdir.php on line 44 Call Stack: 0.0047 677192 1. {main}() C:\\wamp\\www\\chart1.php:0 0.0371 4077424 2. require_once('C:\\wamp\\www\\ChartDirector\\lib\\phpchartdir.php') C:\\wamp\\www\\chart1.php:7 0.0373 4125112 3. cdLoadDLL() C:\\wamp\\www\\ChartDirector\\lib\\phpchartdir.php:174
Thank you
Kevin |
Re: Unable to load dynamic library |
Posted by Peter Kwan on Sep-01-2011 05:57 |
|
Hi Kevin,
Would you mind to clarify if you are using 32-bit PHP or 64-bit PHP on Windows?
The PHP distribution in the official PHP web site (http://windows.php.net/download/) only has 32-bit PHP for Windows. As a result, ChartDirector for PHP on Windows only supports 32-bit PHP.
However, as PHP is open source, everyone can compile their own PHP distribution (so there are many third party PHP distributions), and they can modify and compile the PHP to be 64-bit (and therefore not binary compatible with the official PHP Windows binary distribution).
Note that you can always use 32-bit PHP on 64-bit Windows with a 64-bit web server (IIS or Apache or others). Whether the OS is 32-bit or 64-bit is not important. The important part is the PHP must be binary compatible with the official PHP distribution (which is only 32-bit for Windows).
Also, as you are using PHP 5.3.x, the "php.ini" method should work, while the "dl" method (enable_dl) should not work. It is because Zend (the company that develops PHP) has removed support for dynamic loading of extensions in PHP 5.3, so "dl" will no longer work, and "enable_dl" has no effect.
If the above still does not solve the problem, would you mind to inform me of the followings:
(a) Your phpinfo
(b) The result of the followings:
cd c:\\wamp\\bin\\php\\php5.3.4\\ext
dir
Regards
Peter Kwan |
Re: Unable to load dynamic library |
Posted by aasheaa on Sep-23-2011 13:45 |
|
My error
Description : ChartDirector
Version : 5.0.2
Copyright : Copyright (c) 2009 Advanced Software Engineering Limited
Boot Log :
2011-09-23 13:34:45> ChartDirector at d:\\wamp\\bin\\php\\php5.3.0\\ext\\chartdir.dll started
2011-09-23 13:34:45> Cannot load license file d:\\wamp\\bin\\php\\php5.3.0\\ext\\chartdir.lic - No such file or directory [error code = 2]
Updated license check at 2011-09-23 13:36:54> Cannot load license file d:\\wamp\\bin\\php\\php5.3.0\\ext\\chartdir.lic - No such file or directory [error code = 2]
Font Loading Test :
Searching for arial.ttf - No such file or directory [err code = 2]
Successfully opened C:\\Windows/fonts/arial.ttf
my php.ini
;extension=php_zip.dll
extension=phpchartdir530.dll
my
d:\\wamp\\bin\\php\\php5.3.0\\ext\\
have all xx.dll
help me! |
Re: Unable to load dynamic library |
Posted by aasheaa on Sep-23-2011 13:53 |
|
I download chartdir.lic
and put in
D:\\wamp\\bin\\php\\php5.3.0\\ext
and error
Font Loading Test :
Searching for arial.ttf - No such file or directory [err code = 2]
Successfully opened C:\\Windows/fonts/arial.ttf |
Re: Unable to load dynamic library |
Posted by Peter Kwan on Sep-24-2011 00:43 |
|
Hi aasheaa,
The "Font Loading Test" message you saw was not an error. They are normal, and your charts should work normally.
When ChartDirector needs a font like "arial.ttf", it will use a "search path" to search several directories for the font. For your case, ChartDirector first searches using the "current working directory" for "arial.ttf", but the system reports "No such file or directory". So ChartDirector searches the directory "C:\\Windows/fonts", and it can successfully found the font there. So at the end, the font is "Successfully opened".
Hope this can help.
Regards
Peter Kwan |
|