Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GSherwin's avatar

FTP upload of images using STORAGE function error

On the local side the codes works as expected. When I deploy to heroku I get an error message I do not understand. This message comes up when I attempt to upload an image. All the ftp credentials are good. Can anyone help with correcting this issue?

(1/1) ErrorException Use of undefined constant FTP_BINARY - assumed 'FTP_BINARY' (this will throw an Error in a future version of PHP)

in FilesystemManager.php line 176 at HandleExceptions->handleError(2, 'Use of undefined constant FTP_BINARY - assumed 'FTP_BINARY' (this will throw an Error in a future version of PHP)', '/app/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php', 176, array('config' => array('driver' => 'ftp', 'host' => 'ftp.PowWeb.com', 'username' => '', 'password' => '', 'root' => '/'))) in FilesystemManager.php line 176

line 176 is shown below

public function createFtpDriver(array $config)
{
    return $this->adapt($this->createFlysystem(
     (This is line 176)   new FtpAdapter($config), $config
    ));
}
0 likes
0 replies

Please or to participate in this conversation.