问题
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:
download php_apc-3.1.9-svn20110915-5.3-VC9-x64-win7-2008.zip from http://www.mediafire.com/php-win64-extensions
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
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