Fatal error: Call to undefined function printer_open()

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Fatal error: Call to undefined function printer_open()

Postby ayanonly1 » 27. April 2009 07:36

hi, i want to use printer directly,so i config all(2 php.ini and 1 php5.ini file i found) php.ini as add-
[printer]
printer.default_printer = "Your printer name"

at the end of the file and use function as
$url1="invoice.php?inid=".$row1[0];
$handle = printer_open();
printer_start_doc($handle, $url1);
printer_start_page($handle);
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
but when i run it
given the messege as
Fatal error: Call to undefined function printer_open()
plese help me
ayanonly1
 
Posts: 5
Joined: 28. December 2008 10:18

Re: Fatal error: Call to undefined function printer_open()

Postby Sharley » 27. April 2009 08:05

ayanonly1 wrote:hi, i want to use printer directly,so i config all(2 php.ini and 1 php5.ini file i found) php.ini as add
What version of XAMPP are you using?

In 1.7.1 the php.ini file is in the xampp/php folder but in 1.7.0 and below the php.ini file is in the xampp\apache\bin folder - don't forget to save the file after editing and then restart Apache.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Fatal error: Call to undefined function printer_open()

Postby ayanonly1 » 27. April 2009 09:02

hi,
i am ussing xampp 1.7.0
now i change only the php.ini file in xampp/php folder as
[printer]
;printer.default_printer = "Send To OneNote 2007"


as want this printer as default
save php.ini
then restart apache
but still its giving the same error.

oher error i notice
when i stop the apache from xampp control pannel its dont stop
give messege thet
busy..........
error: -1
then i stop it from service
then give messege windows could not stop apache 2.2 service
error 1067
but the apache stop
then i start apache from service again
and try this print page
and giving the same error
but other things are working well
ayanonly1
 
Posts: 5
Joined: 28. December 2008 10:18

Re: Fatal error: Call to undefined function printer_open()

Postby Sharley » 27. April 2009 09:10

ayanonly1 wrote:i am ussing xampp 1.7.0
now i change only the php.ini file in xampp/php folder as
The php.ini file to edit is in the xampp\apache\bin folder - http://localhost/xampp/phpinfo.php look for the line Loaded Configuration File as it will tell which php.ini file is being used.

ayanonly1 wrote:[printer]
;printer.default_printer = "Send To OneNote 2007"
This line is now commented out and will be ignored.

What you mean is:
[printer]
printer.default_printer = "Send To OneNote 2007"

See no ; in front of the line.

Sorry can't help with your php code.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 46 guests