dongqiao0953 2014-12-22 03:14
浏览 20
已采纳

XAMPP 5.5.19或更高版本上的错误控制操作符('@')

I have PHP code like below, which goes well on XAMPP version 5.3 :

...
if (!@$this->LDAP_Connection = ldap_connect($this->LDAP_Server, $this->LDAP_Port)) {
  $this->_SetLDAPError();
  return false;
} else {
  ...
}
...

But when I switch to XAMPP version 5.5.19, it appears an unknown error.

Is there a mistaken configuration in php.ini file? or

Is there any other way regarding the use of Error Control Operator ('@') in XAMPP version 5.5.19 or above?

I've read the documentation in http://php.net/manual/en/language.operators.errorcontrol.php, but it doesn't solve the problem.

Thank you for taking your time to give me some example code or alter my code in answer comment.

  • 写回答

2条回答 默认 最新

  • dongqintong8972 2014-12-24 05:07
    关注

    I found the problem. The XAMPP with PHP version 5.4 or higher need file libsasl.dll inside folder xampp/apache/bin/. The libsasl.dll is already set in folder xampp/php/ when the XAMPP was installed. So I just copy it.

    I found this concerning XAMPP where the fix was to move the libsasl.dll out of the xampp/php to the xampp/apache/bin before enabling the ldap extension (http://www.apachefriends.org/f/viewtopic.php?p=185776). I tried it and it worked.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 前端echarts坐标轴问题
  • ¥15 CMFCPropertyPage
  • ¥15 ad5933的I2C
  • ¥15 请问RTX4060的笔记本电脑可以训练yolov5模型吗?
  • ¥15 数学建模求思路及代码
  • ¥50 silvaco GaN HEMT有栅极场板的击穿电压仿真问题
  • ¥15 谁会P4语言啊,我想请教一下
  • ¥15 这个怎么改成直流激励源给加热电阻提供5a电流呀
  • ¥50 求解vmware的网络模式问题 别拿AI回答
  • ¥24 EFS加密后,在同一台电脑解密出错,证书界面找不到对应指纹的证书,未备份证书,求在原电脑解密的方法,可行即采纳