hopefully this is an easy one to solve and I'm just missing something
little...
basically, I had a nice little website running with php, apache,
etc... that uses imagecreatefrom jpeg to create thumbnails of larger
pictures.
recently, I upgraded my system from suse 8.2 to suse 9.0, so I assume
my php/apache rpms were upgraded in the process...
Unfortunately, now, imagecreatefrom jpeg no longer works on pictures
taken with 1 of my 2 cameras - All of the ones with a Sony p30 work
just fine, whereas if I run the function on pictures taken with a
cannon powershot s400, execution of the PHP script stops. Nothing in
the logs, nothing output to the screen, etc...
Here is a snippet of code that I use:
$size = getimagesize($p icturePath);
$width = $size[0] * $x / 100;
$height = $size[1] * $y / 100;
$im = @imagecreatefro mjpeg($pictureP ath);
$newim = imagecreatetrue color($width,$h eight);
ImageCopyResize d($newim,$im,0, 0,0,0,$width,$h eight,ImageSX($ im),ImageSY($im ));
If I put an echo right before and right after the
$im=@imagecreat efromjpeg line, the first echo prints out, the second
does not - so php stops parsing, executing the document.
Again, this worked in the past, and I can't figure out why it wouldn't
now. Here is some info from my setup:
php 4.3.3
'./configure' '--prefix=/usr/share' '--datadir=/usr/share/php'
'--bindir=/usr/bin' '--libdir=/usr/share' '--includedir=/usr/include'
'--sysconfdir=/etc' '--with-_lib=lib' '--with-config-file-path=/etc'
'--with-exec-dir=/usr/lib/php/bin' '--disable-debug' '--enable-bcmath'
'--enable-calendar' '--enable-ctype' '--enable-dbase'
'--enable-discard-path' '--enable-exif' '--enable-filepro'
'--enable-force-cgi-redirect' '--enable-ftp' '--enable-gd-imgstrttf'
'--enable-gd-native-ttf' '--enable-inline-optimization'
'--enable-magic-quotes' '--enable-mbstr-enc-trans' '--enable-mbstring'
'--enable-mbregex' '--enable-memory-limit' '--enable-safe-mode'
'--enable-shmop' '--enable-sigchild' '--enable-sysvsem'
'--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid'
'--enable-versioning' '--enable-wddx' '--enable-yp' '--with-bz2'
'--with-dom=/usr/include/libxml2' '--with-ftp' '--with-gdbm'
'--with-gettext' '--with-gmp' '--with-imap=yes' '--with-iodbc'
'--with-jpeg-dir=/usr' '--with-ldap=yes' '--with-mcal=/usr'
'--with-mcrypt' '--with-mhash' '--with-mysql=/usr' '--with-ndbm'
'--with-pgsql=/usr' '--with-png-dir=/usr' '--with-readline'
'--with-snmp' '--with-t1lib' '--with-tiff-dir=/usr' '--with-ttf'
'--with-freetype-dir=yes' '--with-xml' '--with-xpm-dir=/usr/X11R6'
'--with-zlib=yes' '--with-qtdom=/usr/lib/qt3' '--with-gd'
'--with-openssl' '--with-curl'
'--with-swf=/usr/src/packages/BUILD/swf/dist/' '--with-imap-ssl'
'--enable-xslt' '--with-xslt-sablot' '--with-iconv' '--with-mm'
'--with-apxs=/usr/sbin/apxs' 'i586-suse-linux'
GD Support enabled
GD Version bundled (2.0.15 compatible)
FreeType Support enabled
FreeType Linkage with freetype
T1Lib Support enabled
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
Any help would be amazing - I've been banging my head on this for
hours.
Thanks,
mike.
little...
basically, I had a nice little website running with php, apache,
etc... that uses imagecreatefrom jpeg to create thumbnails of larger
pictures.
recently, I upgraded my system from suse 8.2 to suse 9.0, so I assume
my php/apache rpms were upgraded in the process...
Unfortunately, now, imagecreatefrom jpeg no longer works on pictures
taken with 1 of my 2 cameras - All of the ones with a Sony p30 work
just fine, whereas if I run the function on pictures taken with a
cannon powershot s400, execution of the PHP script stops. Nothing in
the logs, nothing output to the screen, etc...
Here is a snippet of code that I use:
$size = getimagesize($p icturePath);
$width = $size[0] * $x / 100;
$height = $size[1] * $y / 100;
$im = @imagecreatefro mjpeg($pictureP ath);
$newim = imagecreatetrue color($width,$h eight);
ImageCopyResize d($newim,$im,0, 0,0,0,$width,$h eight,ImageSX($ im),ImageSY($im ));
If I put an echo right before and right after the
$im=@imagecreat efromjpeg line, the first echo prints out, the second
does not - so php stops parsing, executing the document.
Again, this worked in the past, and I can't figure out why it wouldn't
now. Here is some info from my setup:
php 4.3.3
'./configure' '--prefix=/usr/share' '--datadir=/usr/share/php'
'--bindir=/usr/bin' '--libdir=/usr/share' '--includedir=/usr/include'
'--sysconfdir=/etc' '--with-_lib=lib' '--with-config-file-path=/etc'
'--with-exec-dir=/usr/lib/php/bin' '--disable-debug' '--enable-bcmath'
'--enable-calendar' '--enable-ctype' '--enable-dbase'
'--enable-discard-path' '--enable-exif' '--enable-filepro'
'--enable-force-cgi-redirect' '--enable-ftp' '--enable-gd-imgstrttf'
'--enable-gd-native-ttf' '--enable-inline-optimization'
'--enable-magic-quotes' '--enable-mbstr-enc-trans' '--enable-mbstring'
'--enable-mbregex' '--enable-memory-limit' '--enable-safe-mode'
'--enable-shmop' '--enable-sigchild' '--enable-sysvsem'
'--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid'
'--enable-versioning' '--enable-wddx' '--enable-yp' '--with-bz2'
'--with-dom=/usr/include/libxml2' '--with-ftp' '--with-gdbm'
'--with-gettext' '--with-gmp' '--with-imap=yes' '--with-iodbc'
'--with-jpeg-dir=/usr' '--with-ldap=yes' '--with-mcal=/usr'
'--with-mcrypt' '--with-mhash' '--with-mysql=/usr' '--with-ndbm'
'--with-pgsql=/usr' '--with-png-dir=/usr' '--with-readline'
'--with-snmp' '--with-t1lib' '--with-tiff-dir=/usr' '--with-ttf'
'--with-freetype-dir=yes' '--with-xml' '--with-xpm-dir=/usr/X11R6'
'--with-zlib=yes' '--with-qtdom=/usr/lib/qt3' '--with-gd'
'--with-openssl' '--with-curl'
'--with-swf=/usr/src/packages/BUILD/swf/dist/' '--with-imap-ssl'
'--enable-xslt' '--with-xslt-sablot' '--with-iconv' '--with-mm'
'--with-apxs=/usr/sbin/apxs' 'i586-suse-linux'
GD Support enabled
GD Version bundled (2.0.15 compatible)
FreeType Support enabled
FreeType Linkage with freetype
T1Lib Support enabled
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
Any help would be amazing - I've been banging my head on this for
hours.
Thanks,
mike.
Comment