[Gloucs] barcoding

Guy Edwards gloucs at mailman.lug.org.uk
Thu May 8 22:58:01 2003


On Wed, 2003-05-07 at 23:13, Iain Calder wrote: 
> >It's all going pretty fine apart from the barcode image generation script at
> >http://www.mribti.com/barcode/sample.php
> >which seems to be complaining about  
> >
> >Fatal Error: : Call to undefined function: imagecreate() in /var/www/html/barcode.php on line 88
> >
> >line 88 being:
> >	$this->mImg  	= ImageCreate($this->mWidth, $this->mHeight);
> >
> >I've got php-gd installed as well as gd2 and libgd2 so I hope it's not 
> >some missing gd function. Anyone any ideas on this?
> >Guy
> >  
> >
> imagecreate works fine for me with PHP 4.1 and gd 1.x compiled-in.  If 
> you do a phpinfo() you should see a section declaring that GD support is 
> enabled.  If not, maybe you need to edit php.ini and uncomment 
> 'extension=gd.so'

thanks Iain, 

Having started my computer today with the gd rpms installed I don't get
the error any more but I don't get any barcode image displayed either

just to misuse the glug server for a second....
http://www.gloucs.lug.org.uk/sample.html
I saved the phpinfo() output from my home machine as a html file

I noticed it says
"Extensions listed here are (or will be soon) available as external
modules. To install one or all of these, use "urpmi" php-EXTENSION_NAME"

php-gd is installed and gd is listed under the extension lists in
phpinfo

taking the href from the image that failed to load in the resulting page
(eg)
./image.php?code=0123456789&style=68&type=I25&width=460&height=120&xres=2&font=5

and going to the url directly with

http://127.0.0.1/image.php?code=0123456789&style=68&type=I25&width=460&height=120&xres=2&font=5

gives me the interesting error

   "Need bar code type ex. C39"

although type=I25 is in the url

I looked for php.ini but don't appear to have it. I have a 
/etc/php folder which contains
- 23_gd.ini
- 34_mysql.ini
but no php.ini (did a find / -name php.ini)

cat 23_gd.ini gives:
extension = gd.so

I noticed in your email you mentioned gd1 so I tried uninstalling gd2
and installed gd1 but that made no difference (I guess as it's using the
php-gd package)

my php-gd package is 4.3.0-2 I tried the php-gd package form cooker
which is 4.3.1-1 but it had no visible effect.

anyone any ideas?

thanks,
Guy