Segmentation fault when using composer - php

OS: Ubuntu 20.04 LTS
PHP Version: 7.4.22
I am trying to install a package with composer. But it caused a Segmentation Fault:
root#micro7:/www/wwwroot/micro7.ml# composer require laravel/breeze
Segmentation fault (core dumped)
The problem also appeared when creating project with composer:
root#micro7:~# composer create-project laravel/laravel micro7.ml
Creating a "laravel/laravel" project at "./micro7.ml"
Segmentation fault (core dumped)
I used gdb to get the stack trace of the dumped core, it looked like this:
root#micro7:~# gdb php core
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from php...
[New LWP 583799]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `php /usr/bin/composer create-project laravel/laravel micro7.ml'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fec2b356e00 in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.1
(gdb) bt
#0 0x00007fec2b356e00 in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.1
#1 0x00007fec2c1ecf6c in SSL_CTX_new () from /usr/local/openssl/lib/libssl.so.1.0.0
#2 0x00007fec2bf0ab3c in ossl_connect_step1 () from /usr/local/lib/libcurl.so.4
#3 0x00007fec2bf0c4ff in ossl_connect_common () from /usr/local/lib/libcurl.so.4
#4 0x00007fec2bf0d47c in Curl_ssl_connect_nonblocking () from /usr/local/lib/libcurl.so.4
#5 0x00007fec2bed2996 in https_connecting () from /usr/local/lib/libcurl.so.4
#6 0x00007fec2bed4383 in Curl_http_connect () from /usr/local/lib/libcurl.so.4
#7 0x00007fec2bee734d in multi_runsingle () from /usr/local/lib/libcurl.so.4
#8 0x00007fec2bee84b1 in curl_multi_perform () from /usr/local/lib/libcurl.so.4
#9 0x000055bdd4a2c339 in zif_curl_multi_exec ()
#10 0x000055bdd5166c3d in execute_ex ()
#11 0x000055bdd517e815 in zend_execute ()
#12 0x000055bdd4fce45b in zend_execute_scripts ()
#13 0x000055bdd4f05a84 in php_execute_script ()
#14 0x000055bdd51815df in do_cli ()
#15 0x000055bdd5182a24 in main ()
If you look at the first line of the output of the bt, you'll find that the Segmentation Fault maybe caused when establishing a SSL connection to the server of packagist.
I tried to reinstall composer, switch to the super user, reboot the server, even reinstalling the OS, but the problem still persist!

Related

PHP-FPM unknown caller in gdb backtrace

I'm debugging a segfault in my php app, I compiled php with --enable-debug option and after php-fpm dumped core during the segfault, I run:
$ gdb /usr/local/sbin/php-fpm core
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-alpine-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/sbin/php-fpm...(no debugging symbols found)...done.
[New LWP 2110]
warning: Can't read pathname for load map: No error information.
Core was generated by `php-fpm:'.
Program terminated with signal SIGBUS, Bus error.
#0 0x000055c27ba1f291 in ?? ()
(gdb) bt
#0 0x000055c27ba1f291 in ?? ()
#1 0x000055c27ba21bce in _efree ()
#2 0x000055c27ba6c8b2 in ?? ()
#3 0x000055c27ba70cee in zend_array_destroy ()
#4 0x000055c27ba56fbd in _zval_dtor_func ()
#5 0x000055c27ba6cce4 in ?? ()
#6 0x000055c27ba70cc8 in zend_array_destroy ()
#7 0x000055c27ba56fbd in _zval_dtor_func ()
#8 0x000055c27ba6cce4 in ?? ()
#9 0x000055c27ba70c8a in zend_array_destroy ()
#10 0x000055c27ba56fbd in _zval_dtor_func ()
#11 0x000055c27ba6cce4 in ?? ()
#12 0x000055c27ba70cc8 in zend_array_destroy ()
#13 0x000055c27ba56fbd in _zval_dtor_func ()
#14 0x000055c27ba44b75 in ?? ()
#15 0x000055c27ba450fe in zend_cleanup_user_class_data ()
#16 0x000055c27ba3f473 in ?? ()
#17 0x000055c27ba5971b in zend_deactivate ()
#18 0x000055c27b9bf1df in php_request_shutdown ()
#19 0x000055c27bb55015 in ?? ()
#20 0x00007f7fb743e964 in __libc_start_main () from /lib/ld-musl-x86_64.so.1
#21 0x0000000000000000 in ?? ()
I also put .gdbinit from php sources to the directory with core file and set set auto-load safe-path / to ~/.gdbinit (not sure how it helps though).
As you can see there are ?? in the backtrace which is not helpful at all. Is this how it should be? Is there any way to get the real caller?
Is this how it should be?
No.
Is there any way to get the real caller?
Probably.
Your stack trace indicates that /usr/local/sbin/php-fpm is fully-stripped (has its symbol table removed). You can confirm this with file /usr/local/sbin/php-fpm.
It is not uncommon for make install to fully strip binaries. You should try to use the "as built" binary (instead of "as installed" you are doing now): gdb /path/to/build/tree/php-fpm core.

