php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73389 imagecreatefromstring or imagecreatefromjpeg returns NULL
Submitted: 2016-10-26 09:31 UTC Modified: 2016-11-03 10:49 UTC
From: jgeert1 at its dot jnj dot com Assigned: cmb (profile)
Status: Not a bug Package: GD related
PHP Version: Next Minor Version OS: Windows Server 2008 R2
Private report: No CVE-ID: None
 [2016-10-26 09:31 UTC] jgeert1 at its dot jnj dot com
Description:
------------
I'm using PHP version 5.5.38 (64-bit) on Windows and I'm unable to use the imagecreatefromstring or imagecreatefromjpeg functions. I always get NULL as a result while I expected a image resource id or false (if it would fail).

I've run phpinfo and noticed that GD is full supported.
I checked all logfiles, eventlogs, but I couldn't find any errors.

I tried it with several jpg-files (small, medium, large), bit I was unable to load them with the functions.

The memory limit is set to 2048, so that can't be the issue.

Any idea what's missing here?

Test script:
---------------
$image = imagecreatefromjpeg('photo.jpg');
var_dump($image);

Expected result:
----------------
false or a image resource

Actual result:
--------------
NULL

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-26 10:07 UTC] cmb@php.net
-Status: Open +Status: Not a bug
 [2016-10-26 10:07 UTC] cmb@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

Note also that x64 builds of PHP 5 on Windows are experimental.
 [2016-10-26 10:07 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2016-11-03 10:49 UTC] jgeert1 at its dot jnj dot com
Please close this bug report.
The NULL value was generated by the var_export($image,true) function.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 10:01:31 2024 UTC