简体   繁体   English

使用XAMPP(Windows 64位)在php5上安装yaz扩展时出现问题

[英]Problems installing yaz extension on php5 using XAMPP (Windows 64 bit)

I can't install the YAZ extension on php. 我无法在php上安装YAZ扩展名。 I'm running php5 (Version 5.6.19) on a local installation of XAMPP on my computer. 我在计算机上本地安装的XAMPP上正在运行php5(版本5.6.19)。 My OS is windows 7 (64 bit). 我的操作系统是Windows 7(64位)。

I already tried the following: 我已经尝试了以下方法:

1) Downloaded the extension from pecl, and placed it in the proper folder setted on php.ini ( extension_dir="C:\\xampp\\php\\ext" ). 1)从pecl下载扩展名,并将其放置在php.ini上设置的适当文件夹中( extension_dir =“ C:\\ xampp \\ php \\ ext” )。 I opened the php.ini file and added the extension as the last extension on the list ( extension=php_yaz.dll ). 我打开了php.ini文件,并将扩展名添加为列表中的最后一个扩展名( extension = php_yaz.dll )。 I restarted apache and still doesnt recognize the functions ( Fatal error: Call to undefined function yaz_connect() in C:\\xampp\\htdocs\\testCrop\\upload.php on line 112 ) 我重新启动了Apache,但仍然无法识别功能( 致命错误:在第112行的C:\\ xampp \\ htdocs \\ testCrop \\ upload.php中调用未定义的函数yaz_connect()

2) I tried dowloading the extension from another site( http://www.dlldownloader.com/php_yaz-dll/#Operating-Systems-That-Can-Use-the-Php_yazdll-File ). 2)我尝试从另一个站点下载扩展名( http://www.dlldownloader.com/php_yaz-dll/#Operating-Systems-That-Can-Use-the-Php_yazdll-File )。 This .dll file is larger than the previous. 该.dll文件大于以前的文件。 I repeated the same steps and now an error window pops up that says: the program can't start because php4ts.dll is missing from your computer. 我重复了相同的步骤,现在弹出一个错误窗口,提示: 该程序无法启动,因为您的计算机缺少php4ts.dll。 Try reinstalling the program to fix this problem 尝试重新安装程序以解决此问题

So i downloaded php4ts.dll added it to the the ext folder, then to the php.ini, placed before the yaz extension, and the error that i get on the php_error_log.log is PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'php4ts.dll' in Unknown on line 0 and also PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\xampp\\php\\ext\\php_yaz.dll' - The specified module could not be found. 所以我下载了php4ts.dll,将其添加到ext文件夹中,然后添加到yaz扩展名之前的php.ini中,并且在php_error_log.log上遇到的错误是PHP警告:PHP启动:无效的库(也许不是第0行以及PHP 上的“未知”中的PHP库)'php4ts.dll' 警告:PHP启动:无法加载动态库'C:\\ xampp \\ php \\ ext \\ php_yaz.dll'-找不到指定的模块。

3) I also tried adding the extension to system32 and sysWOW64, and followed the instructions in the site that i mentioned eralier, and again didn't work 3)我也尝试将扩展名添加到system32和sysWOW64,并按照我先前提到的站点中的说明进行操作,但再次无效

4)I also tried the steps on the comment on this php manual entry: http://php.net/manual/en/ref.yaz.php . 4)我还尝试了有关此php手册条目的注释步骤: http : //php.net/manual/en/ref.yaz.php Didn't work 没工作

Needless to say that i already restarted XAMPP , apache, mysql and my computer eight times and still keep getting the same errors. 不用说我已经重新启动了XAMPP,apache,mysql和我的计算机八次,并且仍然保持相同的错误。

So, to put it in a nutshell php can't find the extension even though i added it to the correct folder. 因此,简而言之,即使我将其添加到正确的文件夹中也找不到扩展名。 Should i place it in a different folder? 我应该将其放置在其他文件夹中吗? Should i download it from another site? 我应该从另一个站点下载吗?

Please i need to write a php5/html5 app to create bibliographic records fetching information using Z39.50 protocol from remote libraries . 我需要编写一个php5 / html5应用程序来创建书目记录,并使用Z39.50协议从远程库中获取信息 It needs to be php based. 它需要基于php。 If you know of another way, using php to interact with Z39.50 protocol, please let me know. 如果您知道另一种方式,请使用php与Z39.50协议进行交互,请告诉我。

Finally i was able to install the extension: 最后,我能够安装扩展程序:

The problem was i had the wrong version of the files. 问题是我的文件版本错误。

1)Go to: http://ftp.indexdata.dk/pub/phpyaz/windows/ and search trough the folders until you find the one that matches your php installation. 1)转到: http : //ftp.indexdata.dk/pub/phpyaz/windows/并搜索文件夹,直到找到与您的php安装匹配的文件夹。

2)Download all four files: libxml2.dll, libxslt.dll, php_yaz.dll, yaz5.dll 2)下载所有四个文件:libxml2.dll,libxslt.dll,php_yaz.dll,yaz5.dll

3)Place the following files inside your php folder (\\xampp\\php): libxml2.dll, libxslt.dll, yaz5.dll 3)将以下文件放入您的php文件夹(\\ xampp \\ php)中:libxml2.dll,libxslt.dll,yaz5.dll

4)Place php_yaz.dll inside your php extensions folder (xampp\\php\\ext) 4)将php_yaz.dll放在php扩展文件夹(xampp \\ php \\ ext)中

5)Add the following line to php.ini (you can find out where is php.ini located calling phpinfo): extension=php_yaz.dll (look for the place where all the other extension are declarated and place it at the bottom as the las one installed) 5)将以下行添加到php.ini中(您可以找到php.ini在哪里调用phpinfo):extension = php_yaz.dll(查找声明了所有其他扩展名的位置,并将其放在底部作为一安装)

6)Restart your server 6)重启服务器

That should work. 那应该工作。 You can check if it is installed by calling phpinfo and checking if yaz extension appears as a section. 您可以通过调用phpinfo并检查yaz扩展名是否作为部分显示来检查它是否已安装。

Cheers! 干杯!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM