Creating php DLL from pecl source files

可紊 提交于 2019-12-08 07:24:43

问题


How can i build a DLL file from a PECL source file.

I need to build DLL for APC extension from PECL source (http://pecl.php.net/package/APC)


回答1:


  1. download php_apc-3.1.9-svn20110915-5.3-VC9-x64-win7-2008.zip from http://www.mediafire.com/php-win64-extensions

  2. Enable the APC extension in your PHP.INI file. Edit the php.ini file and add the following line in the extensions section: extension = php_apc.dll

  3. Restart apache / iis and look at the output of phpinfo.




回答2:


If you are on Linux life is easy :) The pecl command does the work for you. It will download the sources, compile them and install the extension.

On Linux type in your terminal as root:

pecl install apc

After installation you should make sure that your php.ini contains the line

extension=apc.so

But when reading your post (you tell about dll) I have to assume that you are using Windows. I've never compiled a PHP extension on Windows. But you may start here to investigate.

Before trying to compile for myself I would try to find a precompiled windows apc.dll for your PHP version. You can find some here. You'll just have to download the extension and place it in your PHP extension folder. Then you'll have to add the following line to your php.ini:

extension=apc.dll


来源:https://stackoverflow.com/questions/14228341/creating-php-dll-from-pecl-source-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!