Bug #46531 [NoF->ReO]: ftp_put returns error on Accepted data connection

2010-07-08 Thread didou
Edit report at http://bugs.php.net/bug.php?id=46531&edit=1

 ID:   46531
 Updated by:   di...@php.net
 Reported by:  jmichae3 at yahoo dot com
 Summary:  ftp_put returns error on Accepted data connection
-Status:   No Feedback
+Status:   Re-Opened
 Type: Bug
 Package:  FTP related
-Operating System: XP Pro SP3
+Operating System: All
 PHP Version:  5.2.6

 New Comment:

This bug is still encountered today and there's definitely a problem
with ext/ftp 

on this point. 



Using this class for example works completely fine : 

http://www.spencernetwork.org/ftp/ftp-class.txt



I suspect that when a certain amount of transfered data is reached, over
one or 

more STOR commands, the upload socket goes wrong.


Previous Comments:

[2009-02-01 10:03:34] info at vuk dot bg dot it

Environment



PHP Version 5.2.4-2ubuntu5.3

Apache 2.0



Application: zip files http upload, decompression on webserver, ftp
directory creation and files ftp transfer to remote ftp server;

Situation: a zip file with 2 directories within, each containig one
file;



Reproduce Code

--

if(!ftp_put($this->conn_id,$target,$tmp_file_name,$ftp_mode)){

//set debug information

}



$ftp_mode is 2



Actual Result

-

The two files have been transfered correctly but the second operation
gave this error:Warning: ftp_put() [function.ftp-put]: Accepted data
connection


[2008-11-18 01:00:02] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


[2008-11-11 06:49:50] jmichae3 at yahoo dot com

I will not be able to reproduce this bug until something on the network
goes nuts again.  



in my case, it was my cable modem configuration combined with an ISP
network upgrade.  after persistently trying to get an internet
connection again (and many calls to tech support), I did.  



All is well now with my connection so I can't test the Accepted data
connection error, but I did test mkdir and it appears to be working.



//ftp mkdir test

function mk($conn_id) {

echo "chdir\n";

if (!ftp_chdir($conn_id, "/public_html/")) {

echo "chdir failed\n";

return;

}

echo "mkdir test\n";

if (!ftp_mkdir($conn_id, "/public_html/test")) {

echo "mkdir failed\n";

return;

}

echo "chdir test\n";

if (!ftp_chdir($conn_id, "/public_html/test")) {

echo "chdir failed\n";

return;

}

}

// set up basic connection

$conn_id = ftp_connect($host);

// login with username and password

$login_result = ftp_login($conn_id, $uid, $pwd);

// check connection

if ((!$conn_id) || (!$login_result)) {

echo "FTP connection has failed!\n";

echo "Attempted to connect to $host for user $uid\n";

exit;

} else {

echo "Connected to $host, for user $uid\n";

}

ftp_pasv($conn_id, true);

mk($conn_id);

// close the FTP stream

ftp_close($conn_id);


[2008-11-10 11:24:25] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




[2008-11-10 06:20:28] jmichae3 at yahoo dot com

Description:

PHP Warning:  ftp_put(): Accepted data connection in
C:\www\jimm\ftp6.php on line 122



is this really an error state for ftp_put?  I would think it would be a
success!  PHP is returning an error on this.

I think this is a bug.





Reproduce code:
---
if (ftp_put($conn_id, basename($dest_file), $src_file, FTP_BINARY)) {

 echo "success\n";

} else {

 echo "error\n";

}

Expected result:

success

Actual result:
--
the server I am working with is having problems.  lately it is really
slow, and I get about 6 successful files uploaded, and the rest (about
450+ files) are 

PHP Warning:  ftp_put(): Accepted data connection in
C:\www\jimm\ftp6.php on line 122

error



also, subsequent attempts at a ftp_mkdir also fail.






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


#44581 [Opn->Fbk]: SoapClient-error with Document-Style WSDL

2008-07-29 Thread didou
 ID:   44581
 Updated by:   [EMAIL PROTECTED]
 Reported By:  storozhilov at mail dot ru
-Status:   Open
+Status:   Feedback
 Bug Type: SOAP related
 Operating System: FreeBSD 7.0-RELEASE #2
 PHP Version:  5.2.5
 New Comment:

