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\fyp\ext_load.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\ext"
//uncommenting the wants one ;extension=php_mssql.dll extension=php_mysql.dll ;extension=php_mysqli.dll extension=php_printer.dll
i have copied php_printer.dll into ext directory and libmysql.dll in c:/windows/system32
I got the same problem like yours, but am in Joomla.
If u hv uncommented the "extension=php_printer.dll" line in php.ini, then I think there should be no problem as printer function is handled from here.
Last guess is make sure there's any printer attached to ur computer. If u sure that the printer is working good, u can call printer_open() function to open the specific printer. So that PHP "understand" the command well.
If you would like to report an abuse of our service, such as a spam message, please . Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .