Server Site Management (v0.30)
#1
Posted 10 March 2008 - 02:57 AM
WinBuilder Browser, is a self-contained projects file browser, uploader and list updater. It allows the "one-touch" creation and updating of a detailed projects listing (updates.ini) for use by WinBuilder.exe for versioning and other tracking of script files. It requires no external tools or databases for any of its functions.
Installation is quite straightforward. Please see the README.txt file (partially reproduced below) for details. The most critical elements are the settings for absolute (/...) project directory paths and for server security based on selective logins that control each user's access levels (browse, upload, delete) for each of the projects subfolders. By default, the "anonymous" user has no assigned password ("") and can only browse specified subfolders as authorised. To allow unrestricted browsing of the entire projects base and all subfolders, simply set $allowBrowse[#] = array('*') for the anonymous user. If you wish to have all of your site's visitors logged in automatically with anonymous user access, set $autologin = TRUE.
WinBuilder Browser is fully compliant with all applicable W3C XML and CSS standards. ALL of its appearance features, including inserts for the page header, body and footer as well as the values for all CSS style elements are configurable via the config.php file. My own demo/test installation is merely one very minor example of the total range of site customization that is possible. So, if you hate the way the demo looks, don't worry about it. You can make your own installation appear any way you want it to, from dull basic black to flaming orange with animations and sound. Reviewing the necessary and relevant W3C standards is a good exercise for developers anyhow.
PLEASE NOTE: With this "official" release of version 0.30 the listing file updater parameter is now set to "updates.ini" to conform with current WinBuilder v0.74 usage. So, unless that is changed, it will overwrite your existing updates.ini file. Other changes in this release are as follows:
- Addition of FTP mkdir capability within projects subfolders
- Addition of FTP rmdir capabilty for empty subfolders only
- Left clicking on listed files opens new window (target="_blank" is non-W3C compliant, but W3C is just wrong on this one)
- Autologin option for anonymous user "on arrival" added to config.php (does not affect browsing control by administators)
View/test DEMO INSTALLATION (admin testing - username: admin - password: admin). Uploads are FTP (not PHP limited) but PLEASE don't abuse the demo too much! You can DOWNLOAD the simple installation package and use your own site for more extensive testing. Comments may be offered here below or on my own VIRtech forums under the general discussion category. If you really must email me privately, my website has contact info.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
From the README.txt file included in the download.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
INSTALLATION:
- - - - - - -
1. Open the self-documented config.php file in your favorite text editor and
a. edit the user site settings as appropriate for your site;
b. change/add subdirectories as appropriate for your site;
c. change/add user login settings, especially the admin login password;
d. optionally modify the browser display settings as desired;
e. optionally modify the page body, footer, header and CSS styles as desired.
2. Recheck and ensure that the config.php settings match your server's absolute HTTP and
FTP login paths (/...) for the WinBuilder projects base directory. Note that they are
not necessarily identical. In many cases, FTP logins do not originate in the web site's
HTTP base folder. Administrators may choose to create and use an FTP account that logs in
directly to the WB projects base directory, in which case it's simply $ftp_basedir='/';.
3. Copy the "index.php" and "config.php" files to any web site folder (existing or new) on
your server. They need not be located in your WinBuilder projects folder.
- - - - - - -
PLEASE NOTE:
- - - - - - -
The $autologin setting in the config.php file determines whether your site's visitors are
automatically logged in as "anonymous" on arrival. If $autologin is set TRUE, other users
must click the "Log In/Out" link in order to log in with their own assigned access privileges.
The $allowBrowse[#] scope and other access control settings for the "anonymous" user continue
to apply regardless of whether $autologin is set TRUE or FALSE. The scope may, of course, be
unrestricted [array("*")] at the administrator's discretion.
#2
Posted 10 March 2008 - 10:12 AM
#3
Posted 10 March 2008 - 12:32 PM
The my ftp server contains:
- logs
- Maildir
- native.boot-land.net (nativeEx web pages)
- nativeex.boot-land.net (Winbuilder projects)
- + LiveXP
- - LiveXP20070731
- + nativeEx_barebone
- + nativeEx_BSOR
- - nativeEx_Core
- + nativeEx_moa-lite
- Tools
- psc.boot-land.net (some old stuff)
Is there a way to manage this in config.php?
I did not find one until now. I always get all folders in update.txt
Last unsuccessful trial with only 2 subfolders:
<?php ///////////////////////////////////////////////////// // WinBuilder projects site settings ///////////////////////////////////////////////////// $website_homepage = 'http://psc.boot-land.net/'; //your web site (or other) home page link URL $website_logolink = 'http://boot-land.net/images/WinBuilder.gif'; //site logo image $website_logotext = 'Welcome to WinBuilder Browser'; //alternate text for site logo image $ftp_server='psc.boot-land.net'; // WB server FTP internet address $ftp_user_name='******'; // WB server FTP login name for "allowUpload" users $ftp_user_pass='******'; // WB server FTP login password for "allowUpload" users $ftp_basedir='/nativeex.boot-land.net/'; // WB projects directory absolute FTP path $http_basedir='/nativeex.boot-land.net/'; // WB projects directory absolute HTTP path $base_displayname = "WB Projects"; // WB projects directory browser base display name ///////////////////////////////////////////////////// // Subdirectories below WinBuilder projects base directory // "subdir[]" - subdirectory subordinate path (*nix case sensitive) // "subname[]" - subdirectory display name shown in user selection box ///////////////////////////////////////////////////// $subdir[1] = "nativeEx_barebone/"; $subname[1] = "nativeEx_barebone"; $subdir[2] = "nativeEx_Core/"; $subname[2]= "nativeEx_Core";
Peter
#4
Posted 10 March 2008 - 01:29 PM
Yes, it certainly looks as if they should. Your settings do appear correct based on your site structure. Is that web root location PHP writable? Any error messages?+ should appear in the download function of WinBuilder / update.txt, - should not.
Maybe you've found my first PHP programming "bug" for this application. Based on those absolute path configuration entries plus its own ($_SERVER['PHP_SELF']) location, it needs to calculate the relative path to the main (parent of all projects) folder.
Perhaps my relative path calculation subroutine isn't quite what it should be. I did it that way in an effort to avoid the need for any "real path" (i.e., from the actual server root) in the config set-up. But I've never actually tried it out with the web site's base folder set as the absolute HTTP and FTP paths to WindBuilder's main projects folder. I'll run a test that way as soon as I can and get back to you. Where did you install the browser's index.php and config.php files on your nativeex.boot-land.net server?
#5
Posted 10 March 2008 - 01:33 PM
In /nativeex.boot-land.netYes, it certainly looks as if they should. Your settings do appear correct based on your site structure.
Maybe you've found my first PHP programming "bug" for this application. Based on those absolute path configuration entries plus its own ($_SERVER['PHP_SELF']) location, it needs to calculate the relative path to the main (parent of all projects) folder.
Perhaps my relative path calculation subroutine isn't quite what it should be. I did it that way in an effort to avoid the need for any "real path" (i.e., from the actual server root) in the config set-up. But I've never actually tried it out with the web site's base folder set as the absolute HTTP and FTP paths to WindBuilder's main projects folder. I'll run a test that way as soon as I can and get back to you. Where did you install the browser's index.php and config.php files on your nativeex.boot-land.net server?
Additional info:
Sometimes I get a warning about 'path does not exist, ...index.php line 300'.
In my system it is ' chdir($projects_dir);'
Peter
#6
Posted 10 March 2008 - 01:40 PM
Yup, that's it. It's relative path calculation isn't working for that structural arrangement. If you'll tell me where its own files are located on that server, I'll try to reproduce the set-up and fix the problem.Additional info: Sometimes I get a warning about 'path does not exist, ...index.php line 300'. In my system it is ' chdir($projects_dir);'
Peter
#7
Posted 10 March 2008 - 01:47 PM
Sorry, that's my lack in English.If you'll tell me where its own files are located on that server, I'll try ...
What are 'own files' here?
Peter
#8
Posted 10 March 2008 - 02:13 PM
Anyhow, it definitely should work under that arrangement. I'll have to poke around a bit on my own server to try to reproduce and pin down the problem. I'll get back to you ASAP.
P.S.: If I get my hands on this damned "Internal Server Error" mess here, I'm gonna kick the bloody thing off a very high mountain.
#9
Posted 10 March 2008 - 02:48 PM
Can it depend on my browser? I have Firefox with NoScript.Anyhow, it definitely should work under that arrangement. I'll have to poke around a bit on my own server to try to reproduce and pin down the problem. I'll get back to you ASAP.
Peter
#10
Posted 10 March 2008 - 03:36 PM
Definitely not. It was checked by both of us (Nuno and I) independently on both IE7 and Firefox and there was no problem at all with either browser. And, even if there were, it would just be some minor browser 'quirk', not any HTML output issue with W3C compliance. PHP script operations are server-side. So that shouldn't matter at all, although I think I do recall putting just a tiny bit of javascript "decoration" in somewhere. So you may find a little problem in some of the "fancy" stuff.Can it depend on my browser? I have Firefox with NoScript.
Peter
No, as usual, the problem is almost certainly "human error". Both of us. It was staring me in the face and I didn't see it either until I reproduced your set-up (the structure, not the content) on the http://browser.winbuilder.net/ site that Nuno kindly provided for me.
The absolute HTTP path setting should be simply $http_basedir='/' as it is the absolute path from the HTTP base, and, therefore, should not include the base URL itself. Likewise for the absolute FTP path which is from the FTP login base and does not included the FTP server address or URL. It, too, is probably just $ftp_basedir='/' but not necessarily. Only you can verify that.
Let me know how it goes, please. I'll be eagerly awaiting your answer.
#11
Posted 10 March 2008 - 03:44 PM
I already have had tried the '/' bases.The absolute HTTP path setting should be simply $http_basedir='/' as it is the absolute path from the HTTP base, and, therefore, should not include the base URL itself. Likewise for the absolute FTP path which is from the FTP login base and does not included the FTP server address or URL. It, too, is probably just $ftp_basedir='/' but not necessarily. Only you can verify that.
But to be sure, I tried again now: Same result as before.
I'll PM Nuno to give you temporary access to my ftp server psc.boot-land.net. I think this will make things easier.
Peter
#12
Posted 10 March 2008 - 04:07 PM
To make it a bit more clear:
Current config.php:
<?php ///////////////////////////////////////////////////// // WinBuilder projects site settings ///////////////////////////////////////////////////// $website_homepage = 'http://psc.boot-land.net/'; //your web site (or other) home page link URL $website_logolink = 'http://boot-land.net/images/WinBuilder.gif'; //site logo image $website_logotext = 'Welcome to WinBuilder Browser'; //alternate text for site logo image $ftp_server='psc.boot-land.net'; // WB server FTP internet address $ftp_user_name='******'; // WB server FTP login name for "allowUpload" users $ftp_user_pass='******'; // WB server FTP login password for "allowUpload" users $ftp_basedir='/'; // WB projects directory absolute FTP path $http_basedir='/'; // WB projects directory absolute HTTP path $base_displayname = "WB Projects"; // WB projects directory browser base display name ///////////////////////////////////////////////////// // Subdirectories below WinBuilder projects base directory // "subdir[]" - subdirectory subordinate path (*nix case sensitive) // "subname[]" - subdirectory display name shown in user selection box ///////////////////////////////////////////////////// $subdir[1] = "nativeEx_barebone/"; $subname[1] = "nativeEx_barebone"; $subdir[2] = "nativeEx_Core/"; $subname[2]= "nativeEx_Core";Browse etc. is ok.
The error message about non existing path disappeared.
But updates.txt still contains all subfolders, not only nativeEx_barebone and nativeEx_Core.
Peter
#13
Posted 10 March 2008 - 04:17 PM
Ahhhh! If that's the only remaining issue, it is working as designed. Or, as Mickeysoft might say, it's a feature, not a bug.But updates.ini still contains all subfolders, not only nativeEx_barebone and nativeEx_Core.
As it stands, the subdirectory browsing restrictions apply only to users. They do not apply to the .INI (or .TXT) file updating process which is purposely designed to include all subfolders of the main WinBuilder projects folder in its listing updates.
That can be changed (i.e., redesigned) in a future version update. But there are both pros and cons in doing so. Probably best to await some kind of consensus on the issue before changing that part of it.
#14
Posted 10 March 2008 - 04:19 PM
Ahhhh! If that's the only remaining issue, it is working as designed. Or, as Mickeysoft might say, it's a feature, not a bug.
As it stands, the subdirectory browsing restrictions apply only to users. They do not apply to the .INI (or .TXT) file updating process which is purposely designed to include all subfolders of the main WinBuilder projects folder in its listing updates.
That can be changed (i.e., redesigned) in a future version update. But there are both pros and cons in doing so. Probably best to await some kind of consensus on the issue before changing that part of it.
So it is currently not suited for my personal demand.
(BTW that was what I asked for in post #3 )
But I can be patient ...
Thanks
Peter
#15
Posted 10 March 2008 - 04:39 PM
Well, okay. I guess it was my lack of reading skills again. I took your principal issue to be a failure to locate what it should locate: "Sometimes I get a warning about 'path does not exist, ...index.php line 300'", etc. So I guess I didn't quite pick up the objection to its finding more than you wanted it to.(BTW that was what I asked for in post #3 )
It doesn't involve any very major "feature change", but, having asked for comments on v0.28, I'm just a little reluctant to alter it before getting a range of feedback. I could probably even make the behaviour optional, if it's a common issue. But that config.php file is getting pretty big already.
#16
Posted 10 March 2008 - 04:53 PM
In version v0.31, you should think about a GUI to maintain config.phpIt doesn't involve any very major "feature change", but, having asked for comments on v0.28, I'm just a little reluctant to alter it before getting a range of feedback. I could probably even make the behaviour optional, if it's a common issue. But that config.php file is getting pretty big already.
Peter
#17
Posted 10 March 2008 - 05:01 PM
It has one already, but the "ultimate edition" costs extra. It's called UltraEdit-32.In version v0.31, you should think about a GUI to maintain config.php
Peter
#18
Posted 10 March 2008 - 11:07 PM
No need to wait. I was able to accomodate your request with only a minor coding modification to the directory_array() function that doesn't alter the default behaviour of the current v0.28 beta.So it is currently not suited for my personal demand.
(BTW that was what I asked for in post #3 )
But I can be patient ...
If you re-download the installation package and open its config.php file, you will see a new $update_list_all item under the WinBuilder projects site settings heading. Just change that configuration setting from TRUE to FALSE (along with the other settings for your site) and re-upload the revised index.php and config.php files. It should then work the way you want it to ... I hope.
#19
Posted 11 March 2008 - 09:30 AM
No need to wait. I was able to accomodate your request with only a minor coding modification to the directory_array() function that doesn't alter the default behaviour of the current v0.28 beta.
If you re-download the installation package and open its config.php file, you will see a new $update_list_all item under the WinBuilder projects site settings heading. Just change that configuration setting from TRUE to FALSE (along with the other settings for your site) and re-upload the revised index.php and config.php files. It should then work the way you want it to ... I hope.
Yes, now only the selected folders are transferred to updates.txt
But there are three small complains:
- The conclusing [Updates] section still contains all folders.
That shows empty folders in WinBuilder Download - Subfolders are shown with their names only.
Old updates.ini sample:
[Updates\nativeEx_Core\Basic\Shells] nativeEx_Core\Basic\Shells\Addons=folder Explorer.Script=nativeEx_Core/Basic/Shells/Explorer.Script,207957425aa30372bc56faa18b2a0957,38,Explorer,... folder.project=nativeEx_Core/Basic/Shells/folder.project,0b07767e416470f381c0375876e8858a,1,folder.project,...
Same sample from updates.txt:
[Updates\nativeEx_Core\Basic\Shells] Addons=folder Explorer.Script=nativeEx_Core/Basic/Shells/Explorer.Script,207957425aa30372bc56faa18b2a0957,38,Explorer,... folder.project=nativeEx_Core/Basic/Shells/folder.project,0b07767e416470f381c0375876e8858a,,,...
That lets the scripts disappear in WinBuilder's download - As to be seen from above samples, in updates.txt '1,folder.project' is missing
I do not know whether this has influence on WinBuilder's download
Peter
#20
Posted 11 March 2008 - 03:21 PM
I see where the empty folders issue is coming from and it's very easy to deal with. The items_list() function just needs a small adjustment similar to the modification that I made in the directory_array() function. You can fix it yourself if you wish. It's at line 391 of the index.php code which currently reads as follows:
if($listtype == 'folders' || $listtype == 'all') $itemslist .= "$file=folder\n";Simply change that line to read as follows:
if(($listtype == 'folders' || $listtype == 'all') && ($update_list_all || in_array($file.'/', $subdir))) $itemslist .= "$file=folder\n";The other details have nothing to do with your variance request. They just got picked up from a little code snippet that I started with. They're not hard to change either, but I'm not sure whether they were deliberate or accidental. I'll need Nuno Brito's clarification on that.
#21
Posted 11 March 2008 - 03:35 PM
Okay. Looks like it's very close to fully accomodating your behavioural variance request. Just one more minor "tweak" needed.
I see where the empty folders issue is coming from and it's very easy to deal with. The items_list() function just needs a small adjustment similar to the modification that I made in the directory_array() function. You can fix it yourself if you wish. It's at line 391 of the index.php code which currently reads as follows:if($listtype == 'folders' || $listtype == 'all') $itemslist .= "$file=folder\n";Simply change that line to read as follows:if(($listtype == 'folders' || $listtype == 'all') && ($update_list_all || in_array($file.'/', $subdir))) $itemslist .= "$file=folder\n";The other details have nothing to do with your variance request. They just got picked up from a little code snippet that I started with. I'm not sure whether they're deliberate or accidental. I'll need Nuno Brito's clarification on that.
After making the change I get the message:
and the subfolders disappear from updates.txtWarning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.fluke/psc1/nativeex.boot-land.net/index.php on line 391
Peter
#22
Posted 11 March 2008 - 05:30 PM
You do realise, of course, that I hadn't planned on moving to a v0.29 beta quite so quickly.
#23
Posted 11 March 2008 - 05:50 PM
Hmmm. Should work. Basically, it's the same "adjustment" I made for you in the other function. I'm a bit preoccupied today with personal stuff, but I will get back to you ASAP with the necessary revision. Don't worry. Just needs a bit more code fiddling to make that behavioural option work the way you want it to. We'll get there.
You do realise, of course, that I hadn't planned on moving to a v0.29 beta quite so quickly.
Peter
#24
Posted 11 March 2008 - 05:56 PM
I forgot to tell you that you need to add the $subdir and $update_list_all globals to line 380 so that it reads as follows:
global $ignore_files, $subdir, $update_list_all;
#25
Posted 11 March 2008 - 06:33 PM
Oops! Sorry. It was entirely my fault. Incomplete instructions.
I forgot to tell you that you need to add the $subdir and $update_list_all globals to line 380 so that it reads as follows:global $ignore_files, $subdir, $update_list_all;
I think the new function in_array in line 391 is too 'hard'
there should be a function with
sub_in_array(xxx\bla\fool\.. , myDir) = in_array(xxx\, myDir)
Peter
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users