Can't seem to access resources from http://soap.tver.pregrad.net/.
Please make them available somewhere.

Also, include a meaningful debuging information, like the XML request
sent:

$client = new SoapClient("isale.wsdl", array('trace' => true));
try {
$uuid = $client->initUserSession(1, 'user', 'password');
} catch (Exception $e) {
echo $client->__getLastRequest();
}




Previous Comments:


[2008-03-31 14:28:40] storozhilov at mail dot ru

Description:

It's recommended to use Document-style WSDL, so we've made our
SOAP-server, that publish WSDL-document of this style. Unfortunately,
PHP SOAP-module works fine with RPC-style, but makes a error with the
same, but Document-style WSDL. Our SOAP-server, written using gSOAP
works fine with gSOAP-based clients, but can't serve PHP ones.

Reproduce code:
---
1. WSDL is here: http://pregrad.net/temp/isale.wsdl

2. PHP code is:

initUserSession(1, 'user', 'password');

?>




Expected result:

without errors

Actual result:
--
PHP Fatal error:  Uncaught SoapFault exception: [SOAP-ENV:Client]
Method 'parameters' not implemented: method name or namespace not
recognized in
/usr/home/illy/Programming/SOAP/PHP/document_style_wsdl/run_me.php:5
Stack trace:
#0 [internal function]: SoapClient->__call('initUserSession', Array)
#1
/usr/home/illy/Programming/SOAP/PHP/document_style_wsdl/run_me.php(5):
SoapClient->initUserSession(1, 'user', 'password')
#2 {main}
  thrown in
/usr/home/illy/Programming/SOAP/PHP/document_style_wsdl/run_me.php on
line 5






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



#40218 [Com]: Add Else clause to while

2007-01-24 Thread didou at keliglia dot com
 ID:   40218
 Comment by:   didou at keliglia dot com
 Reported By:  jbailey at raspberryginger dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  5.2.0
 New Comment:

I like the idea, but using the "else" keyword would break a lot of apps
using something like this:

if (X)
  while (foo) {

  }
else
  no X

whileelse ?


Previous Comments:


[2007-01-24 14:31:11] jbailey at raspberryginger dot com

Grr..  This bug tracking system ate my comment.  So here's a much
shorter version of what I wrote:

Use cases:

Retrieving from a database (especially since PDO doesn't have a numrows
options):

while ($foo = $db->sql_fetchrow($result)) {
// Do something
} else {
// No rows found
}

This could also be useful for ArrayObjects and foreach:

$i = $myArray->getIterator();

foreach ($i as $item) {
// Do something
} else {
// Empty array
}



[2007-01-24 14:18:57] jbailey at raspberryginger dot com

Description:

Right now checks have to be done separately for when a while will
execute zero times, which means code duplication and constructs that
have to be kept in sync.  I would like to see an else clause to while
that is executed when the while loop goes zero times.

Reproduce code:
---
while (0) {
  echo "I ran";
} else {
  echo "I didn't run.";
}



Expected result:

I didn't run.


Actual result:
--
Parse error: syntax error, unexpected T_ELSE in /tmp/test.php on line
5






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


#32120 [Csd->Bgs]: xml feature

2005-04-12 Thread didou
 ID:   32120
 Updated by:   [EMAIL PROTECTED]
 Reported By:  johnnygroeneveld at chello dot nl
-Status:   Closed
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: n.v.t.
 PHP Version:  Irrelevant
 New Comment:

not a bug ? => Bogus


Previous Comments:


[2005-03-05 16:04:57] johnnygroeneveld at chello dot nl

found the XsltProcessor->registerPhpFunctions()
which enables me to do this in another way



[2005-02-26 10:57:13] johnnygroeneveld at chello dot nl

Description:

I was thinking.
when I want to parse PHP i have to use 
in XML this is reserved.

would become:
');
?>
wouldn't it be handy to have the print('hello');
or something like that.
the header could automatically be set to text/xml.
Maybe that there is already something like this what i haven't heard
of.
and hello{$variable} instead of http://bugs.php.net/?id=32120&edit=1


#31754 [Ver->Csd]: dbase_open() fails for mode = 1

