owatagal Posted March 3, 2005 Share Posted March 3, 2005 Does it take any extra server resources to call on files that are above /public_html/? I've moved some password and permissions-based navigation menus there, and I'd like to move all my PHP scripts up--it's not so much that they're sensitive info as I want my scripts in once place. The files call them in as includes anyway, and I generally use a full path -- /home/username/public_html/folder/include.php -- so this wouldn't change anything in terms of the numbers of includes I use or how the scripts actually run. But if for some reason the server can include files faster or with less resources when they're in /public_html/, I can leave the bulk of my scripts there and play with .htaccess or something to block off a folder. I'd just prefer keeping it all together to spreading it across two sections of the site. Quote Link to comment Share on other sites More sharing options...
stevevan Posted March 3, 2005 Share Posted March 3, 2005 I would think that the increase (if any) wouldn't be all that noticable...unless you're running some highly intensive processes. I have all of my sql password files located in a directory off of public_html and haven't had any problems (that I know of anyway). If I'm incorrect, I'm sure someone will let us know. Quote Link to comment Share on other sites More sharing options...
borfast Posted March 3, 2005 Share Posted March 3, 2005 owatagal, there is no difference at all, you can place the PHP files that to be included anywhere in the filesystem, as long as the webserver can read them Moving for organization. Quote Link to comment Share on other sites More sharing options...
owatagal Posted March 3, 2005 Author Share Posted March 3, 2005 Thanks guys! That's good to know! Quote Link to comment Share on other sites More sharing options...
schussat Posted March 3, 2005 Share Posted March 3, 2005 owatagal, there is no difference at all, you can place the PHP files that to be included anywhere in the filesystem, as long as the webserver can read them My understanding is that *data* may be located outside of the public_html tree, but scripts that a user actually wants to execute via http have to be in the public_html tree. Otherwise, the web server can't actually read them -- or am I off base? For example, .htpasswd files and berkeley DB files for MovableType are stored outside of the public_html path, but the actual CGI files (same for PHP, I assume) need to be web-readable and therefore somewhere inside of public_html. So, some of the files that owatagal wants to include should be fine residing just about anywhere, but not the scripts. Right? Quote Link to comment Share on other sites More sharing options...
owatagal Posted March 3, 2005 Author Share Posted March 3, 2005 The PHP scripts are running fine in the the private folder, so it must be a difference between PHP and whatever runs in CGI (Perl? who knows. I never did CGI stuff). I'm able to do all my user authentication, data checks, database queries, etc, and keep the files for them out of the /public_html/ folder. Which I like. A lot. Quote Link to comment Share on other sites More sharing options...
borfast Posted March 4, 2005 Share Posted March 4, 2005 Exactly, I probably should have explained that better. PHP files that you want your visitors to access need (obviously) to be under the public_html directory. If some files are not supposed to be accessed by your visitors, then you can move them into a directory outsite public_html, which can be considered indeed a good security measure, as owatagal is saying Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.