Bug #74762 [Nab]: ftp_connect makes php break with RID error

From: Date: Tue, 27 Jun 2017 04:46:20 +0000
Subject: Bug #74762 [Nab]: ftp_connect makes php break with RID error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209697@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74762&edit=1

 ID:                 74762
 User updated by:    jmichae35 at gmail dot com
 Reported by:        jmichae35 at gmail dot com
 Summary:            ftp_connect makes php break with RID error
 Status:             Not a bug
 Type:               Bug
 Package:            FTP related
 Operating System:   windows 7 x64
 PHP Version:        7.1.6
 Block user comment: N
 Private report:     N

 New Comment:

winkle burgers


Previous Comments:
------------------------------------------------------------------------
[2017-06-20 22:57:06] spam2 at rhsoft dot net

"PHP Parse error:  syntax error, unexpected 'RID' (T_STRING), expecting ','
or ';' in ... on line ..." is clearly a parse error

you 3 options:

* prove with "php -l /path/to/file.php" that it has no error
* publish your file
* leave the world in peace with things only you are able to see

"why is die required and not optional?" - no clue what you are talking about

------------------------------------------------------------------------
[2017-06-20 22:38:31] jmichae35 at gmail dot com

this line of code came out of my large script. that's where the line number comes from. I
cannot include the rest of my script because it is commercial code.
I tried the example from the documentation (the 1st sample) the documentation got updated since
then. 

then I made it work like it's supposed to work today, with a newly required die statement.

why is die required and not optional?

if you take out the die statement, it throws a RID error statement in the same format as my 1st
error I showed you.
"PHP Parse error:  syntax error, unexpected 'RID' (T_STRING), expecting ','
or ';' in ... on line ..."

my server doesn't take normal ftp either.


I am sorry for getting angry. I know that dealing with bugs all day long can really get to a guy,
and you start to need a refreshing time.

------------------------------------------------------------------------
[2017-06-20 22:05:19] jmichae35 at gmail dot com

having fun blasting at this bug? use your head and enable and try an ftp_connect. see if it returns
something that can be stored in a variable or whether it breaks all over.

I refuse your curses.

------------------------------------------------------------------------
[2017-06-18 06:17:02] spam2 at rhsoft dot net

Damned your script has a syntax error somewhere around line 361 and nobody but you comes to the idea
file a parse error as bug for whatever php function

------------------------------------------------------------------------
[2017-06-18 02:37:03] jmichae35 at gmail dot com

<?php 
$server="somewhere.com";
$port=21;
$conn_id = ftp_connect($server,$port) or die("ERROR: ftp_connect() could not get FTP
connection! \r\n");?>

I was surprised you took out the time to nail me for not including <?php tags ?> instead of
trying the script. it's easy to use. try your own FTP server.
 

did you know the die statement is absolutely required now and I can't just compare
$conn_id===false later for validity check?

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


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

    https://bugs.php.net/bug.php?id=74762


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


Thread (11 messages)

« previous php.bugs (#209697) next »