Jump to content

danh123

New Members
  • Posts

    2
  • Joined

  • Last visited

danh123's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Please bare with me here. What I know about php is self taught and very basic. I didn't write the code myself but I just tweak the code where I can and when needed. The mysql database is called ics. There is a table called Printer which stores all the label printers info (unique id, name and ip address of every eltron/zebra printer attached to a print server). Each employee that prints labels selects the label printer they want to print to and the printer unique id is stored in the Employee table. I'm not getting any errors. I get the label printed response but the label just doesn't print. By my understanding, rlpr is not a recognized statement by windows? Here is the code from each file that has to do with the labels. stockline.php require 'ics.php'; require 'html.php'; require 'label.inc'; else if ( $_GET['print_label'] ) { label_print(label_part($_GET['StockId'])); html_status("Printed Label for Control #$_GET[StockId]"); $PartNumber = $_SESSION['ICS_PartNumber']; html.php // html_button() generates a "button" as a small HTML table. function html_button($url, $label) { ?> <table border="1" cellspacing="0" cellpadding="3"><tr class="menu"> <th><a class="menu" href="<?php echo $url; ?>"><?php echo $label; ?></a></th> </tr></table> <?php } ?> label.inc /* label.inc This file contains four label template functions: label_part($StockId), label_receiving($StockId, $Copies), label_shipping_address($SalesOrderId, $InvoiceId), label_shipping_part($SalesOrderId, $SOItemId, $qty) and one helper function: label_print($label) */ function label_print($label) { $Printer = ics_select('Employee, Printer', 'Address', "EmployeeId=$_SESSION[ICS_UserId] and LabelPrinter=PrinterId"); $pipe = popen("rlpr -H$Printer[Address]", "w"); fwrite($pipe, $label); pclose($pipe); } below in this file is the code that constructs the label with the information from mysql but I don't think any of that is the issue because it works fine on linux.
  2. Hello, I currently have a php inventory program running on a nitix server (linux) but I'm trying to move it all over to a windows 7 pro machine running wamp. I got pretty everything else to work fine but for the label printing. I have already enabled lpr. This works on linux: function label_print($label) { $Printer = ics_select('Employee, Printer', 'Address', "EmployeeId=$_SESSION[ICS_UserId] and LabelPrinter=PrinterId"); $pipe = popen("rlpr -H$Printer[Address]", "w"); fwrite($pipe, $label); pclose($pipe); } How do I get this to work on windows or is it not possible and if so, what are my options? Thanks! Dan
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.