|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67654 socket_listen() with exec() problem
Submitted: 2014-07-19 20:43 UTC Modified: 2014-08-04 19:36 UTC
From: root at mit dot sh Assigned:
Status: Duplicate Package: Sockets related
PHP Version: 5.5.14 OS: Centos 6.5 x64
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: root at mit dot sh
New email:
PHP Version: OS:


 [2014-07-19 20:43 UTC] root at mit dot sh
you can run test script on every php but if you need some specifications, here is my php compile parameters;
./configure --with-libdir=lib64 --with-freetype-dir=/usr/include/freetype2 --enable-zip --enable-sockets --enable-pcntl --enable-ftp --enable-mbstring --enable-shmop --enable-fpm --enable-cli --disable-phar --with-mysql --with-gd --with-t1lib --with-openssl --with-zlib --with-curl --with-bz2 --with-pdo-mysql --with-xmlrpc --with-mcrypt --with-ssh2 --enable-soap --enable-intl --without-pear

Test script:

$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);

socket_bind($sock, '', 1432);

exec('service httpd restart');


Expected result:
when php is done, port 1432 will be close and no proccess should listen port 1432.

Actual result:
when code run is finish, php is not listenning port 1432, but httpd is listennig port 1432.

if you add "sudo" before the command, its working correctly and no proccess is listenning port 1432.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-08-04 19:36 UTC]
-Status: Open +Status: Duplicate
 [2014-08-04 19:36 UTC]
This is a duplicate of bug #67383 (Which contains a patch that should be merged by someone!)
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Mar 21 18:03:39 2023 UTC