ID:               44360
 User updated by:  upandhigh at gmail dot com
 Reported By:      upandhigh at gmail dot com
-Status:           Open
+Status:           Closed
 Bug Type:         FTP related
 Operating System: Fedora Core 6/8
 PHP Version:      5.2.5
 New Comment:

situation was affected by incorrect OS settings. not PHP problem.
ticket closed.


Previous Comments:
------------------------------------------------------------------------

[2008-03-07 09:13:51] upandhigh at gmail dot com

Description:
------------
When you trying to use FTP connections from different PHP scripts, the
new created connection from one THREAD or FILE running - breaks another
connection what was made from other THREAD or FILE. 

Reproduce code:
---------------
if ($pid = pcntl_fork())
{
  $my_pid = getmypid();
  print $pid." - ".$my_pid."\n";
  $a = ftp_connect("ftp.debian.com", 21, 5);
  echo $a;
  sleep(10);
}
else
{
  $my_pid = getmypid();
  $b = ftp_connect("ftp.kernel.org", 21, 5);
  echo $b;
  sleep(10);
}

Expected result:
----------------
This code will return Resource Id#4 for all threads. So if we will
download or upload files with $b - connection ID it will be stopped when
another thread will be started, with $a - connection ID. It happens when
code started from different CLI FILES, or from FORKED processes of one
source file.

Actual result:
--------------
Well I just wanted to have several FTP connections from one server -
but seems it's impossible, because each new connection - breaks previous
one what was made from other script.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44360&edit=1

Reply via email to