Jump to content

My Image functions dont work


chantown

Recommended Posts

Hi,

 

I tried to do:

 

$image = open_image('test.jpg'); //syntax is right, and a file is there
die("here");

 

but for some reason, my PHP stops at $image, and doesn't do anything after that 1st line.

 

Also, I have GD 2

 

GD Support enabled

GD Version bundled (2.0.28 compatible)

FreeType Support enabled

FreeType Linkage with freetype

FreeType Version 2.2.1

GIF Read Support enabled

GIF Create Support enabled

JPG Support enabled

PNG Support enabled

WBMP Support enabled

XBM Support enabled

 

Why is this? I'm just trying to open a simple image

Link to comment
https://forums.phpfreaks.com/topic/85577-my-image-functions-dont-work/
Share on other sites

That's your script in its entirety? Then that would be because open_image() is an undefined function and you have display_errors set to off. If you were to do:

 

<?php
ini_set('display_errors','On');
error_reporting(E_ALL);
$image = open_image('test.jpg') or die("No good");
die("yes, it works");
?>

 

You would recieve the error message that open_image() is an undefined function.

 

If there is more to your script, and you have created the open_image() function, then i would still suggest that there is an error somewhere and you have display_errors set to off

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.