Php 致命错误:调用未定义的函数expect_popen()
自从我在Ubuntu14.04LTS服务器上从PHP5.5.9升级到5.6后,我的PHP expect库一直存在问题。它会在描述中不断显示致命错误。我相信我需要的软件包是libexpect-php5。一些安装检查确认它已安装:Php 致命错误:调用未定义的函数expect_popen(),php,expect,Php,Expect,自从我在Ubuntu14.04LTS服务器上从PHP5.5.9升级到5.6后,我的PHP expect库一直存在问题。它会在描述中不断显示致命错误。我相信我需要的软件包是libexpect-php5。一些安装检查确认它已安装: root@k1:/etc/php5/conf.d$ dpkg --get-selections | grep -v deinstall | grep expect empty-expect install expect
root@k1:/etc/php5/conf.d$ dpkg --get-selections | grep -v deinstall | grep expect
empty-expect install
expect install
expect-dev install
expect-lite install
libexpect-ocaml install
libexpect-ocaml-dev install
libexpect-perl install
**libexpect-php5** install // installed right?
libexpect-simple-perl install
libghc-hspec-expectations-dev install
libghc-hspec-expectations-doc install
libghc-hspec-expectations-prof install
libnet-scp-expect-perl install
libtest-expect-perl install
netexpect install
python-pexpect install
python-pexpect-doc install
python3-pexpect install
及
以及expect.so文件:
root@k1:/usr/lib$ ls | grep expect
libexpect.so
libexpect.so.5
libexpect.so.5.45
最后是我的/etc/php5/apache2/php.ini文件:
extension=expect.so
我必须通过手动下载并安装.deb文件来安装libexpect-ph5,因为它在一个可卸载的依赖api上出错。。。现在,当我这样做时,apt-get-update&&apt-get-upgrade它总是告诉我:
The following packages have been kept back:
libexpect-php5
只需安装该软件包就可以做一些事情,但系统仍会保留该软件包。这就给我留下了一个不知道expect_popen()函数的PHP版本
如何解决这个问题?我发现Apache2加载了错误的php.ini文件。升级到PHP5.6之后,路径也发生了变化(当然) 旧址:
/etc/php/apache2/php.ini
/etc/php/5.6/apache2/php.ini
新地点:
/etc/php/apache2/php.ini
/etc/php/5.6/apache2/php.ini
除此之外,我还必须在php.ini中指定expect.so扩展的确切路径 我发现Apache2加载了错误的php.ini文件。升级到PHP5.6之后,路径也发生了变化(当然) 旧址:
/etc/php/apache2/php.ini
/etc/php/5.6/apache2/php.ini
新地点:
/etc/php/apache2/php.ini
/etc/php/5.6/apache2/php.ini
除此之外,我还必须在php.ini中指定expect.so扩展的确切路径 您好,您是否尝试重新启动apache或服务器,以查看是否在升级时进行了更改?@JuanGarcia是的,多次,但没有任何更改-(您好,您是否尝试重新启动apache或服务器,以查看它是否在升级时进行了更改?@JuanGarcia是的,多次,但没有更改;-(您是如何安装expect.so的?您是如何安装expect.so的?