Thread: [gbd-dev] Use of Gubed in ~home/public_html
Status: Beta
Brought to you by:
mccabe
From: Brett S. <tec...@se...> - 2005-05-24 18:10:46
|
All, I am working on a Fedora FC3 system running the latest patches. I am working in my home directory, so that I access files in ~home/public_html via http://localhost/~home. I was able to get Gubed working by creating a soft-link under the Gubed scripts directory back to ~home/public_html. I am looking for a more workable long-term solution, which as far as I can tell, might require changes to StartSession.php. I'd like to see a general enhancement or methodology, as it would be great to install Gubed once and allow all developers to utilize the environment. In my index.php, I've created two hyper-links to my target script, so that I can start it with and without Gubed: <a href="test.php">Test Normal</a> <a href="/gubed/StartSession.php?gbdScript=/gubed/home/subdir/test.php">Test Gubed</a> What I'd really like to do in the second case is more like: <a href="/gubed/StartSession.php?gbdScript=~home/subdir/test.php">Test Gubed</a> but doesn't work as it looks like StartSession.php attempts to prepend the script with an absolute path. Even better would be something like: <a href="/gubed/StartSession.php?gbdScript=test.php">Test Gubed</a> as there is a subtle issue here that requires specifying a full path, as there is no memory as to the current working directory. Normally scripts chain to each other from the same path, which I think might be doable if StartSession.php didn't force the issue. Any advise or simplified methodology greatly appreciated. Thanks, Brett ------------------------------------- Brett C. Serkez, Technical Trainer |
From: Aaron M. <wmc...@ho...> - 2005-05-25 01:06:28
|
Hey Brett, I have Gubed CVS installed at /usr/local/src/Gubed-CVS. I then created a Gubed softlink from /user_home_dir/public_html/ to /usr/local/src/Gubed-CVS. I invoke StartSession.php with ~user/path_to_script and everything seems to work fine. Let me know if a similar setup works for you as this seems like an acceptable setup for a multiuser environment. Thanks, Aaron McDonald <br><br><br>>From: "Brett Serkez" <tec...@se...><br>>To: "gub...@li..." <gub...@li...><br>>Subject: [gbd-dev] Use of Gubed in ~home/public_html<br>>Date: Tue, 24 May 2005 14:10:42 -0400<br>><br>>All,<br>><br>>I am working on a Fedora FC3 system running the latest patches. I am<br>>working in my home directory, so that I access files in<br>>~home/public_html via http://localhost/~home. I was able to get Gubed<br>>working by creating a soft-link under the Gubed scripts directory back<br>>to ~home/public_html.<br>><br>>I am looking for a more workable long-term solution, which as far as I<br>>can tell, might require changes to StartSession.php. I'd like to see a<br>>general enhancement or methodology, as it would be great to install<br>>Gubed once and allow all developers to utilize the environment.<br>><br>>In my index.php, I've created two hyper-links to my target script, so<br>>that I can start it with and without Gubed:<br>><br>><a href="test.php">Test Normal</a><br>><br>><a<br>>href="/gubed/StartSession.php?gbdScript=/gubed/home/subdir/test.php">Test<br>>Gubed</a><br>><br>>What I'd really like to do in the second case is more like:<br>><br>><a href="/gubed/StartSession.php?gbdScript=~home/subdir/test.php">Test<br>>Gubed</a><br>><br>>but doesn't work as it looks like StartSession.php attempts to prepend<br>>the script with an absolute path.<br>><br>>Even better would be something like:<br>><br>><a href="/gubed/StartSession.php?gbdScript=test.php">Test Gubed</a><br>><br>>as there is a subtle issue here that requires specifying a full path, as<br>>there is no memory as to the current working directory. Normally<br>>scripts chain to each other from the same path, which I think might be<br>>doable if StartSession.php didn't force the issue.<br>><br>>Any advise or simplified methodology greatly appreciated.<br>><br>>Thanks,<br>><br>>Brett<br>><br>><br>><br>><br>><br>><br>><br>>-------------------------------------<br>>Brett C. Serkez, Technical Trainer<br>><br>><br>><br>>-------------------------------------------------------<br>>This SF.Net email is sponsored by Yahoo.<br>>Introducing Yahoo! Search Developer Network - Create apps using Yahoo!<br>>Search APIs Find out how you can build Yahoo! directly into your own<br>>Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005<br>>_______________________________________________<br>>Gubed-devel mailing list<br>>Gub...@li...<br>>https://lists.sourceforge.net/lists/listinfo/gubed-devel<br> |
From: Brett S. <tec...@se...> - 2005-05-25 13:54:01
|
Aaron, This was very helpful, I am much closer, but two issues remain. I used your idea of a soft-link. Since I have several subdirectories under my public_html, each with a seperate project, in each of these directories I created a soft-link: StartSession.php -> /usr/local/gubed/ServerScripts/StartSession.php Then I was able to setup a reference: href="StartSession.php?gbdScript=test.php" and that worked! Very nice. The two issues: 1) If there are multiple users, each will be running their debugger on their own server/port. The debug server and port are read from the single file localsettings.php in the ServerScripts directory. I tried adding ?gbdDebugServer=mysystem to the reference, but it didn't work. Looks like GubedGlobals.php could be modified to look first in the current directory for localsettings.php and/or take the debug server/port as an option. 2) When references are made to other scripts, from the script being debugged, StartSession.php inserts itself on the command line so that debugging can continue. This is a good thing, but it prepends a leading /, so that for instance my href=index.php becomes StartSession.php?gbdScript=/index.php and fails. If the leading / is removed, it works. I'm wondering of the StartSession.php script can be modified to better decide if a leading / is required and leave it out if an absolute path wasn't used to start with. Brett On Tue, 24 May 2005 21:06:23 -0400, "Aaron McDonald" <wmc...@ho...> said: > Hey Brett, I have Gubed CVS installed at /usr/local/src/Gubed-CVS. I then > created a Gubed softlink from /user_home_dir/public_html/ to > /usr/local/src/Gubed-CVS. I invoke StartSession.php with > ~user/path_to_script and everything seems to work fine. Let me know if a > similar setup works for you as this seems like an acceptable setup for a > multiuser environment. > > Thanks, > Aaron McDonald ------------------------------------- Brett C. Serkez, Technical Trainer |
From: Brett S. <tec...@se...> - 2005-05-27 12:24:26
|
All, Making some progress on the first issue, that of multiple users and a single localsettings.php: > The debug server and port are read from the single file > localsettings.php in the ServerScripts directory. I tried adding > ?gbdDebugServer=mysystem to the reference, but it didn't work. Looks > like GubedGlobals.php could be modified to look first in the current > directory for localsettings.php and/or take the debug server/port as an > option. I used a suggestion from Linus and have modified my localsettings.php: $gbdDebugServer = $_SERVER['REMOTE_ADDR']; This works well in most cases as long as each user is working from a unique system and start both the debugger and web browser on that system. Better but still doesn't account for multiple users on the same system or the case of the need to use the proxy. Brett ------------------------------------- Brett C. Serkez, Technical Trainer |
From: Aaron M. <wmc...@ho...> - 2005-05-27 13:46:54
|
I'm working on a mod that might resolve the issue with localsettings.php and allow Gubed to be run in a multi-user environment. The mod will include at least the following: 1. Allow user to specify the path of the localsettings.php file that should be used. If a user does not specify a file then the localsettings.php file in the same directory as StartSession.php will be used. 2. When StartSession.php is invoked from ~home/public_html, the user will only be allowed to debug scripts that are accessible from ~home/public_html. This will prevent users from debugging any server content other than their own scripts. The mod should be ready by tomorrow and then I'll send it out. I think these changes may be too limiting for most Gubed users and may not belong in the code base, but I think Brett will find them useful. Thanks, Aaron McDonald |
From: Brett S. <tec...@se...> - 2005-05-27 14:00:49
|
Aaron, These changes sound wonderful... I'm not so sure they wouldn't be useful to others. The setup and control of utilities such as debuggers should be the responsibility of the system administrator, just as are other aspects of the environment. These changes are milestones along the way towards this capability. Thank you! Brett On Fri, 27 May 2005 09:46:48 -0400, "Aaron McDonald" <wmc...@ho...> said: > I'm working on a mod that might resolve the issue with localsettings.php > and > allow Gubed to be run in a multi-user environment. The mod will include > at > least the following: > > 1. Allow user to specify the path of the localsettings.php file that > should > be used. If a user does not specify a file then the localsettings.php > file > in the same directory as StartSession.php will be used. > > 2. When StartSession.php is invoked from ~home/public_html, the user will > only be allowed to debug scripts that are accessible from > ~home/public_html. > This will prevent users from debugging any server content other than > their > own scripts. > > The mod should be ready by tomorrow and then I'll send it out. > > I think these changes may be too limiting for most Gubed users and may > not > belong in the code base, but I think Brett will find them useful. > > Thanks, > Aaron McDonald > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit > http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > Gubed-devel mailing list > Gub...@li... > https://lists.sourceforge.net/lists/listinfo/gubed-devel ------------------------------------- Brett C. Serkez, Technical Trainer |
From: Linus M. <Li...@mc...> - 2005-05-29 17:14:23
|
On Friday 27 May 2005 14.24, Brett Serkez wrote: > $gbdDebugServer = $_SERVER['REMOTE_ADDR']; > > This works well in most cases as long as each user is working from a > unique system and start both the debugger and web browser on that > system. Better but still doesn't account for multiple users on the same > system or the case of the need to use the proxy. I'm trying to think of reasonable reasons why the user wouldn't run both the browser and client on the same box. Are there any good examples of this or is it a thoretical problem only? Also, if several users use the same box, it's only the port that needs to be specified if the above is used to specify client address. (why is the variable called gbdDebug>server< anyway? :) With Aarons promised patch for multiple localconfigs, I assume this problem is out of the way in any case. /Linus > Brett > > ------------------------------------- > Brett C. Serkez, Technical Trainer |
From: Brett S. <tec...@se...> - 2005-05-29 23:25:18
|
All, > I'm trying to think of reasonable reasons why the user wouldn't run both > the browser and client on the same box. Are there any good examples of this > or is it a thoretical problem only? I personally use multiple desktops during periods of development and would use one to run the browser and the other for debugging, but I can live with the restriction of using the same desktop for both. I have not yet have need for the proxy, but I could see the appearance of the browser and client as being on different systems with the proxy in use. > Also, if several users use the same box, it's only the port that needs to > be specified if the above is used to specify client address. (why is the > variable called gbdDebug>server< anyway? :) > > With Aarons promised patch for multiple localconfigs, I assume this > problem is out of the way in any case. Mostly, yes, but it would be nice to be able to specify the port on the fly. I suppose a system administrator could hand out specific ports to individual users so that they always start the client on that port and code their localconfig with that port. Brett ------------------------------------- Brett C. Serkez, Technical Trainer |
From: Linus M. <Li...@mc...> - 2005-05-31 20:09:11
|
On Monday 30 May 2005 01.25, Brett Serkez wrote: > I personally use multiple desktops during periods of development and > would use one to run the browser and the other for debugging, but I can > live with the restriction of using the same desktop for both. Yeah, ok.. Well, Aarons patch makes it possible to keep doing that. > Mostly, yes, but it would be nice to be able to specify the port on the > fly. I suppose a system administrator could hand out specific ports to > individual users so that they always start the client on that port and > code their localconfig with that port. Shouldn't be too much work to add ports as a part of the request anyway. Ill put it on the todo... /linus > Brett > ------------------------------------- > Brett C. Serkez, Technical Trainer > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > Gubed-devel mailing list > Gub...@li... > https://lists.sourceforge.net/lists/listinfo/gubed-devel |
From: Linus M. <Li...@mc...> - 2005-10-08 08:25:26
|
On Tuesday 24 May 2005 20.10, Brett Serkez wrote: > <a > href="/gubed/StartSession.php?gbdScript=/gubed/home/subdir/test.php">Test > Gubed</a> > > What I'd really like to do in the second case is more like: > > <a href="/gubed/StartSession.php?gbdScript=~home/subdir/test.php">Test > Gubed</a> This can be done, but there has to be a leading /. > <a href="/gubed/StartSession.php?gbdScript=/~home/subdir/test.php">Test > Gubed</a> (I'll look into if its possible to have Gubed automatically figure out the leading slash issue.. Since it always needs to be there, is shouldnt be a problem) /Linus > > but doesn't work as it looks like StartSession.php attempts to prepend > the script with an absolute path. > > Even better would be something like: > > <a href="/gubed/StartSession.php?gbdScript=test.php">Test Gubed</a> > > as there is a subtle issue here that requires specifying a full path, as > there is no memory as to the current working directory. Normally > scripts chain to each other from the same path, which I think might be > doable if StartSession.php didn't force the issue. > > Any advise or simplified methodology greatly appreciated. > > Thanks, > > Brett > > > > > > > > ------------------------------------- > Brett C. Serkez, Technical Trainer > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > Gubed-devel mailing list > Gub...@li... > https://lists.sourceforge.net/lists/listinfo/gubed-devel |