简体   繁体   中英

Using PHP Printer functions in PHP Desktop application

In XAMPP environment

I develop and test my PHP code in XAMPP environment (local) and it success.

In PHP Desktop environment

I already copied the php_printer.dll into the ext folder and include this line extension=php_printer.dll in the php.ini file.

I also moved my folder from htdocs (XAMPP environment) to the www folder (PHP Desktop environment) but when I run the phpdesktop-chrome.exe it shows ...undefined function printer_list()... so I knew that it cannot recognize the library.

My question

How do I configure PHP Desktop to recognize the php_printer.dll as similar to my XAMPP behavior?

Update 1

php_printer.dll failed to load. By the way how do I identify my php_printer.dll version whether it match PHP Desktop or not? Thank you. 在此输入图像描述

Update 2

Okay I have the version as below:
PHP Desktop : phpdesktop-chrome-57.0-rc-php-7.1.3
php_printer.dll: php_printer-php5.6.30

PHP extensions are often intended for specific PHP versions (eg. 5.12.xx and Thread-safe or non-thread-safe). If your extension doesn't match specific php version it won't work. In such case you should see a startup error if you enable it in php.ini.

For detecting problems during PHP startup see:

  1. https://github.com/cztomczak/phpdesktop/wiki/Knowledge-Base#problem-running-php-script

  2. https://github.com/cztomczak/phpdesktop/wiki/Knowledge-Base#error-500-internal-server-error-cgi-program-sent-malformed-or-too-big-16384-bytes-http-headers

Update

Your extension is for php 5.6.30, so you should download that specific php version, see: https://github.com/cztomczak/phpdesktop/wiki/Knowledge-Base#php-interpreter--extensions

Try non-thread-safe version first and then thread-safe version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM