SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard subnet_rx's Avatar
    Join Date
    Aug 2001
    Location
    Hattiesburg, MS
    Posts
    1,085
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Anyone use Smarty here?

    Quick question: In the manual, it says to setup the core directory, which I'm guessing is libs, outside the main html directory, so that the browser can't access it. As a matter of fact, it puts all files outside, except the actual files to be displayed.

    My question is, how would you distribute a script that uses smarty using this structure?

    It makes sense to me just to have libs, cache, config, templates_c, and templates all in the main directory of your script. Something wrong with this?

  2. #2
    SitePoint Member
    Join Date
    Sep 2004
    Location
    Moscow, Russia
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could restrict access to core directory using internal apache instructions in .htaccess file.

  3. #3
    SitePoint Wizard subnet_rx's Avatar
    Join Date
    Aug 2001
    Location
    Hattiesburg, MS
    Posts
    1,085
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    maybe I don't understand something about apache, shouldn't a 700 or even a 770 restrict everyone else from reading the files or doesn't that somehow lock out the script from reading itself?

  4. #4
    SitePoint Zealot
    Join Date
    Aug 2004
    Location
    Madison, WI
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    php accesses includes and does other shell activities through a user on the system, just like everyone else (usually it is something like "nobody" or "httpd" or something)...anyway, unless the user as who php runs happens to be the same as yourself, then 700 won't work...unless php happens to be in your group, then 770 won't work...generally, the only way to allow php to write/read to files is to make the files world-writeable/readable, which could cause problems unless they are in directories above your site root


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •