#19487 [Opn->Csd]: ImageCreateFromGD2Part() don't accept some vars
| From: | iliaa@php.net | Date: | Fri, 20 Sep 2002 01:29:48 +0000 |
| Subject: | #19487 [Opn->Csd]: ImageCreateFromGD2Part() don't accept some vars | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-19815@lists.php.net to get a copy of this message | ||
ID: 19487
Updated by: iliaa@php.net
Reported By: sprice@wisc.edu
-Status: Open
+Status: Closed
Bug Type: GD related
Operating System: Darwin 6 (Mac OS 10.2)
PHP Version: 4.2.3
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-09-18 20:55:03] sprice@wisc.edu
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 );
------------------------------------------------------------------------
[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