following message will come if php expect module didn't find on web server expect example page.
fopen(): Unable to find the wrapper "expect" - did you forget to enable it when you configured PHP?
This means expect.so is not there in /usr/lib/php5/extensions
to install expect module follow streps :
1. Before installation install dependencies : expect-devel, tcl-devel packages
2. run following command to build and install expect module
pecl install channel://pecl.php.net/expect-0.3.1
It will create /usr/lib/php5/extensions/expect.so file
3. Now add config file for php in /etc/php5/conf.d/expect.ini
cat > /etc/php5/conf.d/expect.ini << END
; comment out next line to disable mysqli extension in php
extension=expect.so
4. Now check php modules by following command:
php -m
If you get following error :
1 /usr/lib/gcc/i586-suse-linux/4.7/../../../../i586-suse-linux/bin/ld: cannot find -lexpect
/usr/lib/gcc/i586-suse-linux/4.7/../../../../i586-suse-linux/bin/ld: cannot find -ltcl
collect2: error: ld returned 1 exit status
make: *** [expect.la] Error 1
ERROR: `make' failed
fopen(): Unable to find the wrapper "expect" - did you forget to enable it when you configured PHP?
This means expect.so is not there in /usr/lib/php5/extensions
to install expect module follow streps :
1. Before installation install dependencies : expect-devel, tcl-devel packages
2. run following command to build and install expect module
pecl install channel://pecl.php.net/expect-0.3.1
It will create /usr/lib/php5/extensions/expect.so file
3. Now add config file for php in /etc/php5/conf.d/expect.ini
cat > /etc/php5/conf.d/expect.ini << END
; comment out next line to disable mysqli extension in php
extension=expect.so
END
4. Now check php modules by following command:
php -m
If you get following error :
1 /usr/lib/gcc/i586-suse-linux/4.7/../../../../i586-suse-linux/bin/ld: cannot find -lexpect
/usr/lib/gcc/i586-suse-linux/4.7/../../../../i586-suse-linux/bin/ld: cannot find -ltcl
collect2: error: ld returned 1 exit status
make: *** [expect.la] Error 1
ERROR: `make' failed
for that go to /usr/lib/
ln -s libexpect<version>.so libexpect.so
ln -s libtcl<version>.so libtcl.so
( <version> : is the version number of the package )
0 comments:
Post a Comment