Barcodes using PHP and Apache Server

Apache2 and PHP

Setting up ActiveBarcode for Apache2 and PHP

Using ActiveBarcode to display barcodes on Internet sites with Apache and PHP is very simple. A standard installation of Apache and PHP is usually sufficient.

Additional to Apache and PHP you need the barcode object. If you have installed ActiveBarcode, the barcode object is already installed. The Internet-license must be installed, too. You received instructions on this with your purchase. The trial version does not require a license.

To use the PHP demo, copy the contents of the folder c:\program files (x86)\activebarcode\php\ to a subfolder of the inetpub folder. E.g.: c:\inetpub\wwwroot\php\

Now open open the URL http://localhost/php/.
An example page will open that shows and explains how to create barcodes dynamically.

PHP Demo

How to use the barcode object with PHP

The easiest way to create barcodes dynamically is to use 'barcodeimage.php'. It's a wrapper for the barcode object so that you can create barcodes and use them as images in any html page using the HTML img tag.

'barcodeimage.php' is found in c:\program files (x86)\activebarcode\php and must be copied to a folder that is covered by IIS. (E.g. \inetpub\wwwroot\php-activebarcode-demo\)

In your html pages you use 'barcodeimage.php' with the img tag:
<img src="barcodeimage.php">
A barcode with default values will be shown:


To define the barcode content and other attributes, you add parameters.

Example with parameters to create the specifc barcode shown below:
  <img src="barcodeimage.php?code=CODE39EXTENDED&


More information: Parameter list for 'barcodeimage.php'.