Fwd: Re: Zint and PHP

classic Classic list List threaded Threaded
3 messages Options
WLD WLD
Reply | Threaded
Open this post in threaded view
|

Fwd: Re: Zint and PHP


Hi folks,

For your reference regarding Zint and pERP...

Kindest regards,
Paul




----------  Forwarded Message  ----------
Subject: Zint and PHP
Date: Saturday 20 Feb 2010
From: WLD <[hidden email]>
To: [hidden email], [hidden email]

Hi folks,

Following on from a discussion on the mailing list for pERP ( http://www.projecterp.org/ ), I'm wondering if anybody has any information on how well Zint has been integrated with PHP.  I know some mention has been made of wrappers but the details that are out there seem quite slim.

PEAR has a barcode generator library which is unmaintained, far from standards compliant and doesn't support all the GTIN formats which we believe the pERP project should ideally support.

Is there any further information on integration with PHP?

I have copied the original messages below for your reference and convenience.

Kindest regards,
Paul



----------  Forwarded Message  ----------
Subject: Re: Zint and PHP
Date: Saturday 20 Feb 2010
From: "[hidden email]" <[hidden email]>
To: [hidden email]

Hi,

As I noted on the website there is indeed a wrapper for Zint which allows it to
be used in PHP. How good the wrapper is I couldn't say, I'm afraid, because I
don't know anything about PHP! The author of the wrapper (I can't remember
who it was off the top of my head) told me it probably wasn't secure enough to
be used online. I will forward the relevant source code to you when I get the
opportunity, hopefully later tonight - I'm working this weekend and the
relevant files are at home.

It was a definate aim of the Zint project to support as many standards as
possible and Zint now supports all ISO/IEC standards including all GS-1
compliant standards. I am now (slowly) attempting to add the wider set of
ANSI/AIM standards. As many standards as possible were coded from
specifications provided directly from the British Standards Institute or AIM in
order to make the program as accurate as possible. Unfortunately, however, I
don't have access to scanners/decoders for all of the standards. While I am
confident of the accuracy of some (Code 128, UPC/EAN, Aztec, Data Matrix, QR
Code etc.) I am less sure of the more complex DataBar and composite standards.
This is not helped by the fact that there is some ambiguity in the standards
themselves. If you are going to use Zint with DataBar or with GS1 composite
codes then I would advise you to test the encoding thoroughly, and please let me
know the result of those tests.

Also with relation to integration with PHP please bear in mind that Zint is
licensed under the GPL. Accoding to the Free Software Foundation this is not
compatible with the PHP license, although I don't know how much of a problem
this is in practice. I'm afraid I am not able to release Zint under a dual
license because a key component of the code is adapted from third-party code
which was released under the GPL.

I would be happy to help with the integration of Zint with pERP as much as I am
able and look forward to learning what the possibilities are here.

Robin.



----------  Forwarded Message  ----------
Subject: Re: Zint and PHP
Date: Sunday 21 Feb 2010
From: WLD <[hidden email]>
To: "[hidden email]" <[hidden email]>

Hi Robin,

Many thanks for the speedy reply and abundantly helpful information.  With regards to the licenses, PHP is also GPL so I'm unsure exactly why they wouldn't be compatible.  However, even if there is some aspect that makes them incompatible, the approach taken means that PHP just wouldn't ship pre-built with the extension by default.  As with PHP extensions for proprietary code, you have to obtain PHP and the extension(s) independently and build them together yourself for your own use.  This then satisfies both licenses, generally provided you don't then redistribute it to a third party as a complete package.  I'd be interested to find out why the FSF say that, it seems in err.

pERP is a set of "applications" for a groupware system called eGroupware.  eGW runs on PHP, and the pERP applications are also written in PHP and run inside eGW, with eGW effectively being the framework to provide security, database abstraction and so on.

Because of this, anybody using pERP would typically have the eGW installed on their own local server.  Security concerns for the existing Zint wrapper probably aren't a big problem because the interface to Zint wouldn't ever be publicly exposed.  Only authorised eGW users would be able to access the part of the system to generate barcodes.  Although of course, in an ideal world it should be as secure as possible.

If you would like to see exactly where it is we would like Zint to go, there is a public demo available.

1) Please go to http://demo.projecterp.org/
2) Login with demo2 / guest
3) At the top menu bar click on the "Inventory" application, roughly in the middle of the icons
4) In the page that loads, choose the "Stock" icon
5) Click on any stock code in the list, or choose "New Stock Item" at the bottom of the page
6) In the page that loads allowing you to edit stock information, at the bottom of the "Details" tab (displayed by default) is a barcode input box
7) Enter any valid barcode and format from the dropdown list
8) Click on the Save button at the bottom of the form