2005-02-04 Thread didou
 ID:   31754
 Updated by:   [EMAIL PROTECTED]
 Reported By:  didou at keliglia dot com
-Status:   Verified
+Status:   Closed
 Bug Type: dBase related
 Operating System: *
 PHP Version:  4CVS, 5CVS (2005-02-01)
 New Comment:

Fixed :)


Previous Comments:


[2005-02-03 19:17:33] [EMAIL PROTECTED]

Here's a patch following Derick's suggestion. It triggers a warning and
return false.

http://didou.keliglia.com/patches/php-src/dbase/dbase.c.diff.txt

(test file included
http://didou.keliglia.com/patches/php-src/dbase/tests/)



[2005-01-29 21:41:21] didou at keliglia dot com

Description:

When opening a dbf file using dbase_open($file, 1), the call fails
because it can't reads the header infos.

We can only open dbase files in read-only or read-write mode. Either
it's an implementation or a documentation one.

If it's the intended behaviour, can you make it throw a warning more
explicit ?

Thanks in advance,

didou

Reproduce code:
---


Expected result:

bool(true)

Actual result:
--
Unable to get header

Warning: unable to open database db.dbf in /home/didou/plop.php on line
11
bool(false)





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


#31754 [Ver]: dbase_open() fails for mode = 1

2005-02-03 Thread didou
 ID:   31754
 Updated by:   [EMAIL PROTECTED]
 Reported By:  didou at keliglia dot com
 Status:   Verified
 Bug Type: dBase related
 Operating System: *
 PHP Version:  4CVS, 5CVS (2005-02-01)
 New Comment:

Here's a patch following Derick's suggestion. It triggers a warning and
return false.

http://didou.keliglia.com/patches/php-src/dbase/dbase.c.diff.txt

(test file included
http://didou.keliglia.com/patches/php-src/dbase/tests/)


Previous Comments:


[2005-01-29 21:41:21] didou at keliglia dot com

Description:

When opening a dbf file using dbase_open($file, 1), the call fails
because it can't reads the header infos.

We can only open dbase files in read-only or read-write mode. Either
it's an implementation or a documentation one.

If it's the intended behaviour, can you make it throw a warning more
explicit ?

Thanks in advance,

didou

Reproduce code:
---


Expected result:

bool(true)

Actual result:
--
Unable to get header

Warning: unable to open database db.dbf in /home/didou/plop.php on line
11
bool(false)





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


#31754 [NEW]: dbase_open() fails for mode = 1

2005-01-29 Thread didou at keliglia dot com
From: didou at keliglia dot com
Operating system: Linux/debian
PHP version:  4.3.10
PHP Bug Type: dBase related
Bug description:  dbase_open() fails for mode = 1

Description:

When opening a dbf file using dbase_open($file, 1), the call fails because
it can't reads the header infos.

We can only open dbase files in read-only or read-write mode. Either it's
an implementation or a documentation one.

If it's the intended behaviour, can you make it throw a warning more
explicit ?

Thanks in advance,

didou

Reproduce code:
---


Expected result:

bool(true)

Actual result:
--
Unable to get header

Warning: unable to open database db.dbf in /home/didou/plop.php on line
11
bool(false)

-- 
Edit bug report at http://bugs.php.net/?id=31754&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31754&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31754&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31754&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=31754&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=31754&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=31754&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=31754&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=31754&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31754&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=31754&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=31754&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=31754&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=31754&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31754&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=31754&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=31754&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31754&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31754&r=float
No Zend Extensions:  http://bugs.php.net/fix.php?id=31754&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31754&r=mysqlcfg


#27406 [Com]: php_check_syntax executes code

2004-09-16 Thread didou at keliglia dot com
 ID:   27406
 Comment by:   didou at keliglia dot com
 Reported By:  thomas at stauntons dot org
 Status:   Assigned
 Bug Type: Unknown/Other Function
 Operating System: OS X
 PHP Version:  5.0.2-dev
 Assigned To:  iliaa
 New Comment:

"So should this function actually execute the code (like an include())
or
should it be a simple lint check (identical to php -l)"

It should do only a lint check, otherway we don't need this function as
we already have include..

Anyway, we should really change the docs philip.


Previous Comments:


[2004-08-26 18:20:05] [EMAIL PROTECTED]

Tested latest CVS on a Win32 machine, same problem.  Here's a very
simple test:

randominclude.php


checksyntax.php


Calling checksyntax.php via Module/CLI/CGI results in:

passedHI

As opposed to:

passed
Fatal error: Call to undefined function foobar() in ...




[2004-08-09 05:10:33] [EMAIL PROTECTED]

So should this function actually execute the code (like an include())
or should it be a simple lint check (identical to php -l).  The doc
team assumed the later.  Please advise with specific information on how
this should be documented or if this is indeed a bug, say so.

http://cvs.php.net/co.php/phpdoc/en/reference/misc/functions/php-check-syntax.xml




[2004-08-08 18:59:20] phpbug at bigredspark dot com

Bogus? Could someone document this function so we know what the
"proper" usage is? Is this funtion meant to load the file into the
current scope as it's syntax is checked? If so, please say so in the
documentation. Otherwise, I have another bug report to file.

original.php
foo();
?>

checkme.php


results in

checkme::foo
checkme::bar::foo

for example, when my assumption of how the function works should have
the code results in undefined function and class errors.



[2004-04-13 13:12:03] [EMAIL PROTECTED]

Don't misuse the function.




[2004-02-26 15:18:57] [EMAIL PROTECTED]

Ilia, maybe this function wasn't such a good idea after all?
Here's the first misuse of it already..




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27406

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


#26162 [Opn->Bgs]: $a="0abcdefg";if ($a==0) echo "OK"; result is "OK" ?!

2003-11-07 Thread didou
 ID:   26162
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zhuminglun at yahoo dot com dot cn
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: linux/win2000
 PHP Version:  4.3.4
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

use === to compare


Previous Comments:


[2003-11-07 06:35:44] zhuminglun at yahoo dot com dot cn

Description:

$a="0abcdefg";
if ($a==0) echo "OK"; 

result is "OK" ?!

Reproduce code:
---
$a="0abcdefg";
if ($a==0) echo "OK"; 

Expected result:

Nothing output






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


#26131 [Opn->Bgs]: the crypt function have no MD5 support

2003-11-05 Thread didou
 ID:   26131
 Updated by:   [EMAIL PROTECTED]
 Reported By:  yoda at cef dot org dot tw
-Status:   Open
+Status:   Bogus
 Bug Type: *Compile Issues
 Operating System: RedHat Linux 9.0
 PHP Version:  4.3.4
 New Comment:

So it's bogus :)


Previous Comments:


[2003-11-05 04:58:25] yoda at cef dot org dot tw

Sorry  It's my fault.
I forgot set some path in /etc/ld.so.conf.



[2003-11-05 02:04:15] yoda at cef dot org dot tw

Description:

When I download PHP 4.3.4 and running configure, I found that the crypt
function has no crypt method support .
Below is my configure options
./configure --with-apxs2 --with-layout=PHP
--with-config-file-path=/etc/httpd --enable-sigchild
--enable-magic-quotes --with-openssl --enable-ftp --enable-mbstring
--enable-mbregex --enable-mime-magic --with-pgsql=/usr/local/pgsql 
-enable-sysvsem --enable-sysvshm --with-iconv --enable-zend-multibyte
--without-mysql --with-gd --with-ttf --with-freetype-dir --with-zlib
--with-jpeg-dir --with-png-dir --with-iconv --with-mbstring=tw
--with-pdflib --with-tiff-dir=/usr --with-jpeg-dir=/usr
--with-png-dir=/usr --with-zlib-dir=/usr --without-xpm
--enable-zend-multibyte --enable-experimental-zts --without-kerberos

under this configure optoins, I get such test result:
checking for crypt in -lcrypt... yes
checking for standard DES crypt... no
checking for extended DES crypt... no
checking for MD5 crypt... no
checking for Blowfish crypt... no

It's strange ! I have crypt function but no crypt method avalible !
Even the standard DES crypt !
BTW, these options in PHP 4.3.3 is work !
In PHP 4.3.3 I got this:
checking for crypt in -lcrypt... (cached) yes
checking for standard DES crypt... (cached) yes
checking for extended DES crypt... (cached) no
checking for MD5 crypt... (cached) yes
checking for Blowfish crypt... (cached) no

So  what's the problem ?






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


#25700 [Bgs]: PCRE_ANCHORED doesn't work

2003-09-30 Thread didou
 ID:   25700
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at bouchery dot com
 Status:   Bogus
 Bug Type: PCRE related
 Operating System: all
 PHP Version:  Irrelevant
 New Comment:

The french translation have been fixed in CVS, no need to open a new
bug. sorry for the time wasted...

http://cvs.php.net/diff.php/phpdoc-fr/reference/pcre/functions/pcre.pattern.modifiers.xml?login=2&r1=1.2&r2=1.3&ty=u

didou


Previous Comments:


[2003-09-30 10:05:25] php at bouchery dot com

Sorry, it's a mistake in the french documentation !
"it is constrained to match between the start to the end of the
string"

Thus, it's a bug in the documentation's translation.



[2003-09-30 08:44:01] [EMAIL PROTECTED]

You misunderstood:

echo preg_replace("/[a-z]{4}/A", "foo", "1fred24");
-> 1fred24
echo preg_replace("/[a-z]{4}/A", "foo", "fred24");
-> foo24

echo preg_replace("/[a-z]{4}/", "foo", "fred24");
-> foo24
echo preg_replace("/[a-z]{4}/", "foo", "1fred24");
-> 1foo24

See also this:

http://www.php.net/manual/en/pcre.pattern.modifiers.php
(the section about A (PCRE_ANCHORED))




[2003-09-30 07:02:17] php at bouchery dot com

In fact, "A" option is equal to "^" + patern.
If I don't misunderstand, "A" option should be equal to "^" + patern +
"$"



[2003-09-30 05:03:48] php at bouchery dot com

Description:

PCRE_ANCHORED option dosn't work

Reproduce code:
---
 

Expected result:

option "A" must return "ko"

Actual result:
--
Return "ok" and it's wrong





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


#25688 [Csd->Bgs]: Connect To Oracle 9i using IIS & PHP

2003-09-30 Thread didou
 ID:   25688
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ramez at faraah dot com dot sa
-Status:   Closed
+Status:   Bogus
 Bug Type: OCI8 related
 Operating System: Win XP
 PHP Version:  4.3.3
 New Comment:

Please leave this bug bogus.


Previous Comments:


[2003-09-30 05:25:45] ramez at faraah dot com dot sa

i found the solution
 i should write the Service name In The Connection Function
==
$c1 = ocilogon("scott","tiger","RamezDB") or print("Could not
connet to
Oracle9i");
==
thanks for your help



[2003-09-29 08:29:23] [EMAIL PROTECTED]

And try searching for ORA-12560 with Google for example..




[2003-09-29 08:25:05] ramez at faraah dot com dot sa

Description:

Hello I am using Oracle9i release 2
it's comes with Apache
but i am using IIS and i don't want to use Apache.

how can i connect to Oracle DB from the IIS using PHP
i try to use 
=
user:scott
Password:tiger
Service:RamezDB
=
how can i do ti

Reproduce code:
---


Using PHP to Read a Table in Oracle


Employees

Could not connet to
Oracle9i");

$stmt = ociparse($c1," select * from emp");
  ociexecute($stmt,OCI_DEFAULT);
  echo $c1."selecting\n\n";
  while (ocifetch($stmt))
echo $c1." <".ociresult($stmt,"TEST").">\n\n";
  echo $c1."done\n\n";

Expected result:

to reterive the data from Oracle9i

Actual result:
--
Warning: _oci_open_server: ORA-12560: TNS:protocol adapter error in
c:\inetpub\wwwroot\oracle\test.php on line 10

Could not connet to Oracle9i

Warning: ociparse(): supplied argument is not a valid OCI8-Connection
resource in c:\inetpub\wwwroot\oracle\test.php on line 13

Warning: ociexecute(): supplied argument is not a valid OCI8-Statement
resource in c:\inetpub\wwwroot\oracle\test.php on line 14
selecting 
Warning: ocifetch(): supplied argument is not a valid OCI8-Statement
resource in c:\inetpub\wwwroot\oracle\test.php on line 16
done 





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