The ProgrammersTalk Community
Forum Register Search Today's Posts Mark Forums Read
Register

Go Back   The ProgrammersTalk Community > Web Programming > PHP


Welcome to the The ProgrammersTalk Community forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Reply
 
LinkBack Thread Tools    Display Modes   
  #1 (permalink)  
Old 03-28-2008, 11:51 PM
reetha26 reetha26 is offline
Novice
Join Date: Mar 2008
Posts: 2
iTrader: (0)
reetha26 is on a distinguished road
Icon6 Call to undefined function printer_open()

hie,i am attempting to use printer_open() but i am receiving the following error when i test through dl().
dl() [function.dl]: Not supported in multithreaded Web servers - use extension=printer in your php.ini in C:\AppServ\www\myFolder\dl.php on line 3.

This is my code:
<?php
// Example loading an extension based on OS
if (!extension_loaded(*'printer'))
{
if (strtoupper(substr(*
PHP_OS, 0, 3) == 'WIN'))
{
dl('printer');
}
else {
dl('printer.so');
}
}
//Or, the PHP_SHLIB_SUFFIX constant is available as of PHP 4.3.0
if (!extension_loaded(*
'printer'))
{
$prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : '';
dl($prefix . 'printer.' . PHP_SHLIB_SUFFIX);
}
?>

why i cant load it? i am using AppServ 2.5.9.
i did the following configuration.
extension_dir = "C:\AppServ\php5\ex*
t"

//uncommenting the wants one
;extension=php_mssq*
l.dll
extension=php_mysql*
.dll
;extension=php_mysq*
li.dll
extension=php_print*
er.dll

i have copied php_printer.dll into ext directory and libmysql.dll in c:/windows/system32.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #2 (permalink)  
Old 03-29-2008, 06:12 AM
MrPickle's Avatar
MrPickle MrPickle is offline
Sr. Programmer
Join Date: Nov 2007
Location: England, Lincolnshire
Posts: 303
iTrader: (0)
MrPickle is on a distinguished roadMrPickle is on a distinguished roadMrPickle is on a distinguished road
PHP Code:
<?php
// Example loading an extension based on OS
if(!extension_loaded(*'printer'))
{
    if(
strtoupper(substr(*PHP_OS03) == 'WIN'))
    {
        
dl('printer');
    }
    else
    {
        
dl('printer.so');
    }
}

//Or, the PHP_SHLIB_SUFFIX constant is available as of PHP 4.3.0
if(!extension_loaded(*'printer'))
{
    
$prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' '';
    
dl($prefix 'printer.' PHP_SHLIB_SUFFIX);
}
?>
Made it easyer to read so people can help you easier (:

Please remember to use code tags when posting code, you can insert them by pressing this for normal code, for html code or this for php then putting your code in-between.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
The Following User Says Thank You to MrPickle For This Useful Post:
TeraTask (03-29-2008)
  #3 (permalink)  
Old 03-29-2008, 09:17 PM
ccoonen ccoonen is offline
PT Staff
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jun 2007
Location: Wisconsin
Posts: 317
iTrader: (0)
ccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished road
Wow, you can print with php? Is this just forcing a print to a networked print-server?
Reply With Quote
  #4 (permalink)  
Old 03-30-2008, 04:20 AM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Admin
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 442
iTrader: (0)
TeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to behold
Yes, ccoonen. You couldn't do that on your average server. The dl() function is used to load a "driver" that's not already present on the server. If the driver were properly installed, then the dl code would not be needed. But, that's all I know about the question, so I kept quiet -- I don't understand the error about multithreaded or whether the configuration file is correct.

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #5 (permalink)  
Old 04-01-2008, 05:56 PM
reetha26 reetha26 is offline
Novice
Join Date: Mar 2008
Posts: 2
iTrader: (0)
reetha26 is on a distinguished road
ermm...it seems to work now.i used AppServ 2.5.9-Open project at first but the php_printer.dll was not able to be loaded to the server. then i found out that this software cant support printer function due to bugs. so, i installed these;

apache_1.3.31-win32-x86-no_src
php-5.0.4-Win32
mysql-essential-5[1].0.22-win32

-> i added this extension to php.ini
extension = php_printer.dll

-> uncomment the line below
extension = php_printer.dll

of course, you will have to configure httpd.conf file too. and now it is Ok.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!

Last edited by reetha26 : 04-01-2008 at 06:01 PM.
Reply With Quote
  #6 (permalink)  
Old 04-03-2008, 09:36 AM
Lee's Avatar
Lee Lee is offline
PT Staff*
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: Blackpool, UK
Posts: 616
iTrader: (0)
Lee is just really niceLee is just really niceLee is just really niceLee is just really nice
Glad to hear you got your problem sorted mate
Reply With Quote
Reply


Thread Tools
Display Modes

   Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 11:29 PM. Powered by vBulletin
Copyright © 2000 - 2007, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO © 2007 ProgrammersTalk Sedo - Buy and Sell Domain Names and Websites project info: programmerstalk.net Statistics for project programmerstalk.net etracker® web controlling instead of log file analysis


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50