#19487 [Opn]: ImageCreateFromGD2Part() don't accept some vars
| From: | sprice at wisc dot edu | Date: | Thu, 19 Sep 2002 01:55:03 +0000 |
| Subject: | #19487 [Opn]: ImageCreateFromGD2Part() don't accept some vars | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-19695@lists.php.net to get a copy of this message | ||
ID: 19487
User updated by: sprice@wisc.edu
Reported By: sprice@wisc.edu
Status: Open
Bug Type: GD related
Operating System: Darwin 6 (Mac OS 10.2)
PHP Version: 4.2.3
New Comment:
Just FYI, I was having problems with some vars that I got from
$HTTP_GET_VARS[]. I had to add a few lines to cast the vars as ints to
get it to work.
example
$x = (int) $x;
$y = (int) $y;
$medimg = ImageCreateFromGD2Part( $medimg, $x, $y, 800, 600 );
Previous Comments:
------------------------------------------------------------------------
[2002-09-18 20:42:12] sprice@wisc.edu
When I was working on a different bug
(http://bugs.php.net/bug.php?id=19418) I noticed that if I used this
line:
$img = ImageCreateFromGD2Part( $medimg, 1, 1, 800, 600 );
The script workedfine , but if I put single quotes around some vars
like this:
$img = ImageCreateFromGD2Part( $medimg, 1, 1, '800', '600' );
the httpd proccess was thrown into some loop that used 100% of CPU
time.
While checking this out further, I noticed that these programs run the
second that I requested the file (taken from top):
9233 c++filt3 0.0% 0:00.00 1 9 14 48K 400K 268K
1.37M
9232 crashdump 99.3% 0:02.12 2 15 404 25.2M 27.9M 33.2M
59.7M
and then the httpd proccess goes wild:
9235 httpd 56.9% 0:00.64 1 8 2179 576K+ 13.7M+ 2.65M+
3.49G-
(next second)
9235 httpd 99.1% 0:01.74 1 8 2179 600K+ 13.7M 2.67M+
3.49G
I am not much of a C hacker, so I really have no clue as to what is
going on.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19487&edit=1