#29033 [NEW]: GD had problems with "include" keyword

2004-07-06 Thread robotech at mixmail dot com
From: robotech at mixmail dot com
Operating system: Linux
PHP version:  4CVS-2004-07-06 (stable)
PHP Bug Type: Unknown/Other Function
Bug description:  GD had problems with "include" keyword

Description:

I'm using GD to generate a dinamic image showing a chart.
It sees that there's and error when I try to use the keyword "include". 
I also try to use an empty file using the keyword "include" and the result
it's the same.

Reproduce code:
---
/*/
/* chart.php */
/*/
Header ("Contect-type: image/jpeg");
include ("function.phtml"); //only a group of functions. They all work.
$imgW = 500; $imgH = 312;
$img = ImageCreate($imgW,$imgH);
$black = ImageColorAllocate($img,0,0,0);
$white = ImageColorAllocate($img,255,255,255);
ImageFilledRectangle($img,0,0,$imgW,$imgH,$white);
$font = 2;
$txt = "Hello, dude!";
ImageString($img,$font,100,100,$txt,$black);
ImageJPEG($img);
ImageDestroy($img);


Expected result:

If would like to reuse a same code inside function.phtml in all my dinamic
charts.

Actual result:
--
It isn't working. Only works when I exclude the include.

-- 
Edit bug report at http://bugs.php.net/?id=29033&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29033&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29033&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29033&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29033&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29033&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29033&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29033&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29033&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29033&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=29033&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=29033&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=29033&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29033&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=29033&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=29033&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=29033&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29033&r=float


#20435 [Com]: $_POST not filled with enctype="multipart/form-data"

2004-04-02 Thread robotech at mixmail dot com
 ID:   20435
 Comment by:   robotech at mixmail dot com
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  4CVS-2002-11-14
 New Comment:

I have already "always_populate_raw_post_data" in Off and I still
having problem with $POST when I use "enctye='multipart/form-data'"

Also I tried "always_populate_raw_post_data" in On and I had the same
problem.



Could someone give a solution at last to this problem.



Thank you

Axl Laruse


Previous Comments:


[2002-11-15 01:33:57] [EMAIL PROTECTED]

Yes, hartmut fixed it already couple of days ago.





[2002-11-15 01:15:02] [EMAIL PROTECTED]

I found the source of the error. 



If "always_populate_raw_post_data" is set to On (and
enctype="multipart/form-data"), then $_POST is empty. If Off, then it
has the correct values .



In 4.2 it did work with always_... = On. I know hartmut was working on
this stuff and I'm not sure if this is a real bug, or if it's a known
"bug". But at least, there should be some warning somewhere about
that.



chregu



[2002-11-14 18:16:13] [EMAIL PROTECTED]

I can't reproduce this problem even with mbstring...



   



Is this a typo for either [type="hidden"] or [type="text"]?



[2002-11-14 18:00:56] [EMAIL PROTECTED]

"does not work" = $_POST is empty...



chregu



[2002-11-14 17:59:47] [EMAIL PROTECTED]

Following form does not work in PHP_4_3 from CVS.











 















enctype="application/x-www-form-urlencoded" does work.



maybe it has something to do with the recent changes in the POST area.



chregu




-- 
Edit this bug report at http://bugs.php.net/?id=20435&edit=1