|
我以前(freebsd7.0)手动安装php时,在 php.ini里可以通过
extension=phpchartdir520mt.dll 加载 ChartDirector
现在用famp ,使用apache做服务器,修改/usr/local/php/lib/php.ini 后
;extension=php_zip.dll
extension=phpchartdir520.dll
并且把扩展文件拷贝到 /usr/local/php/lib/php/extensions/no-debug-zts-20060613/
执行/webserver-restart 也不报错,但是访问画图程序时,总是提示出错。。
我又修改/usr/local/php-fcgi/lib/php.ini 并且把扩展文件拷贝到 /usr/local/php-fcgi/lib/php/extensions/no-debug-zts-20060613/下,
执行/webserver-restart
PHP Warning: PHP Startup: Unable to load dynamic library './phpchartdir520.dll' - Cannot open "./phpchartdir520.dll" in Unknown on line 0
spawn-fcgi.c.197: child spawned successfully: PID: 987
我下载的ChartDirector是for FreeBSD (AMD64)版的。我的系统是amd64,不知道是不因为famp 兼容i386和amd64导致的?
----------------------------------------------------------------------------------------------------------------
Error Loading ChartDirector for PHP Extension
An attempt has been made to dynamically load ChartDirector, but it was not successful. Please refer to your ChartDirector for PHP documentation or click here for how to resolve the problem.
Error Log
Trying to load "phpchartdir520.dll" from the PHP extension directory "./" (note: directory ambiguous).
dl(): Not supported in multithreaded Web servers - use extension=phpchartdir520.dll in your php.ini
Also trying to load "phpchartdir520.dll" from "/home/ftp/chinadm/wwwroot/lib/chart".
dl(): Not supported in multithreaded Web servers - use /home/ftp/chinadm/wwwroot/lib/chart/phpchartdir520.dll in your php.ini
System Information
- Operating System : FreeBSD www.ppt8.com 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 07:18:07 UTC 2009 root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
- PHP version : 5.2.9
- PHP / Web Server interface : apache2handler
- PHP configuration file location : "/usr/local/php/lib/php.ini"[/td][/tr]
- PHP extension directory : "./" (note: directory ambiguous)
----------------------------------------------------------------------------------------------------------------------
说明“这里的dll”文件并不是windows下的dll,只是这样命名而已。
Hi Jonathan,
The "libchartdir.so" is not the PHP extension and cannot be loaded by PHP directly. The ChartDirector for PHP extension is "phpchartdir421.dll". (Don't worry about the ".dll" extension. It is a Linux extension, and can be loaded by PHP on Linux normally. It is called ".dll" so that we can use the same ChartDirector code in both Linux and Windows.)
You may refer to the installation section of the ChartDirector documentation for detail steps. In many case, you do not need to install ChartDirector in "php.ini" at all. ChartDirector will attempt to dynamically load itself (unless your PHP is in safe mode or is configured to disable dynamic extension loading). If you want to install it in "php.ini", copy "everything" in "ChartDirector\lib" to your PHP extension directory (not just the .so file, but *everything* and including the fonts subdirectory). Then use "extension=phpchartdir421.dll".
Hope this can help.
Regards
Peter Kwan
[ 本帖最后由 sosofun 于 2009-6-4 13:40 编辑 ] |
|