That should then display the relevant barcode you have entered, of which you can enter multiple types.

Please note that with this demo site, it's often a mess because people go on there and abuse it to test things out.  pERP is normally a lot more organised than this!

The PHP library to generate barcodes as it stands at the moment is unmaintained, not standards compliant and doesn't support all the GTIN formats that we believe a stock management system should support.  This is what we want to replace.

Zint looks extremely promising for us and I think we're all excited about using it.  Your commitment to following the standards (as best anybody can follow standards lol) is admirable and fills me personally with confidence for its success in real-world applications.  I'm sorry you don't have any barcode scanners to test with, this is something I will be happy to assist with as I can.  However mainly the UPC and EAN types will be the only formats to be used initially and you mentioned you're quite confident they work already.

I will forward your response to the other developers and hopefully this week we can look to make some progress on it.

Kindest regards,
Paul



----------  Forwarded Message  ----------
Subject: Re: Zint and PHP
Date: Sunday 21 Feb 2010
From: "[hidden email]" <[hidden email]>
To: [hidden email]

As promised, here is the code I have. It was written for Zint 2.1 so I guess
will need alteration to work with 2.3.
 
Robin.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers

zint_webpage.zip (43K) Download Attachment
WLD WLD
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Re: Zint and PHP


Oh dear,

I had a look at the code in the zip file and this wrapper is simply calls to the Zint binary.  I was expecting the wrapper to actually be a PHP extension which could be compiled in to the PHP binary.

There are two choices here, we can either use Zint as calls to the binary and go through the headache of storing the generated images (on disk or in the database), and all the faffing around that goes on with them such as verifying referential integrity etc.

Alternatively you folks can wait until I get around to doing the barcode bits for my current client where I can work with the Zint guys to create an actual extension .so for PHP.  I'm afraid I'm limited in my knowledge for creating a .dll for Windows versions.  I don't know if anyone else on this list is competent in this?

Maybe worth putting this proposal to the PHP and PEAR mailing lists to see if any of them want to take up the challenge, since their own barcode stuff is flakey at best.

Kindest regards,
Paul



On Sunday 21 Feb 2010 23:38:25 WLD wrote:
> Hi folks,
>
> For your reference regarding Zint and pERP...
>
> Kindest regards,
> Paul


> ----------  Forwarded Message  ----------
> Subject: Re: Zint and PHP
> Date: Sunday 21 Feb 2010
> From: "[hidden email]" <[hidden email]>
> To: [hidden email]
>
> As promised, here is the code I have. It was written for Zint 2.1 so I guess
> will need alteration to work with 2.3.
>  
> Robin.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers
Justin F. Hallett Justin F. Hallett
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Re: Zint and PHP

.so or .dll shouldn't be that hard just use pecl to build it ;) there might be windows specific code but hopefully most of that should be done in zint already anyhow.
---
Justin F. Hallett
Blue Falls Manufacturing Ltd.
I.T. Manager
http://www.goarctic.com/
Tel: (780) 789-2626 ext.323
Cel: (780) 935-9771
Fax: (780) 789-2624


On 2010-02-22, at 5:26 PM, WLD wrote:

>
> Oh dear,
>
> I had a look at the code in the zip file and this wrapper is simply calls to the Zint binary.  I was expecting the wrapper to actually be a PHP extension which could be compiled in to the PHP binary.
>
> There are two choices here, we can either use Zint as calls to the binary and go through the headache of storing the generated images (on disk or in the database), and all the faffing around that goes on with them such as verifying referential integrity etc.
>
> Alternatively you folks can wait until I get around to doing the barcode bits for my current client where I can work with the Zint guys to create an actual extension .so for PHP.  I'm afraid I'm limited in my knowledge for creating a .dll for Windows versions.  I don't know if anyone else on this list is competent in this?
>
> Maybe worth putting this proposal to the PHP and PEAR mailing lists to see if any of them want to take up the challenge, since their own barcode stuff is flakey at best.
>
> Kindest regards,
> Paul
>
>
>
> On Sunday 21 Feb 2010 23:38:25 WLD wrote:
>> Hi folks,
>>
>> For your reference regarding Zint and pERP...
>>
>> Kindest regards,
>> Paul
>
>
>> ----------  Forwarded Message  ----------
>> Subject: Re: Zint and PHP
>> Date: Sunday 21 Feb 2010
>> From: "[hidden email]" <[hidden email]>
>> To: [hidden email]
>>
>> As promised, here is the code I have. It was written for Zint 2.1 so I guess
>> will need alteration to work with 2.3.
>>
>> Robin.
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Perp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/perp-developers
>


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers