|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71847 Http 500 Error on ftp_connect
Submitted: 2016-03-17 17:28 UTC Modified: 2016-03-17 19:43 UTC
From: jherrera72 at gmail dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 7.0.4 OS: Windows 10
Private report: No CVE-ID: None
 [2016-03-17 17:28 UTC] jherrera72 at gmail dot com
From manual page:

Test script:
$ftp_server = "";

// set up a connection or die
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); 

Actual result:
The website cannot display the page
  HTTP 500 
Most likely causes:
•The website is under maintenance.
•The website has a programming error.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-03-17 17:40 UTC]
-Status: Open +Status: Not a bug
 [2016-03-17 17:40 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Check your server error logs.
 [2016-03-17 17:42 UTC] jherrera72 at gmail dot com
-Status: Not a bug +Status: Open
 [2016-03-17 17:42 UTC] jherrera72 at gmail dot com
I should receive this message: "Couldn't connect to"
instead, I get the 500 Error.

The computer that I am using is the main testing computer from our company, we have a SaaS software and we are changing from 5.6.16 to 7.0.4 and we get this error from out tried and tested script. I am using the simplest code example to reproduce the error. I also used x64 and x86 versions of PHP and get the same error. When I switch to 5.6.16 or lower, the script works just fine.
 [2016-03-17 17:48 UTC]
-Status: Open +Status: Feedback
 [2016-03-17 17:48 UTC]
Turn on display_errors. And if you still aren't seeing anything,

Check your server error logs.
 [2016-03-17 19:20 UTC] jherrera72 at gmail dot com
-Status: Feedback +Status: Open
 [2016-03-17 19:20 UTC] jherrera72 at gmail dot com
Sorry but did that already,
If I turn on display errors, nothing happens, server error logs are blank, checked with x64 7.0.0 and nothing
checked all extensions and nothing

The problem is that it just doesn't work and I cannot catch any error.
 [2016-03-17 19:41 UTC] jherrera72 at gmail dot com
-Status: Open +Status: Closed
 [2016-03-17 19:41 UTC] jherrera72 at gmail dot com
FTP support is disabled by default.
 [2016-03-17 19:42 UTC]
-Status: Closed +Status: Feedback
 [2016-03-17 19:42 UTC]
Using IE? Disable its friendly error pages setting.

A 500 means there is an error. That error will be being logged somewhere. Have you checked Windows' error log? You can also try pointing PHP's error_log somewhere.
 [2016-03-17 19:43 UTC]
-Status: Feedback +Status: Not a bug
 [2016-03-17 19:43 UTC]
Oops. Didn't see your latest comment.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon May 10 05:01:24 2021 UTC