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. 4 21611
One thought: Are the two files you're trying the same size? If one is
significantly larger, it could either a) be larger than POST_MAX_FILE_S IZE
or whatever it is in php.ini or b) it could be large enough that it will
cause the script to timeout.
Mike wrote: 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...
<snip>
Its a thought, but I'm pretty sure it isn't correct for 2 reasons:
1) The script always worked relatively quickly in the past - it takes
about 10-15 seconds to process 30 pictures... and the script is dying
in about .5 seconds now...
2) I'm not posting pictures - the php page is actually iterating over
files in a directory that I choose, so it wouldn't hit the
post_max_file_s ize.
thanks though.
mike.
"Agelmar" <if**********@c omcast.net> wrote in message news:<bt******* *****@ID-30799.news.uni-berlin.de>... One thought: Are the two files you're trying the same size? If one is significantly larger, it could either a) be larger than POST_MAX_FILE_S IZE or whatever it is in php.ini or b) it could be large enough that it will cause the script to timeout. Mike wrote: 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... <snip>
Hmm... have you tried writing a separate script that just tries to open one
of the "evil" jpeg files, and on that one, don't shove an @ in front of
imagecreatefrom jpeg() (so you can see what the error message is)?
Mike wrote: Its a thought, but I'm pretty sure it isn't correct for 2 reasons:
1) The script always worked relatively quickly in the past - it takes about 10-15 seconds to process 30 pictures... and the script is dying in about .5 seconds now...
2) I'm not posting pictures - the php page is actually iterating over files in a directory that I choose, so it wouldn't hit the post_max_file_s ize.
thanks though. mike. "Agelmar" <if**********@c omcast.net> wrote in message news:<bt******* *****@ID-30799.news.uni-berlin.de>... One thought: Are the two files you're trying the same size? If one is significantly larger, it could either a) be larger than POST_MAX_FILE_S IZE or whatever it is in php.ini or b) it could be large enough that it will cause the script to timeout. Mike wrote: 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... <snip>
Thank you - a brilliant idea... when I did that and and printed out
the return value from imagecreatefrom jpeg(), I got the following:
Fatal error: Allowed memory size of 8388608 bytes exhausted at
(null):0 (tried to allocate 9088 bytes) in...
So I went to my php.ini file and upped the max memory and now
everything works great. That also explains why my old camera (1.3
megapixels) worked and my new one (4 megapixels) didn't.
thanks again,
mike.
"Agelmar" <if**********@c omcast.net> wrote in message news:<bt******* *****@ID-30799.news.uni-berlin.de>... Hmm... have you tried writing a separate script that just tries to open one of the "evil" jpeg files, and on that one, don't shove an @ in front of imagecreatefrom jpeg() (so you can see what the error message is)?
Mike wrote: Its a thought, but I'm pretty sure it isn't correct for 2 reasons:
1) The script always worked relatively quickly in the past - it takes about 10-15 seconds to process 30 pictures... and the script is dying in about .5 seconds now...
2) I'm not posting pictures - the php page is actually iterating over files in a directory that I choose, so it wouldn't hit the post_max_file_s ize.
thanks though. mike. "Agelmar" <if**********@c omcast.net> wrote in message news:<bt******* *****@ID-30799.news.uni-berlin.de>... One thought: Are the two files you're trying the same size? If one is significantly larger, it could either a) be larger than POST_MAX_FILE_S IZE or whatever it is in php.ini or b) it could be large enough that it will cause the script to timeout. Mike wrote: 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... <snip> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: jn |
last post by:
I'm working with images from a Kodak 2MP camera.
It looks like the function will only create a resource if I give it
horiznotal pictures from this camera....if I give it vertical (height larger
than width) images, it fails to create a resource.
What the hell is it doing?
|
by: Simon Stewart |
last post by:
Has anyone else experience of imagecreatefromjpeg failing with an error
message about memory even though the size of the image being uploaded is
nothing like the space available to the script?
Is imagecreatefromjpeg particularly memory hungry?
Immediately prior to the failure memory is given as 2405072
The jpeg being uploaded is 812201 in size
Smaller jpegs work fine. jpegs created by different means all seem to fail
if the size is...
|
by: Olivier |
last post by:
Hi,
I have the following code in my php script :
$fhSrc = imagecreatefromjpeg($srcFile);
This cause me the following error : Fatal error: Allowed memory size
of 8388608 bytes exhausted (tried to allocate 4800 bytes).
I read that I should increase the memory allowed php. Not sure.
This script works fine on a Windows 2000/Apache/php4 machine but not
|
by: steve park |
last post by:
Hi everyone,
this is one of those "inherited from someone else" projects that I'm having
problems with and was wondering if someone could help me out.
Our setup:
Redhat Linux
Apache 2.0.46
PHP 4.3.2
|
by: comp.lang.php |
last post by:
PHP version 4.3.9
GD version 2.0.2
Whenever I use imagecreatefromjpeg(), PHP completely dies. No errors,
no warnings, no notices, it dies in the following manner:
If using Firefox it just stops running cold
If using Konqueror you get the message "An error occurred while
processing http://www.blah.com/tools/app"
| |
by: Areric |
last post by:
Ok all. I have a series of images stored in a db. Im trying to work on
a script that will let me scale them based on user input. Ive hit a bit
of a roadblock on this line.
$orig =
imagecreatefromjpeg("DisplayImage.php?imageId=".$this->mImage->GetImageId());
Specifically it cant sopen that file.
DisplayImage.php is pretty simple, it just displays an image from the
|
by: jeffsnox |
last post by:
Hi,
I'm struggling to get imagecreatefromjpeg to work correctly.
I'm running PHP 4.3.9 with GD bundled (2.0.28 compatible).
If I run this:
$myimage = imagecreatefromjpeg("myfilename");
|
by: tim.landgraf |
last post by:
hi there,
i am experiencing a strange problem. i am iterating through a given
directory, selecting only jpg - images that are then resized and
inserted into a database. everything works, but if there is a file
with an apostrophe in it the GD function @ImageCreateFromJPEG fails.
anyone knows this problem and possible workarounds?
thank you,
tim
|
by: Silencet |
last post by:
Hi all, I, like alot of others, have been working with a script to create thumbnails, however, i've a problem were the script works, however just stops when it reaches the imagecreatefromjpeg function, and i've been looking all over for the solution to my problem, for almost 2 days but have yet to find the solution. Maybe i'm just stupid, but i can't figure this out.
Thank You.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |