
 Brandon Sussman - 2007-02-28 19:03:46
 
To reproduce, put /captcha2 and its contents into web root dir, make example.php work correctly, move example.php one level up, make it work.
I moved example.php 1 level up from /captcha2/ so it is in my web document root dir.
This is in the class file, in /captcha2 :
private $font_size 	= 24; // if GD2 in points / GD1 in pixels
private $font 		= '/captcha2/arial.ttf';
private $img_height 	= 70;
private $save_path	= '/home/xxxx/www/www/captcha2/gdtest';
/home/xxxx/www/www  is the document root for the web space.
I get alt text instead of the generated png - the image uri contains the whole real path to gdtest which is incorrect. The file is actually generated - I prove by looking directly at it.
if I change save_path to '/captcha2/gdtest' I get error "Unable to open '/captcha2/gdtest/xxxxx.png' for writing."