WebFaction
Community site: login faq

Is there a general answer as to whether PECL extensions are compatible with Static/PHP? If so, is there a set of Webfaction-specific installation instructions. NOTE TO WEBFACTION: I recommend deprecating memcache and adding memcached to your standard PHP. Both extensions implement libmemcached, but memcached is more capable.

asked 10 Jun '15, 20:17

bvbb
11816
accept rate: 0%

edited 11 Jun '15, 07:20


Yes, you can build PECL extensions and use them in our standard PHP environment.

The basic procedure to download and build an extension goes like this (I'm using PHP 5.6 - if you're using something different then change "56" to whatever you need. My hypothetical extension is called "whatever"):

mkdir ~/{tmp,src,php56-exts}
export TMPDIR=~/tmp
ln -s /usr/local/lib/php56/extensions/no-debug-non-zts-*/* ~/php56-exts/
cd ~/src
wget http://pecl.php.net/get/whatever-1.2.3.tgz
tar zxf whatever-1.2.3.tgz
cd whatever-1.2.3
phpize56
./configure --with-php-config=/usr/local/bin/php56-config
make
cp modules/whatever.so ~/php56-exts/

At this point your extension is built. To configure your app to use it, add the following lines to the app's php.ini or .user.ini (you can create the file if it doesn't already exist):

extension_dir = /home/your_username/php56-exts
extension = whatever.so

Hope that helps! Please let us know if you need anything else.

permanent link

answered 10 Jun '15, 23:58

seanf
12.2k42136
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×265
×10
×1
×1

question asked: 10 Jun '15, 20:17

question was seen: 2,522 times

last updated: 11 Jun '15, 07:20

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM