Click to See Complete Forum and Search --> : Server Side printing with PHP


JerryJr
07-26-2005, 02:20 PM
We currently have an internal web application to process production orders. We are in need of some 'automated' printing. When an order is created/processed, it will need to automatically print out a label to one of the printers in the warehouse. Sometimes each order will print 10-20 labels. The existing web application is MySQL and PHP based.

Does anyone know of a way to have the server automatically print labels without prompting the user?

I have looked into the php_printer.dll (http://us3.php.net/printer)... but have had no luck with the installation. The server is Windows 2000 running Apache web server.

Any help or thoughts would be appreciated.

CompGeek01
07-26-2005, 02:27 PM
No luck with the extension? Like...it's not loading? You'll have to install then restart the server to load the functions.

What problems with installation are you having?

JerryJr
07-26-2005, 02:34 PM
Thanks for the quick reply.

The original settings in the php.ini settings were:

extension_dir = ./ ; directory in which the loadable extensions
;extension=php_printer.dll

I changed them to:

extension_dir = c:\php\extensions ; directory in which the loadable extensions
extension=php_printer.dll

I tried restarting apache, but failed. So I restarted the server and apache did not start once again. I then changed the settings back to the original and restarted once more and apache was back up.

That about puts me where I am at right now.

CompGeek01
07-26-2005, 02:43 PM
Did you get any kind of error message when you tried to start up the server?

try changing the line extension_dir to:

extension_dir = c:/php/extensions/

JerryJr
07-26-2005, 02:47 PM
Error message from yesterday was:

PHP Warning: Unable to load dynamic library 'c:\php\extensions/php_printer.dll' - The specified module could not be found.

in Unknown on line 0

** Just found the error log **

I will try your settings from the previous post.

CompGeek01
07-26-2005, 02:50 PM
Ok, with the error log this should work:

extension_dir = c:/php/extensions

make sure that the slashes are forward slashes and there is no trailing slash...it seems to make one for you/

JerryJr
07-26-2005, 03:12 PM
Well that was a no go. Apache did not give an error message this time, and did not start once again. I made the changes back and restarted once again. The server came back up.

CompGeek01
07-26-2005, 03:15 PM
Nothing in the error log at all? hm.

JerryJr
07-26-2005, 03:17 PM
Yeah, nothing at all. And the web server was not responding from my browser. Its really odd. I did update the php_printer.dll file also. The exising file was 36kb and the new one is 48kb. Not sure if that could make a difference. I figured the one that was there was outdated.

JerryJr
07-26-2005, 04:49 PM
Does anyone know of another way to accomplish server side printing besides with php_printer.php?