Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to properly install smarty on my VPS I have plesk and I'm not sure if I need to doe this in plesk or from command line or ftp

the simple instructions says to

$> gtar -zxvf Smarty-3.0.tar.gz
$> mkdir /usr/local/lib/php/Smarty
$> cp -r Smarty-3.0/libs/* /usr/local/lib/php/Smarty

however this /usr/local/lib/php/ directory doesn't exist so I'm not sure where to put it and if there is a better way of installing via plesk ?

share|improve this question
up vote 3 down vote accepted

I am not sure the where default include paths are on Centos, rather then me looking it up for you, let me tell you one simple way you can figure this out.

Simply setup a standard phpinfo script, and go look at the output.


The important detail to find will be in the core section, and you are looking for the item labeled include_path. Any PHP file in this list of directories will be able to loaded without explicitly using the full path.

With that in mind you have some options:

  • You could copy the Smarty files in one of these folders.
  • You could symlink Smarty into one of these folders from the /usr/local/lib/php location, if you want to keep the stuff installed by packages and stuff you installed from source separate (PROTIP, this is a good thing)
  • You could simply update the php configuration and add your new /usr/local/lib/php path into the include_path
share|improve this answer
right now it jsut show .: which seem off to me ? – mcgrailm Jan 29 '12 at 21:51
Maybe CentOS doesn't setup any default include PATH, I am not a regular CentOS user, so I don't know. Just go find your PHP.ini and see what is configured, then fix it. – Zoredache Jan 29 '12 at 22:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.