Jump to content

installing smarty


nkoronka

Recommended Posts

Hi there,

I wonder if anyone can help me. I'm trying to install smarty. The problem I'm having is in choosing the correct path directory for-

 

require('/usr/local/lib/php/Smarty/Smarty.class.php');

 

Granted I am relatively new to coding.

 

I've tried using-

 

<?php echo $_SERVER['DOCUMENT_ROOT']; ?>

 

which returns-  /usr/local/apache/htdocs

 

I think the problem is in understanding what my local directory is. In my ftp program, the first folder looks like this

 

firstfolder/

    public_html/  (  < I've installed smarty in this one)

    DO_NOT_UPLOAD_HERE.txt

 

When I run a test file index.php, I get the following error-

 

Warning: require() [function.require]: open_basedir restriction in effect. File(/usr/local/public_html/lib/php/Smarty/Smarty.class.php) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/a4808331/public_html/index.php on line 4

 

What I've put in my index.php file so far which I'm sure is wrong is-

 

require('/usr/local/public_html/lib/php/Smarty/Smarty.class.php');

 

 

If you need more info I'd be happy to supply.

 

Thanks in advance for your help.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.