1

Heroku's php version is 7.3. When I tried to upload any file from my app(deployed in heroku) to ftp it gives this error - Use of undefined constant FTP_BINARY - assumed 'FTP_BINARY' (this will throw an Error in a future version of PHP) in FilesystemManager.php. But in localhost where php version is 7, it works fine.What need to be done to solve this error? I have seen a similar question here, PHP 7.0.5: Use of undefined constant FTP_BINARY - assumed 'FTP_BINARY'

but the answer was applied to a windows OS and I am a little lost how to implement the solution in heroku cloud ie to turn on ftp in the php version according to the accepted answer.

Lamia Alam
  • 13
  • 4
  • Possible duplicate of [PHP 7.0.5: Use of undefined constant FTP\_BINARY - assumed 'FTP\_BINARY'](https://stackoverflow.com/questions/36694483/php-7-0-5-use-of-undefined-constant-ftp-binary-assumed-ftp-binary) – Steffen Ullrich Mar 10 '19 at 20:55
  • I have updated my question, I already saw the solution but bit confused about implementing the solution in my scenario – Lamia Alam Mar 10 '19 at 23:37

1 Answers1

1

create a procfile in the root folder and add this web: vendor/bin/heroku-php-apache2 -i custom_php.ini public/

create a custom_php.ini file in the root folder (which will work as php.ini) file and add this to that file extension=ftp.so

  1. https://laracasts.com/discuss/channels/laravel/problem-with-ftp-in-laravel-52-on-php-717

  2. Edit php.ini on heroku

Tauseef Mamun
  • 126
  • 1
  • 3
  • 11