Skip to content

dynamsoft-dbr/php-barcode-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Barcode Reader

The sample demonstrates how to make a Web Barcode Reader app with PHP, Nginx and Dynamsoft Barcode Reader SDK on Windows.

Prerequisites

How to Build PHP Custom Extension with Dynamsoft Barcode Reader SDK

Please read Making PHP Barcode Extension with Dynamsoft Barcode SDK to learn how to build php_dbr.dll.

How to Configure PHP Environment

  1. Copy php_dbr.dll to %php%\ext.

  2. Copy DynamsoftBarcodeReaderx86.dll to PHP root directory **%php%**.

  3. Open %php%\php.ini and add following line:

    extension=php_dbr.dll
    

    Change max file size if you want to upload big image files:

    upload_max_filesize=20M
    

How to Configure Nginx for PHP

  1. Open %nginx%\conf\nginx.conf and add PHP configuration:

    location ~ \.php$ {
        root           html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME <Your Web App Folder>/$fastcgi_script_name;
        include        fastcgi_params;
    }
    

    When uploading big files, you may see the error nginx 413 Request Entity Too Large. To fix it, change file size in configuration file:

    client_max_body_size 50M;
    

How to Run the PHP Barcode App

  1. Run php-cgi:

    %php%\php-cgi.exe -b 127.0.0.1:9000 -c %php%\php.ini
    
  2. Run Nginx:

    %nginx%\nginx.exe
    
  3. Visit localhost:8080/index.php load barcode image

    read barcode

Reference

Blog

How to Create a Web Barcode Reader App with PHP and Nginx

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages