Click here to get back home

createimagefromstring / createimagefromjpeg

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
createimagefromstring / createimagefromjpeg Nathan Moschkin 07-07-2008
Get Chitika Premium
Posted by Nathan Moschkin on July 7, 2008, 4:51 am
Please log in for more thread options
I've tried uploading a couple of jpegs to my test application, thinking
that it was some how a header problem, and since I know these jpegs were
created with different programs, I figured I could root that out as the
cause.

My problem? Either of these functions, when attempting to load a JPEG
on my system are failing... they're causing PHP to crash and end the
script right then and there and I can't find any error logs that give me
any more information than that.

I've checked my memory limits and all of that, that's not the problem,
since I can load the contents of the file into a string, just fine... I
just cannot use the createimage functions.

I'm hoping someone's run into this problem, before, so I'm hoping
someone here can point me in the right direction with this one.

Thanks in advance!

Posted by Twayne on July 7, 2008, 6:44 am
Please log in for more thread options
> I've tried uploading a couple of jpegs to my test application,
> thinking that it was some how a header problem, and since I know
> these jpegs were created with different programs, I figured I could
> root that out as the cause.
>
> My problem? Either of these functions, when attempting to load a JPEG
> on my system are failing... they're causing PHP to crash and end the
> script right then and there and I can't find any error logs that give
> me any more information than that.
>
> I've checked my memory limits and all of that, that's not the problem,
> since I can load the contents of the file into a string, just fine...
> I just cannot use the createimage functions.
>
> I'm hoping someone's run into this problem, before, so I'm hoping
> someone here can point me in the right direction with this one.
>
> Thanks in advance!

Maybe: Check out how Captcha images are done; that's what I learned on.
Not the same, but similar processes; it just also creates its own image,
so toss that part.



Posted by Jerry Stuckle on July 7, 2008, 4:40 pm
Please log in for more thread options
Nathan Moschkin wrote:
> I've tried uploading a couple of jpegs to my test application, thinking
> that it was some how a header problem, and since I know these jpegs were
> created with different programs, I figured I could root that out as the
> cause.
>
> My problem? Either of these functions, when attempting to load a JPEG
> on my system are failing... they're causing PHP to crash and end the
> script right then and there and I can't find any error logs that give me
> any more information than that.
>
> I've checked my memory limits and all of that, that's not the problem,
> since I can load the contents of the file into a string, just fine... I
> just cannot use the createimage functions.
>
> I'm hoping someone's run into this problem, before, so I'm hoping
> someone here can point me in the right direction with this one.
>
> Thanks in advance!
>

How big are the jpegs? Just because you can load them into a string
doesn't mean you can use createimage(). That can take significantly
more memory.

The first thing you should do is enable all error reporting and display
errors. In your php.ini file, set

error_reporting=E_ALL
display_errors=on

You should always have these enabled on a development system (but not a
production system).

If you still don't see the problem, post your code and we can look at it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================


Posted by Nathan Moschkin on July 7, 2008, 4:59 pm
Please log in for more thread options
Jerry Stuckle wrote:
>
> How big are the jpegs? Just because you can load them into a string
> doesn't mean you can use createimage(). That can take significantly
> more memory.
>
> The first thing you should do is enable all error reporting and display
> errors. In your php.ini file, set
>
> error_reporting=E_ALL
> display_errors=on
>
> You should always have these enabled on a development system (but not a
> production system).
>
> If you still don't see the problem, post your code and we can look at it.
>


I figured it out. My system wasn't configured properly. I was missing
the php-gd libraries installed on my system. I installed them and
everything instantly started working.

You know, I'm going to be working with exceptionally large files. Is
there any way to overcome the inherent 2 GB limit in PHP?

Posted by AnrDaemon on July 7, 2008, 6:39 pm
Please log in for more thread options
Greetings, Nathan Moschkin.
In reply to Your message dated Tuesday, July 8, 2008, 0:59:25,

>> How big are the jpegs? Just because you can load them into a string
>> doesn't mean you can use createimage(). That can take significantly
>> more memory.
>>
>> The first thing you should do is enable all error reporting and display
>> errors. In your php.ini file, set
>>
>> error_reporting=E_ALL
>> display_errors=on
>>
>> You should always have these enabled on a development system (but not a
>> production system).
>>
>> If you still don't see the problem, post your code and we can look at it.
>>


> I figured it out. My system wasn't configured properly. I was missing
> the php-gd libraries installed on my system. I installed them and
> everything instantly started working.

> You know, I'm going to be working with exceptionally large files. Is
> there any way to overcome the inherent 2 GB limit in PHP?

What you mean 'exceptionally'? 4000x3000x32b = about 45Mb.
memory_limit 128Mb will be most likely more than enough for you.


--


Similar ThreadsPosted
Help with createimagefromjpeg not working January 17, 2005, 10:58 am
createimagefromjpeg memory error August 10, 2006, 9:59 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap