Where to place php libraries/extensions?
Posted
by
gdaniel
on Pro Webmasters
See other posts from Pro Webmasters
or by gdaniel
Published on 2014-05-27T19:45:25Z
Indexed on
2014/05/28
4:05 UTC
Read the original article
Hit count: 231
php
|configuration
I am new to a lot of server configurations and options. I want to add extra php libraries/extensions to my server. Where do I add them? (I am on a CENTOS 6.5 VPS)
For example, I want to add the phpseclib php extension:
Their website instructions are minimum:
Usage This library is written using the same conventions that libraries in the PHP Extension > and Application Repository (PEAR) used to be written in (current requirements break PHP4 compatibility). In particular, this library needs to be in your include_path:
<?php set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib'); include('Net/SSH2.php'); ?>
It tells me how to use it, but it doesn't tell me where to add the actual extension files. Should I added it under?
usr/local/lib ?
usr/local/lib/php ?
usr/local/lib/php/pear ?
Or can I add it under public_html? Also, my VPS has several users under /home/.. is that away to make the library available for only one user?
© Pro Webmasters or respective owner