WebFaction
Community site: login faq

Hi there,

A beginner here....

I'm trying to learn PHP and in the process make use of the Smarty template engine. So far so good. I've got MAMP installed on my Mac and have got a really basic 'hello world' working, however when I try to deploy it to to my site I get the error:

require(./Smarty/Smarty.class.php): failed to open stream: No such file or directory....

The Smarty libs are in a folder of the same name in the root folder of the website and works fine on MAMP, but not on the site. I'm guessing it is some kind of permissions problem, but I have no idea where to begin...

Any help would be much appreciated.

Jim.

asked 25 Oct '12, 12:47

jim2007
323
accept rate: 0%


I can think of two possibilities:

  • Your Smarty directory might be named "smarty". The default Mac OSX filesystem is not case-sensitive with regards to filenames, but the filesystem on your WebFaction server is. If that's the case, then try using "require('./smarty/Smarty.class.php')" in your code, instead of "require('./Smarty/Smarty.class.php')"
  • Your app might be confused about its own location. To fix that, you can set your PHP document root to whatever it needs to be (eg, the parent directory of your Smarty directory) by following the instructions in our documentation: Configuring DOCUMENT_ROOT

Hope that helps!

permanent link

answered 25 Oct '12, 16:05

seanf
12.2k42136
accept rate: 37%

Thans, it was the first one - Mac is not case-sensitive....

permanent link

answered 27 Oct '12, 15:15

jim2007
323
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×263
×1

question asked: 25 Oct '12, 12:47

question was seen: 3,344 times

last updated: 27 Oct '12, 15:15

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM