Skip to content

[5.8] Possible undocumented dependency #29769

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

Closed
GrahamCampbell opened this issue Aug 27, 2019 · 7 comments · Fixed by #29770
Closed

[5.8] Possible undocumented dependency #29769

GrahamCampbell opened this issue Aug 27, 2019 · 7 comments · Fixed by #29770

Comments

@GrahamCampbell
Copy link
Member

When I run Laravel's test suite on one of my machines, I run into the following issue:

1) Illuminate\Tests\Http\HttpTestingFileFactoryTest::testImageJpeg
Error: Call to undefined function Illuminate\Http\Testing\imagejpeg()

/data/src/Illuminate/Http/Testing/FileFactory.php:55
/data/src/Illuminate/Support/helpers.php:1124
/data/src/Illuminate/Http/Testing/FileFactory.php:63
/data/src/Illuminate/Http/Testing/FileFactory.php:34
/data/tests/Http/HttpTestingFileFactoryTest.php:23
@fiskolini
Copy link

Do you have PHP GD extension installed?

@GrahamCampbell
Copy link
Member Author

Hmm, actually, yes.

graham@Grahams-MBP framework % php73 -m | grep gd
gd

@GrahamCampbell
Copy link
Member Author

Kinda odd the function is not defined... Maybe it was compiled with an old version of the C lib?

@GrahamCampbell
Copy link
Member Author

graham@Grahams-MBP framework % php73 -r "var_dump(extension_loaded('gd'), function_exists('imagejpeg'));"
bool(true)
bool(false)

@GrahamCampbell
Copy link
Member Author

graham@Grahams-MBP framework % php -r "var_dump(gd_info());"
array(12) {
  ["GD Version"]=>
  string(26) "bundled (2.1.0 compatible)"
  ["FreeType Support"]=>
  bool(false)
  ["GIF Read Support"]=>
  bool(true)
  ["GIF Create Support"]=>
  bool(true)
  ["JPEG Support"]=>
  bool(true)
  ["PNG Support"]=>
  bool(true)
  ["WBMP Support"]=>
  bool(true)
  ["XPM Support"]=>
  bool(false)
  ["XBM Support"]=>
  bool(true)
  ["WebP Support"]=>
  bool(false)
  ["BMP Support"]=>
  bool(true)
  ["JIS-mapped Japanese Font Support"]=>
  bool(false)
}
graham@Grahams-MBP framework % php73 -r "var_dump(gd_info());"
array(12) {
  ["GD Version"]=>
  string(26) "bundled (2.1.0 compatible)"
  ["FreeType Support"]=>
  bool(false)
  ["GIF Read Support"]=>
  bool(true)
  ["GIF Create Support"]=>
  bool(true)
  ["JPEG Support"]=>
  bool(false)
  ["PNG Support"]=>
  bool(true)
  ["WBMP Support"]=>
  bool(true)
  ["XPM Support"]=>
  bool(false)
  ["XBM Support"]=>
  bool(true)
  ["WebP Support"]=>
  bool(false)
  ["BMP Support"]=>
  bool(true)
  ["JIS-mapped Japanese Font Support"]=>
  bool(false)
}

@GrahamCampbell
Copy link
Member Author

Alright, that's an issue outside of Laravel's control... docker-library/php#881.

@fiskolini
Copy link

The problem was in compiling without jpeg support.

Seems like missing libjpeg extension.

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

Successfully merging a pull request may close this issue.

2 participants