Thank you Jude for your time,
When i execute the sample command for python and perl,that works, but when i execute the sample command for php,
root@back-1:~# php /usr/local/src/freeswitch/libs/esl/php/single_command.php status or
root@back-1:~# php /usr/local/src/freeswitch/libs/esl/php/single_command.php "sofia status" or
root@back-1:~# php /usr/local/src/freeswitch/libs/esl/php/single_command.php -c "sofia status"
I get the following error:
PHP Warning: dl(): Unable to load dynamic library '/usr/lib/php5/20131226/ESL.so' - /usr/lib/php5/20131226/ESL.so : undefined symbol: _ZN13ESLconnection6filterEPKcS1_ in /usr/share/php/ESL.php on line 22
Command to run is: status
PHP Fatal error: Call to undefined function new_ESLconnection() in /usr/share/php/ESL.php on line 155
I tried to re-install the languages:
root@back-1:~# cd /usr/local/src/freeswitch/libs/esl
root@back-1:/usr/local/src/freeswitch/libs/esl# make
Making all in .
make[1]: Entering directory '/usr/local/src/freeswitch/libs/esl'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/usr/local/src/freeswitch/libs/esl'
Making all in perl
make[1]: Entering directory '/usr/local/src/freeswitch/libs/esl/perl'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/usr/local/src/freeswitch/libs/esl/perl'
root@back-1:/usr/local/src/freeswitch/libs/esl# make perlmod-install
make -C perl install
make[1]: Entering directory '/usr/local/src/freeswitch/libs/esl/perl'
make[2]: Entering directory '/usr/local/src/freeswitch/libs/esl/perl'
make[2]: Nothing to be done for 'install-exec-am'.
/bin/mkdir -p '/usr/lib/x86_64-linux-gnu/perl/5.20'
/bin/bash /usr/local/src/freeswitch/libtool --mode=install /usr/bin/install -c ESL.la '/usr/lib/x86_64-linux- gnu/perl/5.20'
libtool: install: /usr/bin/install -c .libs/ESL.so /usr/lib/x86_64-linux-gnu/perl/5.20/ESL.so
libtool: install: /usr/bin/install -c .libs/ESL.lai /usr/lib/x86_64-linux-gnu/perl/5.20/ESL.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/lib/x8 6_64-linux-gnu/perl/5.20
----------------------------------------------------------------------
Libraries have been installed in:
/usr/lib/x86_64-linux-gnu/perl/5.20
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
install -d -m 755 ESL /usr/lib/x86_64-linux-gnu/perl/5.20/ESL
install -m 755 ESL.pm /usr/lib/x86_64-linux-gnu/perl/5.20
install -m 755 ESL/* /usr/lib/x86_64-linux-gnu/perl/5.20/ESL
make[2]: Leaving directory '/usr/local/src/freeswitch/libs/esl/perl'
make[1]: Leaving directory '/usr/local/src/freeswitch/libs/esl/perl'
phpmod install:
root@back-1:/usr/local/src/freeswitch/libs/esl# make phpmod-install
make MYLIB=".././.libs/libesl.a" SOLINK="-shared -Xlinker -x" CFLAGS="-I/usr/local/src/freeswitch/libs/esl/src/inc lude -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/l ibs/libteletone/src -fPIC -Werror -Wno-unused-result -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILI TY=1 -g -ggdb -DHAVE_OPENSSL" CXXFLAGS="-I/usr/local/src/freeswitch/libs/esl/src/include -I/usr/local/src/freeswit ch/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/libs/libteletone/src -fPIC -fvi sibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1" CXX_CFLAGS="" -C php
make[1]: Entering directory '/usr/local/src/freeswitch/libs/esl/php'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/usr/local/src/freeswitch/libs/esl/php'
make -C php install
make[1]: Entering directory '/usr/local/src/freeswitch/libs/esl/php'
test -d "/usr/lib/php5/20131226" || mkdir -p "/usr/lib/php5/20131226"
cp ESL.so "/usr/lib/php5/20131226"
test -d "/usr/share/php" || mkdir -p "/usr/share/php"
cp ESL.php "/usr/share/php"
test -d "/etc/php5/apache2/conf.d" || mkdir -p "/etc/php5/apache2/conf.d"
test -f "/etc/php5/apache2/conf.d/esl.ini" || echo 'extension=ESL.so' > "/etc/php5/apache2/conf.d/esl.ini"
make[1]: Leaving directory '/usr/local/src/freeswitch/libs/esl/php'
root@back-1:/usr/local/src/freeswitch/libs/esl# cd php/
root@back-1:/usr/local/src/freeswitch/libs/esl/php# ls
ESL.php esl_wrap.cpp Makefile Makefile.in single_command.php
ESL.so esl_wrap.o Makefile.am php_ESL.h test.php
root@back-1:/usr/local/src/freeswitch/libs/esl/php# php single_command.php status
But i still hava the same error:
PHP Warning: dl(): Unable to load dynamic library '/usr/lib/php5/20131226/ESL.so' - /usr/lib/php5/20131226/ESL.so : undefined symbol: _ZN13ESLconnection6filterEPKcS1_ in /usr/local/src/freeswitch/libs/esl/php/ESL.php on line 22
Command to run is: status
PHP Fatal error: Call to undefined function new_ESLconnection() in /usr/local/src/freeswitch/libs/esl/php/ESL.php on line 155
and when i execute ESL.so, i get segfault:
root@back-1:/usr/local/src/freeswitch/libs/esl/php# ./ESL.so
Segmentation fault (core dumped)
In fact, i have two php installed, one php and php5. I 'm wondering if the problem is related to those differents php.
I think that it is not necesary to give you my php scrript because i can't even execute a sample command.
Help hel help please!!!!