[PHP] ImageCreateFromJpeg error

2002-11-21 Thread Scott Nagel
I am trying to use the following piece of code:

$img_resized = imagecreate($img_new_width, $img_new_height);
$img_source =
ImageCreateFromJpeg($pa_strDocroot.$pa_strReadFold./.$this-Name);
imagecopyresized($img_resized, $img_source, 0 , 0 , 0 , 0, $img_new_width,
$img_new_height, $this-Width, $this-Height);

The code runs fine on my Windows machine, but ImageCreateFromJpeg() errors
on the server. I am sharing a server, and they have it set to not show any
errors, so I can't tell you what the exact error message is. I have been
able to establish that:

- GD is installed--the other image functions work;
- I believe it is a later version of GD that supports JPEGs, since
ImageCreateFromJpeg exists as a function [does that follow?];
- The paths are correct, since they work on my machine, and work in other
places;
- The write folder has full permissions set, just to be safe;
- The images in the read folder have read permissions set.

Is there some sort of a temporary directory as well, where permissions have
to be set? A few sites have mentioned a --with-jpeg-dir configuration
setting. Do the permissions for that need to be checked?

Any help would be appreciated.

Scott



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] ImageCreateFromJpeg error

2002-11-21 Thread Jason Wong
On Friday 22 November 2002 03:21, Scott Nagel wrote:
 I am trying to use the following piece of code:

 $img_resized = imagecreate($img_new_width, $img_new_height);
 $img_source =
 ImageCreateFromJpeg($pa_strDocroot.$pa_strReadFold./.$this-Name);
 imagecopyresized($img_resized, $img_source, 0 , 0 , 0 , 0, $img_new_width,
 $img_new_height, $this-Width, $this-Height);

 The code runs fine on my Windows machine, but ImageCreateFromJpeg() errors
 on the server. I am sharing a server, and they have it set to not show any
 errors, so I can't tell you what the exact error message is.

Just use:

  ini_set(display_errors, TRUE);

somewhere near the top of your page.

 I have been
 able to establish that:

 - GD is installed--the other image functions work;
 - I believe it is a later version of GD that supports JPEGs, since
 ImageCreateFromJpeg exists as a function [does that follow?];
 - The paths are correct, since they work on my machine, and work in other
 places;
 - The write folder has full permissions set, just to be safe;

Don't forget it needs the execute flag set as well ('x').

 - The images in the read folder have read permissions set.

Ditto.

 Is there some sort of a temporary directory as well, where permissions have
 to be set? A few sites have mentioned a --with-jpeg-dir configuration
 setting. 

That's only of relevance when /compiling/ php. 

 Do the permissions for that need to be checked?

No.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Logic is the chastity belt of the mind!
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] ImageCreateFromJpeg error

2002-11-21 Thread Scott Nagel
Thanks for the help.  Didn't know about the ini_set() function.  The error
was 'No JPEG support in this PHP build'.


Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 On Friday 22 November 2002 03:21, Scott Nagel wrote:
  I am trying to use the following piece of code:
 
  $img_resized = imagecreate($img_new_width, $img_new_height);
  $img_source =
  ImageCreateFromJpeg($pa_strDocroot.$pa_strReadFold./.$this-Name);
  imagecopyresized($img_resized, $img_source, 0 , 0 , 0 , 0,
$img_new_width,
  $img_new_height, $this-Width, $this-Height);
 
  The code runs fine on my Windows machine, but ImageCreateFromJpeg()
errors
  on the server. I am sharing a server, and they have it set to not show
any
  errors, so I can't tell you what the exact error message is.

 Just use:

   ini_set(display_errors, TRUE);

 somewhere near the top of your page.

  I have been
  able to establish that:
 
  - GD is installed--the other image functions work;
  - I believe it is a later version of GD that supports JPEGs, since
  ImageCreateFromJpeg exists as a function [does that follow?];
  - The paths are correct, since they work on my machine, and work in
other
  places;
  - The write folder has full permissions set, just to be safe;

 Don't forget it needs the execute flag set as well ('x').

  - The images in the read folder have read permissions set.

 Ditto.

  Is there some sort of a temporary directory as well, where permissions
have
  to be set? A few sites have mentioned a --with-jpeg-dir configuration
  setting.

 That's only of relevance when /compiling/ php.

  Do the permissions for that need to be checked?

 No.

 --
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *

 /*
 Logic is the chastity belt of the mind!
 */



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php