Re: [PHP-DB] Using PHP to print using LP on Linux
Hiya, Mine works with the following; extension_dir = c:/winnt/ And simply copy the php_gd2.dll file into the folder. Then restart apache. PS: This topic is a PHP-WIN topic not DB. Regards, Steven On 25 Oct 2003 at 5:43, Paul Fitz wrote: Hi Guys, I suppose this isn't a database specific question, but it is the only PHP mailing list I am subscribed to. Trying to trigger a printer in the office hooked up to a Mandrake 8 box with PHP 4.3 to print a file remotely, using the 'lp' command. Uses a postscript template to create the text that needs printing. Opens and edits the postscript fine, the printer refuses to work using the last section of code however. Does anybody have experience using lp with PHP and Linux? Any help appreciated. Cheers. My Code - $filename = new_user_letter.ps; $fp = fopen($filename,r); $fdata = fread($fp, filesize($filename)); fclose($fp); //search and replace all keywords $fdata = ereg_replace(%%full_name%%,$fullname,$fdata); $fdata = ereg_replace(%%street_address%%,$streetaddress,$fdata); $fdata = ereg_replace(%%town%%,strtoupper($town),$fdata); $fdata = ereg_replace(%%state%%,strtoupper($state),$fdata); $fdata = ereg_replace(%%postcode%%,strtoupper($postcode),$fdata); $fdata = ereg_replace(%%date%%,$long_date,$fdata); $fdata = ereg_replace(%%username%%,$username,$fdata); $fdata = ereg_replace(%%email_address%%,$username . @nor.com.au,$fdata); $fdata = ereg_replace(%%password%%,$password,$fdata); $fdata = ereg_replace(%%primary_dns%%,202.147.135.10,$fdata); $fdata = ereg_replace(%%secondary_dns%%,202.147.135.20,$fdata); $fdata = ereg_replace(%%pop_location_and_ph_number%%,$location . - . $dial_in_number,$fdata); $fdata = ereg_replace(%%domain_name%%,nor.com.au,$fdata); $fdata = ereg_replace(%%pop3_server%%,mail.nor.com.au,$fdata); $fdata = ereg_replace(%%smtp_server%%,mail.nor.com.au,$fdata); $fdata = ereg_replace(%%news_server%%,news.nor.com.au,$fdata); // Open the lp command for writing and pass the postscript to it. // The loop is to allow multiple copies to be printed, for ($copy_loop=0;$copy_loop$num_copies;$copy_loop++){ $fp = popen(/usr/bin/lp -d bw_laser_raw,w); fputs($fp,$fdata,strlen($fdata)); pclose($fp); echo .; } -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] REMOVE ME
go to news.php.net and subscribe your self. On 9 Oct 2003 at 15:47, Muzzamil wrote: Pl remove me from this mailing list Thanks [EMAIL PROTECTED] php-db Digest 8 Oct 2003 19:41:35 - Issue 2071 Topics (messages 30898 through 30907): Re: Is it possible to access MySQL table on server A from server B? 30898 by: ramki 30900 by: Cesar Schneider My SQL update one table, using reference from another... 30899 by: Tristan.Pretty.risk.sungard.com Re: support to palm db 30901 by: Cesar Schneider mysql_error() returning nothing 30902 by: Ben Edwards 30904 by: Ben Edwards PHP APACHE Database 30903 by: Paul Ciba Problem with uploadscript 30905 by: Ruprecht Helms 30906 by: George Patterson Php433 running on RedHat73 with support to OCI8 30907 by: Adriano Rocha Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] REMOVE ME
http://www.php.net/mailing-lists.php even On 9 Oct 2003 at 15:47, Muzzamil wrote: Pl remove me from this mailing list Thanks [EMAIL PROTECTED] php-db Digest 8 Oct 2003 19:41:35 - Issue 2071 Topics (messages 30898 through 30907): Re: Is it possible to access MySQL table on server A from server B? 30898 by: ramki 30900 by: Cesar Schneider My SQL update one table, using reference from another... 30899 by: Tristan.Pretty.risk.sungard.com Re: support to palm db 30901 by: Cesar Schneider mysql_error() returning nothing 30902 by: Ben Edwards 30904 by: Ben Edwards PHP APACHE Database 30903 by: Paul Ciba Problem with uploadscript 30905 by: Ruprecht Helms 30906 by: George Patterson Php433 running on RedHat73 with support to OCI8 30907 by: Adriano Rocha Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php