php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59916 Can't use module on Fedora 15
Submitted: 2011-08-30 12:44 UTC Modified: 2011-11-22 16:29 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:2 (66.7%)
From: mark dot frost at lightningsource dot com Assigned: michael (profile)
Status: Closed Package: expect (PECL)
PHP Version: 5.3.6 OS: Fedora 15
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mark dot frost at lightningsource dot com
New email:
PHP Version: OS:

 

 [2011-08-30 12:44 UTC] mark dot frost at lightningsource dot com
Description:
------------
I've been trying to install this package on Fedora 15, but 
have been unsuccessful thus far. 

With the most recent version, after either a PECL install or 
manually installing it from source, I receive the following: 


PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/lib64/php/modules/expect.so' - 
/usr/lib64/php/modules/expect.so: undefined symbol: 
Tcl_GetStringResult in Unknown on line 0

Here's the versions Im running of all of the relevant 
packages: 


[mfrost@localhost expect-0.3.0]$ rpm -q expect expect-devel 
tcl tcl-devel php php-devel
expect-5.45-3.fc15.x86_64
expect-devel-5.45-3.fc15.x86_64
tcl-8.5.9-3.fc15.x86_64
tcl-devel-8.5.9-3.fc15.x86_64
php-5.3.6-2.fc15.x86_64
php-devel-5.3.6-2.fc15.x86_64


For the moment, I'd be equally happy with an actual fix, as 
with a work-around. I'd just like to get the module 
installed so I can use it. 

Reproduce code:
---------------
[mfrost@localhost expect-0.3.0]$ sudo pecl install expect-beta
[mfrost@localhost expect-0.3.0]$ php myscript.php

Expected result:
----------------
I expect the script to run and be able to load the module. 

Actual result:
--------------
PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/lib64/php/modules/expect.so' - 
/usr/lib64/php/modules/expect.so: undefined symbol: 
Tcl_GetStringResult in Unknown on line 0


PHP Warning:  fopen(): Unable to find the wrapper "expect" - 
did you forget to enable it when you configured PHP? in 
/home/mfrost/ssh_development/class.ssh.php on line 20
PHP Warning:  fopen(expect://...@lvis05): failed to open 
stream: No such file or directory in 
/home/mfrost/ssh_development/class.ssh.php on line 20


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-30 16:21 UTC] mark dot frost at lightningsource dot com
It looks like I dont get this issue with version 0.2.7 of the 
code, but I do get the Segmentation Fault issue. I thought 
that piece of information might be helpful.
 [2011-10-21 06:08 UTC] peter at ptm dot pp dot ru
Have the same problem in CentOS 6.

# rpm -q expect expect-devel tcl tcl-devel php php-devel
expect-5.44.1.15-2.el6.x86_64
expect-devel-5.44.1.15-2.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-devel-8.5.7-6.el6.x86_64
php-5.3.8-5.el6.remi.x86_64
php-devel-5.3.8-5.el6.remi.x86_64

# php -m | grep expect
PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/lib64/php/modules/expect.so' - /usr/lib64/php/modules/expect.so: undefined 
symbol: Tcl_GetStringResult in Unknown on line 0
 [2011-11-21 13:06 UTC] rob at pomeroy dot me
I've seen some possibly related problems on Ubuntu 11.10.  When installing the libexpect-php5 package (with all dependencies), Apache reports on startup:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/expect.so' - libexpect.so.5.44.1.15: cannot open shared object file: No such file or directory in Unknown on line 0

When install installing the expect module through PECL, Apache complains with:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/expect.so' - /usr/lib/libexpect.so.5.45: undefined symbol: Tcl_ErrnoMsg in Unknown on line 0

Possibly this version (0.3) is unable to use later libraries?
 [2011-11-22 16:27 UTC] michael@php.net
Automatic comment from SVN on behalf of michael
Revision: http://svn.php.net/viewvc/?view=revision&revision=319689
Log: Fixed compilation issues (bug #59916)
 [2011-11-22 16:29 UTC] michael@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


 [2011-11-22 16:29 UTC] michael@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: michael
 [2011-11-22 17:30 UTC] rob at pomeroy dot me
For the possible benefit of others in a similar situation...

So - bug present in 5.3.6 but not 5.3.8+?  For those who (like me) don't
want to face the hassle of attempting the upgrade, Dotdeb may provide
suitable packages:

http://www.dotdeb.org/

That said, I opted to shell_exec with expect scripts instead:

<?php
$script_dir = "/some/where/";
$script = "testscript";
$output = shell_exec('/usr/bin/expect '.$script_dir.$script. 'some.host');
?>

#!/usr/bin/expect
#
# Get uname via ssh
set timeout 10 
spawn /usr/bin/ssh user@[lindex $argv 0] "uname -a"
while {1} {
  expect {
    -re ".*Are.*.*yes.*no.*" {
      send "yes\r"
      exp_continue
    }

    "*?assword:*" {
      send "password"
      send "\r"
    }

    eof {
      break
    }
  }
}
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC