root folder?

Please post all install related problems here. Visit this forum first for troubleshooting.
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Re: Root Folder

Post by DeXXus »

gogoguerilla wrote:I hope this makes sense as this issue is the main thing keeping from getting going with the site.
Please let me know if you need clarification. THANKS!
I think I would like some clarification as to what you are shooting for and ~why~ :?
This thread has gone full circle (maybe even... 720 degrees) and almost sounds like building an H-bomb... just to blow-up an anthill. :lol: Don't hesitate to share your "phpinfo", your "config.inc.php" and/or your actual domain info (as much as you can)
gogoguerilla wrote:I understand that I can install the contents of the phpwcms folder into the root of my site; however, these are files I would call "private" - meaning that only site administrators/authors need or have access to them.
What files are you talking about having access to here? Your website's "non-phpWCMS" files? Are you hoping to prevent directory "browsing" when you refer to being "private" files?

Or do you mean the "actual" phpWCMS root files such as "index.php", "phpwcms.php", "login.php", "browser_image.php", etc. ? NONE of these files EVER change (except when you update the script) or CAN be changed, except via FTP. (That is... if file permissions are in place to prevent malicious execution or alteration.)
Instead... phpWCMS relies on the mySQL database and several subfolders of the "install" to provide the "content" and "execution" functionality that PHP then "serves up" to a user's browser (whether frontend or backend).

The administrators/authors, to which you refer, would need to have your valid user/password access to the actual webspace, in order to "alter" or "execute" files. "Content" changes/additions made by "valid" administrators/authors of your site's installation of phpWCMS (as defined by you) are written into the database and/or stored to the designated subfolders... NOT "written" or "output" to the so-called "root" of phpWCMS.

And do you mean in your webspace's "actual" document root? Or the folder you have "pointed" your domain to? The difference is an important consideration.

The "phpinfo" function should reveal the "actual" ENVIRONMENT variables such as DOCUMENT_ROOT, PATH_TRANSLATED, SERVER_NAME, etc. These are ~important~ components that phpWCMS refers to (in some cases), within it's code, in conjunction with ~your~ settings of "config.inc.php" for purposes (at one point, described by ionrock) of "including" external files/functions, referencing locations for images, and basicly... correlating the various elements and phases necessary to operate as a CMS (read "frontend" and "backend").

gogoguerilla wrote:In order to keep my server clean (and organized), it would be nice if I could keep all the phpwcms files in a SEPARATE folder than the actual public files (which would be located in the root folder). When I need to login, I can just go to the subfolder. Edited/posted content would be published to the public files.
If you are referring to downloads that you want to make available to visitors... phpWCMS file permissions are coupled with the admin settings for "public" versus "private" -and- the "hidden" setting for categories and articles to accomplish a system of controls.
gogoguerilla wrote: Here is my idea: Is there a way possibly to change the way the files are published so that they publish to a different directory than the one that the phpwcms folder is installed in?
:?:
After reading your follow-up, It's -=likely=- that I've missed your desired intention COMPLETELY and ask in advance your tolerance of my rambling :oops: It's way late here and I shouldn't be trying to form coherent thoughts :wink: It could be that, as ionrock stated, simply "massaging" a ".htaccess" file can accomplish what you need. I'll try to get back to this thread to "learn" more from all who participate. Hang in there!!!
@ionrock
BTW, thanks for your -kind- evaluation of my "helper" mentality, as it relates to the "non-design" aspects of getting this great script working for folks. I truely believe it's success and evolution will "shine" as users can let the creativity flow. But, that requires getting the script running for as many as possible. I guess I'm just a "stubbornly-proactive" logician. (Jack of all Hacks) :arrow: G'night
ionrock
Posts: 279
Joined: Fri 20. Feb 2004, 17:04

Post by ionrock »

I sent a PM to gogoguerillla which essentially said it is not really necessary to do what he is trying to do :) It just sounded like a good thing to discuss so maybe someone else could use the info help make phpwcms work for them.

I do think that a basic install is the best way to go the same as DeXXus does. I also think it would be interesting to look into how someone could do something like managing multiple sites using one phpwcms installation. The reason this is of interest is that the company I work plans on using phpwcms for most all new sites so having one install that each site works from would be very helpful for things like upgrades and backups (just one database for many sites :)). This kind of functionality could use a system that is out of reach of the server and this was what it seemed gogoguerilla was looking for. I could easily be wrong b/c I honestly don't get to read all the posts as well as I would like (especially the german ones ;)).

In any sense I just hope someone walks away from the discussion learning a little something.

@DeXXus - I hope you don't think I see you as a "helper" b/c I really think you do a ton more. You give very clear answers to people that not only help the person asking the questions but also the people who take the time to search the forums for answers before even asking. I know I always appreciate your clarity. It goes beyond being a mere "helper" and enters into a real "leader" role IMO. So keep up the good work and how about letting us know about your website :) I have never seen a mention of it.
gogoguerilla
Posts: 29
Joined: Mon 12. Apr 2004, 01:22

Post by gogoguerilla »

Hey peeps...

Thanks for the follow ups. I realize now that I was being a bit vague as to my intent for all this mess (partly because I was stil trying to clear it out in my own head). As you can probably guess, I'm pretty non-PHP savvy; however, I'm in the process of learning and am hoping this whole experience helps a bunch. I do appreciate the follow ups and of course am very patient - just as you guys have been with my newbie self.

So...

My initial reason for wanting to have the index.php in a different directory than all the wmcs "stuff" was because I'm a bit of a neat freak. I don't like clutter - especially since this particular site is potentially going to get big - so the less chaos in the home (root) directory, the better.

Attempting to do a .htaccess or change the "web dir" on my server are both feasible options; however, don't necessarily remedy the core issue - making index.php and all other actual (public) site content the only thing in the root.

I'm obviously a little concerned over security - considering that the conf file has our SQL database password, but I'll get over it.

So that was the initial crack idea that got me into this mess :)

Then of course, I made the mistake of letting my brain go, and then I started having thoughts of allowing wcms to provide for multiple sites (as ion mentioned). We have about 4 sites hosted on the same account (and same server & user directory)... My dream would be to have all of them be able to interact with eachother (as they all have some crossover). Problem is that I don't think I'm knowledgeable enough to undertake such a task at this point. Does anyone have any pointers on what books/languages (programming) I should brush up on in the mean time?

I'll include my conf file (as it is now having been edited with the $phpwcms["php_root"] tag. I read and re-read your post, Ion, but don't quite understand that actual context of this variable. When would I actually use it? When linking in site content, or in phpwcms "helper" or conf files?

For anyone who wants to look at my fouled install, you can view the ftp at:

ftp://ouzo.dreamhost.com
wcmspeeps
adminpassword

or login to the wcms at:

http://www.myhomegateway.com/wcms/login.php
wcmspeeps
adminpassword

or see the actual page at:

http://www.myhomegateway.com/wcmsindex.php

(The ftp login may not work straight away (the server takes a couple minutes), but I'm only gonna keep this up for a couple of days.)

Thanks again for everyone's help!

Code: Select all

<?

// database values
$phpwcms["db_host"]           = "mysql.fhicda.com";
$phpwcms["db_user"]           = "phpwcms";
$phpwcms["db_pass"]           = "h3lLoSqL";
$phpwcms["db_table"]          = "fhi";
$phpwcms["db_prepend"]        = "";
$phpwcms["db_pers"]           = 1;

// site values
$phpwcms["site"]              = "http://www.myhomegateway.com/";
$phpwcms["admin_email"]       = "emailaddress@thisisfakesoidon'tgetspam.com";

// paths
$phpwcms["root"]         	  = "wcms";         //default: ""
$phpwcms['php_root']		  = "..";
$phpwcms["file_path"]         = "../../phpwcms_filestorage";    //default: "phpwcms_filestorage"
$phpwcms["file_tmp"]          = "phpwcms_tmp";     //default: "phpwcms_tmp"
$phpwcms["templates"]         = "phpwcms_template";    //default: "phpwcms_template"
$phpwcms["dir_thlist"]        = "thumb_list";   //default: "thumb_list"
$phpwcms["dir_preview"]       = "thumb_preview";  //default: "thumb_preview"
$phpwcms["content_path"]      = "content"; //default: "content"
$phpwcms["cimage_path"]       = "images";  //default: "images"
$phpwcms["ftp_path"]          = "phpwcms_ftp";     //default: "phpwcms_ftp"

// content values
$phpwcms["file_maxsize"]      = 2097152; //Bytes (50 x 1024 x 1024)
$phpwcms["content_width"]     = 625; //max width of the article content column - important for rendering multi column images
$phpwcms["img_list_width"]    = 100; //max with of the list thumbnail image
$phpwcms["img_list_height"]   = 75; //max height of the list thumbnail image
$phpwcms["img_prev_width"]    = 538; //max width of the large preview image
$phpwcms["img_prev_height"]   = 400; //max height of the large preview image
$phpwcms["max_time"]          = 2400; //logout after max_time/60 seconds

// other stuff
$phpwcms["compress_page"]     = 0; //0 = OFF, 1-9: page compression ON (1 = low level, 9 = highest level)

// debugging timer
$phpwcms["timer"]             = 0; //is for displaying a how long it needs to create

$phpwcms["imagick"]           = 0; //0 = GD,  1 = ImageMagick convert
$phpwcms["imagick_path"]      = ""; //Path to ImageMagick (default="" - none)
$phpwcms["use_gd2"]           = 1; //0 = GD1, 1 = GD2
$phpwcms["rewrite_url"]       = 0;  //whether URL should be rewritable
$phpwcms["wysiwyg_editor"]    = 2;  //0 = no wysiwyg editor, 1 = HTMLarea, 2 = FCKeditor, 3 = browser based
$phpwcms["phpmyadmin"]        = 1;  //enable/disable phpMyAdmin in Backend
$phpwcms["default_lang"]      = "en";  //default language
$phpwcms["charset"]           = "iso-8859-1";  //default charset 'iso-8859-1'

// dynamic ssl encryption engine
$phpwcms["site_ssl_mode"]     = '0'; // tuns the SSL Support of WCMS on(1) or off (0) DEFAULT '0'
$phpwcms["site_ssl_url"]      = '';  //URL assigned to the SSL Certificate. DON'T add a slash at the End! Exp. "https://www.yourdomainhere.tld"
$phpwcms["site_ssl_port"]     = '443'; //The Port on which you SSL Service serve the secure Sites. Servers DEFAULT is '443'

// smtp values
$phpwcms['SMTP_FROM_EMAIL']   = 'fake@again.com'; // reply/from email address
$phpwcms['SMTP_FROM_NAME']    = 'wcms admin'; // reply/from name
$phpwcms['SMTP_HOST']         = 'localhost'; // SMTP server (host/IP)
$phpwcms['SMTP_PORT']         = 25; // SMTP-Server port (default 25)
$phpwcms['SMTP_MAILER']       = 'sendmail'; // default phpMailer: smtp, mail (default), sendmail
$phpwcms['SMTP_AUTH']         = 1; // sets SMTP_AUTH to ON/OFF
$phpwcms['SMTP_USER']         = ''; // default SMTP login (user) name
$phpwcms['SMTP_PASS']         = ''; // default SMTP password


?>
User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

change doc root -- move phpwcms to a subfolder of root

Post by anthony.abraira »

I have been having some difficulty upgrading the 1.2.5 database to the more up to date 1.2.8 or 1.2.9 release of the software. I was wondering if it was posslble to quickly point the root setup in the conf.inc.php to the following or something like this. I am not very good with code syntax, but it should illustrate my point.

1. First (like that redudancy), I create a folder called 'old' in the root of the site.
2. Go to the conf.inc.php file and change it to the following settings:

Code: Select all

// site values
// $phpwcms['site']              = 'http://'.$_SERVER['SERVER_NAME'].'/';
$phpwcms['site']              = 'http://'.$_SERVER['SERVER_NAME'].'/old/';
$phpwcms['admin_email']       = '';

// paths
// $phpwcms['DOC_ROOT']          = $_SERVER['DOCUMENT_ROOT'];
$phpwcms['DOC_ROOT']          = $_SERVER['DOCUMENT_ROOT'].'/old/';
I commented out the originals, in case it screwed anything up. Now I move all the files inside the 'old' folder as set up above. Would that work. Cause then I can migrate the new version of the software and since the site is getting a face lift, its no biggie that I lose the work that went on the original one.

If there is a post that addresses this question, I'd appreciate a point in the right direction.

Peace
aa

8)
"The trick is living without an answer."
User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

Folder 'img' icons not appearing

Post by anthony.abraira »

I tried installing a seperate copy of phpwcms within the root folder. This folder is going to be password protected and figured it would be the easiest way to run a more secure section of the site. Currently the settings are as follows:

Code: Select all

// paths
$phpwcms['DOC_ROOT']          = '/home/content/s/p/o/spotlightla/html/';         //default: $_SERVER['DOCUMENT_ROOT']// real DOC_ROOT seems to be: '/home/content/s/p/o/spotlightla/html//inc' 
$phpwcms['root']         		= 'planner/';         //default: ''
$phpwcms['file_path']         = 'filearchive';    //default: 'filearchive'
$phpwcms['templates']         = 'template';    //default: 'template'
$phpwcms['content_path']      = 'content'; //default: 'content'
$phpwcms['cimage_path']       = 'images';  //default: 'images'
$phpwcms['ftp_path']          = 'upload';     //default: 'upload'
Though everything seems to be running fine, the system's icons located in the 'img' directory are appearing as broken links on the frontend. I tried changing the root by adding "planner/" to the end but that created this error:

Code: Select all

Warning: main(/home/content/s/p/o/spotlightla/html/planner/planner//include/inc_lib/dbcon.inc.php): failed to open stream: No such file or directory in /home/content/s/p/o/spotlightla/html/planner/index.php on line 57

Fatal error: main(): Failed opening required '/home/content/s/p/o/spotlightla/html/planner/planner//include/inc_lib/dbcon.inc.php' (include_path='.:/usr/local/lib/php') in /home/content/s/p/o/spotlightla/html/planner/index.php on line 57
I noticed that when I password protected the directory a lot of other icons were not showing up. Disabling the .htacess and .htpasswd files fixed that problem, but these are still not appearing on the front end.

Running on 1.2.9 ~ any ideas?

Thanks

aa
"The trick is living without an answer."
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

try to remove the Slash at the end in

Code: Select all

$phpwcms['root']               = 'planner/'; 
to

Code: Select all

$phpwcms['root']               = 'planner'; 
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
Post Reply