Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You don't. Watch:

  wget http://www.php.net/get/php-5.3.16.tar.gz/from/us2.php.net/mirror -O php-5.3.16.tar.gz
  tar zxvf php-5.3.16.tar.gz
  cd php-5.3.16/ext/pcntl
  phpize
  ./configure
  make
  sudo make install
At this point you should see a pcntl.so in your extension_dir. Add an extension=pcntl.so to your php.ini file and you are good to go.

Of course with non-bundled extensions from pecl or github you can skip the tarball step.



That's no less omplicated than downloading the PHP source and recompiling with the --with-pcntl flag. Now compare that, just for your own wonderment, to how it works in other modern languages..

pip install package_name or gem install package_name

not to mention, with bundler and virtualenv you can easily, easily keep multiple versions of different packages for different projects without any juggling and hacking your way through.


Easily? I remember having quite some difficulties getting gems with binaries to work on Windows (meaning: lots of wrestling before I even got the MySql driver working). Might be different now though but I have never experienced anything like that when dealing with PHP extensions or Composer packages.


That is only because you picked an internal extension that is usually already built-in. If you install the php-cli package from any major distro it includes pcntl. For normal extensions you either do an apt-get install php-imap (for example) or a pecl install stem if your distro hasn't packaged the extension you need or you just prefer to install it directly.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: