简体   繁体   English

启用php_curl扩展名时显示错误

[英]When enabling php_curl extension it's showing error

I install wampserver on Windows 7 (64 bit) on server where some another service are also installed like IIS etc. So I change the port from 80 to 8080 in httpd.conf.I install 2.4 version. 我在Windows 7(64位)的服务器上安装了wampserver,服务器上还安装了IIS等其他服务。因此,我在httpd.conf中将端口从80更改为8080。我安装了2.4版本。 So here when I try to enable php_curl it's showing error 所以在这里,当我尝试启用php_curl时,它显示错误

Could not execute menu item (internal error)[Exception] Could not perform sevice action 无法执行菜单项(内部错误)[Exception]无法执行服务动作

In apache_error I found that.... it's showing 在apache_error中,我发现了...。

php warning: PHP startup: Unable to load dynamic library 'c:\\Program FilesFilemaker\\Filemaker Server\\Web Publishing\\publishing-engine\\php\\ext\\php_curl.dll'-%1 is not a validwin32 application.\r\n in unknown on line 0

You're going to have some issues here because you have FileMaker server installed and it has it's own PHP stack installed and it has that set in your Path variable. 您将在这里遇到一些问题,因为您已经安装了FileMaker服务器,并且已经安装了自己的PHP堆栈,并且在Path变量中进行了设置。 So when you try to starup WAMP, windows is trying to intialize the curl.dll in the FileMaker php directory. 因此,当您尝试启动WAMP时,Windows会尝试在FileMaker php目录中初始化curl.dll。

I highly advise not trying to run both WAMP and FileMaker server on the same machine if you are using IIS and FileMaker CWP/IWP/XML. 如果您使用IIS和FileMaker CWP / IWP / XML,我强烈建议不要尝试在同一台计算机上同时运行WAMP和FileMaker服务器。

If you absolutely have to, you're going to need to edit your path variable but you're probably going to break the filemaker server's php install doing so. 如果绝对必要,则需要编辑path变量,但这样做可能会破坏filemaker服务器的php安装。 I haven't ever gotten it to work correctly. 我从来没有得到它可以正常工作。

@user3068785 You would write your php separately, then you would call that php through a web portal on a layout. @ user3068785您可以单独编写php,然后通过布局上的Web门户调用该php。 It is common to do things such as have PHP parse some xml from an API using parameters from FileMaker. 通常会做一些事情,例如让PHP使用FileMaker中的参数从API解析一些xml。 You can calculate out the address you want to call using a calculation and concatenating your parameters. 您可以使用计算并连接参数来计算出要调用的地址。

FileMaker PHP is just an API library which proviced for the ability to create PHP scripts that can interact with or just display data from FileMaker. FileMaker PHP只是一个API库,它具有创建可与FileMaker交互或仅显示FileMaker数据的PHP脚本的能力。

for example, lets say you have a FileMaker database named "Contacts" and you host it locally on your server at: 192.168.1.25. 例如,假设您有一个名为“ Contacts”的FileMaker数据库,并将其本地托管在服务器上的192.168.1.25。 Your username is Ralph and your password is blankets. 您的用户名是Ralph,密码是毯子。 In php, you can make a simple function to do something like: 在php中,您可以制作一个简单的函数来执行以下操作:

    <?php

require_once ('FileMaker.php');
define('FM_HOST', '192.168.1.25');
define('FM_FILE', 'Contacts');
define('FM_USER', 'Ralph');
define('FM_PASS', 'blankets');


$fm = new FileMaker('TSG', '192.168.1.10', $_POST['username'], $_POST['password']);
    $result = $fm->listLayouts();
    foreach ($result as $layout){
        <--do something with your layouts that have been parsed into an array -->
    ;}

 ?>

The API goes much deeper with being able to call records, specific fields, allow you to pull valuelists, edit records, create records etc. 该API能够调用记录,特定字段,允许您提取值列表,编辑记录,创建记录等,因此功能更加深入。

I solved this issue. 我解决了这个问题。 I see that When I installed Filemaker Server that time its also installed PHP. 我看到当我安装Filemaker Server时,它也安装了PHP。 After that Again I installed wamp server.So If i called a php file than its supports comes from filemaker server 's PHP folder. 之后,我再次安装了wamp服务器。因此,如果我调用了php文件,则其支持来自Filemaker服务器的PHP文件夹。 Here in this PHP folder's php.ini i enable the php_curl extension. 在此PHP文件夹的php.ini中,我启用php_curl扩展名。

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

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