Why is APCu segfaulting inside a Docker container?

I'm trying to run PHP 5.5 (with FPM) with APCu inside a Docker container. I'm using boot2docker on OSX.
When I try to run php-fpm -i, it segfaults.
Running in gdb, I get the following backtrace:
(gdb) run -i
Starting program: /usr/local/sbin/php-fpm -i
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff542474c in __pthread_rwlock_init (rwlock=rwlock#entry=0xffffffffffffffff, attr=attr#entry=0x7ffff1bda988 <apc_lock_attr>) at pthread_rwlock_init.c:40
40 pthread_rwlock_init.c: No such file or directory.
(gdb) bt
#0 0x00007ffff542474c in __pthread_rwlock_init (rwlock=rwlock#entry=0xffffffffffffffff, attr=attr#entry=0x7ffff1bda988 <apc_lock_attr>) at pthread_rwlock_init.c:40
#1 0x00007ffff19ca9d0 in apc_lock_create (lock=lock#entry=0xffffffffffffffff) at /tmp/pear/temp/apcu/apc_lock.c:180
#2 0x00007ffff19d0135 in apc_sma_api_init (sma=0x7ffff1bda540 <apc_sma>, data=<optimized out>, expunge=<optimized out>, num=<optimized out>, size=<optimized out>, mask=<optimized out>) at /tmp/pear/temp/apcu/apc_sma.c:323
#3 0x00007ffff19ccac9 in zm_startup_apcu (type=0, module_number=35) at /tmp/pear/temp/apcu/php_apc.c:284
#4 0x00000000007198b6 in zend_startup_module_ex ()
#5 0x0000000000725565 in zend_hash_apply ()
#6 0x000000000071d32a in zend_startup_modules ()
#7 0x00000000006b9413 in php_module_startup ()
#8 0x00000000007d9da5 in ?? ()
#9 0x000000000042e684 in ?? ()
#10 0x00007ffff5657b45 in __libc_start_main (main=0x42de80, argc=2, argv=0x7fffffffec08, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffebf8) at libc-start.c:287
#11 0x000000000042f7fa in _start ()
(gdb)
I thought this might be some general problem with phtreads in a Docker container, but I haven't been able to find any reports of that kind of problem.
Some questions:
Is this a known issue (and, so, trying to fix this through configuration is fruitless)?
What is the significance of 40 pthread_rwlock_init.c: No such file or directory.?

PHP extension: segfault on travis

I'm working on a PHP extension that I'm trying to test on travis. Unit tests reveal a segfault that only occur on travis and I can't reproduce it locally no matter what I try.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff1ccc0000
Core was generated by `/home/travis/.phpenv/versions/5.6/bin/php -d output_handler= -d open_basedir= -'.
Program terminated with signal 11, Segmentation fault.
#0 0x000000000095c6b8 in gc_zval_check_possible_root (tsrm_ls=<optimized out>, z=<optimized out>) at /tmp/php-build/source/5.6.3/Zend/zend_gc.h:183
183 /tmp/php-build/source/5.6.3/Zend/zend_gc.h: No such file or directory.
Thread 1 (Thread 0x7f759eae4740 (LWP 12532)):
#0 0x000000000095c6b8 in gc_zval_check_possible_root (tsrm_ls=<optimized out>, z=<optimized out>) at /tmp/php-build/source/5.6.3/Zend/zend_gc.h:183
#1 i_zval_ptr_dtor (tsrm_ls=<optimized out>, zval_ptr=<optimized out>) at /tmp/php-build/source/5.6.3/Zend/zend_execute.h:86
#2 zend_do_fcall_common_helper_SPEC (execute_data=<optimized out>, tsrm_ls=0x32fee10) at /tmp/php-build/source/5.6.3/Zend/zend_vm_execute.h:564
#3 0x000000000092194b in execute_ex (execute_data=0x7f759eaa5100, tsrm_ls=0x32fee10) at /tmp/php-build/source/5.6.3/Zend/zend_vm_execute.h:363
#4 0x00000000008b1098 in zend_execute_scripts (type=8, tsrm_ls=0x32fee10, retval=0x0, file_count=3) at /tmp/php-build/source/5.6.3/Zend/zend.c:1344
#5 0x000000000083e404 in php_execute_script (primary_file=0x7fff1cc7ff70, tsrm_ls=0x32fee10) at /tmp/php-build/source/5.6.3/main/main.c:2584
#6 0x0000000000960467 in do_cli (argc=63, argv=0x32fe2f0, tsrm_ls=0x32fee10) at /tmp/php-build/source/5.6.3/sapi/cli/php_cli.c:994
#7 0x000000000044a960 in main (argc=63, argv=0x32fe2f0) at /tmp/php-build/source/5.6.3/sapi/cli/php_cli.c:1378
I really don't know what can cause it, since I can't reproduce.

PHP 5.5 segmentation fault (Zend/zend_vm_execute.h: No such file or directory)

When running a Yii ConsoleCommand in PHP 5.5.9 (Ubuntu 14.04) I get a segmentation fault.
root#prod05:/var/www/www.dummy.com/current# ./yiic cmd createdevcopy
START DB DEV DUMP CREATION
Segmentation fault (core dumped)
dbg output of the core:
root#prod05:/var/www/www.dummy.com/current# gdb php core
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from php...Reading symbols from /usr/lib/debug//usr/bin/php5...done.
done.
warning: core file may not match specified executable file.
[New LWP 18309]
warning: .dynamic section for "/usr/lib/php5/20121212/newrelic.so" is not at the expected address (wrong library or version mismatch?)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysql.so" does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).
warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysql.so" does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).
warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysqli.so" does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).
warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysqli.so" does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).
warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/pdo_mysql.so" does not match "/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).
warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/pdo_mysql.so" does not match "/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).
Core was generated by `php ./yiic cmd createdevcopy'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000000717446 in execute_ex (execute_data=0x1f38808) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
363 /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h: No such file or directory.
(gdb) quit
php modules loaded:
bcmath bz2 calendar Core ctype curl date dba dom ereg exif fileinfo filter ftp gd geoip gettext hash iconv imagick json libxml mbstring memcache memcached mhash mongo mysql mysqli OAuth openssl pcntl pcre PDO pdo_mysql Phar posix readline Reflection session shmop SimpleXML soap sockets solr SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter Zend OPcache zip
For what it's worth, the segfault occurs right after successfully issuing an API call to AWS.
the backtrace output:
#0 0x0000000000717446 in execute_ex (execute_data=0x1f38808) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#1 0x00000000006dd5b9 in dtrace_execute_ex (execute_data=<optimised out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#2 0x000000000079dd60 in zend_do_fcall_common_helper_SPEC (execute_data=0x1f38680) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
#3 0x0000000000717448 in execute_ex (execute_data=0x1f38680) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#4 0x00000000006dd5b9 in dtrace_execute_ex (execute_data=<optimised out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#5 0x00000000006df8f1 in zend_call_function (fci=fci#entry=0x7fff1d9773f0, fci_cache=<optimised out>, fci_cache#entry=0x7fff1d9773c0) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_execute_API.c:939
#6 0x0000000000704895 in zend_call_method (object_pp=object_pp#entry=0x7fff1d977498, obj_ce=<optimised out>, obj_ce#entry=0x7ff8a1a63940, fn_proxy=fn_proxy#entry=0x7ff8a1a63aa8,
function_name=function_name#entry=0xb38308 "__tostring", function_name_len=function_name_len#entry=10, retval_ptr_ptr=retval_ptr_ptr#entry=0x7fff1d9774a8, param_count=param_count#entry=0, arg1=arg1#entry=0x0,
arg2=arg2#entry=0x0) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_interfaces.c:97
#7 0x0000000000710993 in zend_std_cast_object_tostring (readobj=0x7ff8a1aa50b8, writeobj=0x7fff1d977530, type=type#entry=6) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_object_handlers.c:1533
#8 0x00000000006ee6c2 in zend_make_printable_zval (expr=expr#entry=0x7ff8a1aa50b8, expr_copy=expr_copy#entry=0x7fff1d977530, use_copy=use_copy#entry=0x7fff1d97752c) at /build/buildd/php5-5.5.9+dfsg/Zend/zend.c:258
#9 0x000000000075092a in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x1f38578) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:30830
Thoughts?

SocketException Permission denied - CakePHP 2.3

I receive that error when try send e-mail with CakePHP 2.3.0.
My Cloud configuration is:
PHP 5.4
Apache 2.2
MySQL 5.5
CakePHP 2.3.0
Sorry about my english.
2013-03-06 09:15:05 Error: [SocketException] Permission denied
Request URL: /notifications/sendContact
Stack Trace:
#0 /var/www/html/site/lib/Cake/Network/Email/SmtpTransport.php(96): CakeSocket->connect()
#1 /var/www/html/site/lib/Cake/Network/Email/SmtpTransport.php(60): SmtpTransport->_connect()
#2 /var/www/html/site/lib/Cake/Network/Email/CakeEmail.php(1065): SmtpTransport->send(Object(CakeEmail))
#3 /var/www/html/site/app/Controller/NotificationsController.php(41): CakeEmail->send()
#4 [internal function]: NotificationsController->sendContact()
#5 /var/www/html/site/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(NotificationsController), Array)
#6 /var/www/html/site/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
#7 /var/www/html/site/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(NotificationsController), Object(CakeRequest), Object(CakeResponse))
#8 /var/www/html/site/app/webroot/index.php(102): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#9 {main}
2013-03-06 09:15:05 Error: Fatal Error (256): [CakeException] Unknown status code
#0 /var/www/html/site/lib/Cake/Error/ExceptionRenderer.php(212): CakeResponse->statusCode(13)
#1 [internal function]: ExceptionRenderer->error400(Object(SocketException))
#2 /var/www/html/site/lib/Cake/Error/ExceptionRenderer.php(175): call_user_func_array(Array, Array)
#3 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(122): ExceptionRenderer->render()
#4 [internal function]: ErrorHandler::handleException(Object(SocketException))
#5 {main} in [/var/www/html/site/lib/Cake/Error/ErrorHandler.php, line 131]
2013-03-06 09:15:05 Error: [InternalErrorException] Internal Server Error
Request URL: /notifications/sendContact
Stack Trace:
#0 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(183): ErrorHandler::handleFatalError(256, '[CakeException]...', '/var/www/html/p...', 131)
#1 [internal function]: ErrorHandler::handleError(256, '[CakeException]...', '/var/www/html/p...', 131, Array)
#2 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(131): trigger_error('[CakeException]...', 256)
#3 [internal function]: ErrorHandler::handleException(Object(SocketException))
#4 {main}
2013-03-06 09:15:05 Error: Fatal Error (256): [CakeException] Unknown status code
#0 /var/www/html/site/lib/Cake/Error/ExceptionRenderer.php(212): CakeResponse->statusCode(13)
#1 [internal function]: ExceptionRenderer->error400(Object(SocketException))
#2 /var/www/html/site/lib/Cake/Error/ExceptionRenderer.php(175): call_user_func_array(Array, Array)
#3 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(122): ExceptionRenderer->render()
#4 [internal function]: ErrorHandler::handleException(Object(SocketException))
#5 {main} in [/var/www/html/site/lib/Cake/Error/ErrorHandler.php, line 131]
2013-03-06 09:15:05 Error: [InternalErrorException] Internal Server Error
Request URL: /notifications/sendContact
Stack Trace:
#0 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(183): ErrorHandler::handleFatalError(256, '[CakeException]...', '/var/www/html/p...', 131)
#1 [internal function]: ErrorHandler::handleError(256, '[CakeException]...', '/var/www/html/p...', 131, Array)
#2 /var/www/html/site/lib/Cake/Core/App.php(926): call_user_func('ErrorHandler::h...', 256, '[CakeException]...', '/var/www/html/p...', 131, Array)
#3 /var/www/html/site/lib/Cake/Core/App.php(899): App::_checkFatalError()
#4 [internal function]: App::shutdown()
#5 {main}
email.php
public $gmail = array(
'transport' => 'Smtp',
'from' => array('patric.....#gmail.com' => 'Patrick Maciel'),
'port'=>'465',
'timeout'=>'30',
'auth' => true,
'host' => 'ssl://smtp.gmail.com',
'username'=>'patrick......#gmail.com',
'password'=>'.......',
'client' => null,
'log' => false
);
php info (centOs)
-bash-4.1# yum info php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.globo.com
* epel: mirror.globo.com
* extras: mirror.globo.com
* updates: mirror.globo.com
Installed Packages
Name : php
Arch : i686
Version : 5.4.12
Release : 1.el6.remi
Size : 8.2 M
Repo : installed
From repo : remi
Summary : PHP scripting language for creating dynamic web sites
URL : http://www.php.net/
License : PHP and Zend and BSD
Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
: easy for developers to write dynamically generated web pages. PHP also
: offers built-in database integration for several commercial and
: non-commercial database management systems, so writing a
: database-enabled webpage with PHP is fairly simple. The most common
: use of PHP coding is probably as a replacement for CGI scripts.
:
: The php package contains the module which adds support for the PHP
: language to Apache HTTP Server.
Available Packages
Name : php
Arch : i386
Version : 5.3.22
Release : 1.w5
Size : 1.3 M
Repo : webtatic
Summary : PHP scripting language for creating dynamic web sites
URL : http://www.php.net/
License : PHP
Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
: easy for developers to write dynamically generated web pages. PHP also
: offers built-in database integration for several commercial and
: non-commercial database management systems, so writing a
: database-enabled webpage with PHP is fairly simple. The most common
: use of PHP coding is probably as a replacement for CGI scripts.
:
: The php package contains the module which adds support for the PHP
: language to Apache HTTP Server.
-bash-4.1# php -m
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
libxml
mbstring
mcrypt
memcache
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
pspell
readline
recode
Reflection
session
shmop
SimpleXML
snmp
sockets
SPL
sqlite3
standard
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib
[Zend Modules]
-bash-4.1#
Apparently your PHP is not allowed to connect to the specified SMTP server. Did you properly configure your email-settings? (SMTP server, port, username, password etc).
A template for these settings is included with CakePHP in the file: app/Config/email.php.default (https://github.com/cakephp/cakephp/blob/2.2.7/app/Config/email.php.default)
You need to copy this file to app/Config/email.php and modify the settings for your environment.
After that, you'll have to specify the right configuration when sending emails
A more thorough explanation can be found in the manual:
http://book.cakephp.org/2.0/en/core-utility-libraries/email.html#configuration
update
Another option is that SELinux security-bits dissallow PHP/Apache to make network connections.
There are several security-bits, but this seems a likely candidate: httpd_can_network_connect .
You can temporarily allow PHP/Apache to make network connections using this:
setsebool httpd_can_network_connect
And make the setting 'permanent' using the -P parameter;
setsebool -P httpd_can_network_connect
For an overview of all SELibux booleans;
http://wiki.centos.org/TipsAndTricks/SelinuxBooleans
getsebool -a
Check httpd_can_network_connect
if off, set it to on
setsebool -P httpd_can_network_connect on
It works for me !!

Categories