Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of undefined constant FT_UID #141

Closed
rwolfdev opened this issue Aug 25, 2018 · 3 comments
Closed

Use of undefined constant FT_UID #141

rwolfdev opened this issue Aug 25, 2018 · 3 comments

Comments

@rwolfdev
Copy link

rwolfdev commented Aug 25, 2018

Describe the bug
When I want to install the package via composer i am facing the following error:


post-autoload-dump: Illuminate\Foundation\ComposerScripts::postAutoloadDump
post-autoload-dump: @php artisan package:discover

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

  at /var/www/html/laravel/vendor/webklex/laravel-imap/src/config/imap.php: 105
  101:     |
  102:     */
  103:     'options' => [
  104:         'delimiter' => '/',
  105:         'fetch' => FT_UID,
  106:         'fetch_body' => true,
  107:         'fetch_attachment' => true,
  108:         'fetch_flags' => true,
  109:         'message_key' => 'id',
  110:         'fetch_order' => 'asc',

  Exception trace:

  1   Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Use of undefined constant FT_UID - assumed 'FT_UID' (this will throw an Error in a future version of PHP)", "/var/www/html/laravel/vendor/webklex/laravel-imap/src/config/imap.php", ["imap", "/var/www/html/laravel/vendor/webklex/laravel-imap/src/IMAP/Providers/../../config/imap.php"])
      /var/www/html/laravel/vendor/webklex/laravel-imap/src/config/imap.php : 105

  2   require("/var/www/html/laravel/vendor/webklex/laravel-imap/src/config/imap.php")
      /var/www/html/laravel/vendor/webklex/laravel-imap/src/IMAP/Providers/LaravelServiceProvider.php : 66

**To Reproduce **
Steps to reproduce the behavior:

  1. Run "composer require webklex/laravel-imap" on console

Expected behavior
I want to install "laravel-imap" into my laravel project and I run the command: "composer require webklex/laravel-imap " in my laravel project. Where it throws me the error which I pasted in my first section of this post.

** Server : **

  • OS: Debian 9
  • PHP: 7.0
@Webklex
Copy link
Owner

Webklex commented Aug 25, 2018

Hi @Grashee ,
please make sure you've installed all required php extensions:

sudo apt-get install php*-imap php*-mbstring php*-mcrypt && sudo apache2ctl graceful

..and check #14 and #30 as well. Feel free to reopen this issue if you still encounter the same problem :)

Best regards

@Webklex Webklex closed this as completed Aug 25, 2018
@lomotech
Copy link
Contributor

i have this issue too with my macOS, php@7.2, valet.
in terminal its ok but in browser have this issue and it says imap_open is not a function.

the solution:

sudo brew services restart php@7.2
sudo brew services restart nginx

im trying without sudo, nothing changes.

@J-Brk
Copy link

J-Brk commented Jan 3, 2019

This constant is defined by php-imap, php-imap is required as dependency.
@Webklex However my development environment has no php-imap installed, might be good to build in some check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants