Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

$> cd YOUR_DOWNLOAD_DIR
$> 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

1 Answer 1

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.

<?php
phpinfo();

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

 
discard

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.