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
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

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.