AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 5907 |
r3wp | 58701 |
total: | 64608 |
results window for this page: [start: 50601 end: 50700]
world-name: r3wp
Group: !Cheyenne ... Discussions about the Cheyenne Web Server [web-public] | ||
onetom: 4-May-2011 | hmm... how can i map a directory under a certain path in vhost? im trying this: yp [ root-dir %~/p/ob/yp alias "/public" %../public/ ] then for curl http://yp:8080/public/angular-0.9.15.min.js i get HTTP/1.1 301 Moved Permanently Location: /public/angular-0.9.15.min.js/ wtf? i remember seeing something like "/some/path" [ options ] in a vhost config block, but i can't find anything about it now | |
onetom: 4-May-2011 | i did a ~/p/ob/yp $ ln -s ../public public as a workaround, but how can i achieve the same from the config file? | |
Kaj: 4-May-2011 | I use my own app platform, which is based on a pervasive templating system | |
Kaj: 5-May-2011 | It depends on the definition, but that's the direction I'm moving in. The structure is roughly MVC, and I have a method of updating web pages without the browser having to know what it means | |
Kaj: 5-May-2011 | Try REBOL is the first dynamic site I've done that way. You stay on the same page, send in data to a service interface and get data back that updates arbitrary parts of the page | |
Kaj: 5-May-2011 | Obviously it's nice to be independent from the server - if you can get it to work cross-browser. But I always thought we have View for that. Also, it seems nice to have the browser do input checking, but if you want a robust app, you will have to get the server to guard its own consistency and end up writing all input checking twice | |
Kaj: 5-May-2011 | In general, I notice that almost all web platform projects (and operating system projects for that matter) are either very focused on the server, or very focused on the client, apparently depending on the preference and abilities of the founders. This doesn't make sense to me: a network app by definition needs to deal with both sides of the connection, and find the best balance | |
onetom: 5-May-2011 | i wish rebol/view was that good to replace the browser, but im typing this on a mac w ugly, aliased, miniature fonts and i can't even use the maximize button because it fucks up the screen size and layout... | |
onetom: 5-May-2011 | angularjs is surprisingly backward compatible, btw... but serverside validation is still a must of course. in this particular project we tried view, btw, but we need it on a tablet later in a warehouse, so /view is not an option at the end :( | |
Kaj: 5-May-2011 | AngularJS specifies a minimum of IE6, and IE7 for CSS, and no word about Opera and less popular browser engines. My system works from IE5 on (anything with AJAX) | |
Kaj: 5-May-2011 | Why wouldn't you be able to run View on a tablet? | |
Kaj: 5-May-2011 | No idea, but there are many now, so there must be a number of choices for the price of an iPad | |
onetom: 6-May-2011 | im loading libraries from on-application-start, then i was hoping to load some static data too, but the words i assign there can't be found in my script later. the script is called via an alias though which was specified within a webapp section. on-application-start: does [ do %some/lib.r db: %db/dir/some/where/ ] httpd.cfg: vhost [ webapp [ alias "/xxx" "db.r" ] ] db.r can't access the db variable, although it can use the words defined in the library loaded by 'do | |
onetom: 6-May-2011 | wow!!!! there was an extra closing bracket before the end of the script and it completely derailed processing and i got back the script source itself as a response | |
Dockimbel: 6-May-2011 | Can you send me a minimal version of your script producing this error? I would like to see how it can affect the internal code so deeply. | |
Dockimbel: 6-May-2011 | I got it but was busy with other tasks. Will look into it in a few minutes. | |
onetom: 6-May-2011 | confirmed: my script works w r135 but not w r136 (this is a different script) | |
onetom: 6-May-2011 | hmm... it's a .r file but it's in rsp format, so no rebol header but <% %> tags. so i guess it's the right behaviour | |
onetom: 6-May-2011 | if i was calling the script .rsp and also bind-extern .rsp to the RSP handler then it worked too. is it something hardwired in cheyenne, if the extension is .r then is should be handled as a plain rebol script? | |
Dockimbel: 6-May-2011 | s it something hardwired in cheyenne, if the extension is .r then is should be handled as a plain rebol script? Yes, .r scripts are processed as plain REBOL scripts but with the addition of the whole RSP API since r100 (http://code.google.com/p/cheyenne-server/source/detail?r=100). It has been officialy documented on the wiki only recently: http://cheyenne-server.org/wiki/Rsp/Basis ("No-template scripts" section). | |
Kaj: 6-May-2011 | Doc, did you get a chance to debug fast-rebol-cgi? | |
onetom: 6-May-2011 | we have even experienced very strange behaviour with the unless value? 'some-func [ do %../lib/obj.r do %../lib/oid.r ] tactic. our to-object function defined in obj.r didnt have a value. we modified the script, did not restart cheyenne and it started working! | |
Dockimbel: 6-May-2011 | onetom: They should be just served as a static resource if the 'bind-extern directive is not used. | |
Dockimbel: 6-May-2011 | Kaj: I've pushed a fix in r137 for fast-rebol-cgi. It was wrongly defined as a Globals section keyword instead of a Host section one. | |
Kaj: 6-May-2011 | By the way, I still want to get rid of the loading of the REBOL CGI script on each request, even though I've minimised its size. It's a fallback script that now executes in the not-found handler. If I would change it from a fast-rebol-cgi script to an .r script, and put it in an ALIAS handler, would that preempt the loading of the script one each request? I'm not using the RSP interface, so the loading of that would be extra overhead. Would it still be faster than loading the small fast-rebol-cgi script? | |
Kaj: 6-May-2011 | Oh, I thought I was the amateur. :-) Maybe a night sleep will enable you to answer it? | |
Dockimbel: 6-May-2011 | If I would change it from a fast-rebol-cgi script to an .r script I understand you want to use the RSP handler instead of the CGI handler? | |
Kaj: 6-May-2011 | So do you think preparing the RSP interface for each request would still be faster than reading a small rebol-fast-cgi file every request? | |
onetom: 7-May-2011 | i was moving a plain .r script which was aliased in a vhost context under a webapp and it started to fail because the 'do didn't seem to work properly | |
onetom: 7-May-2011 | REBOL [] do %../lib/obj.r probe to-object [a: 1] | |
onetom: 7-May-2011 | obj.r defines to-object but i get a ** Script Error : to-object has no value | |
onetom: 7-May-2011 | i moved the library stuff into on-application-start, but still it wasted me a lot of time to realize that the 'do is overwritten in RSP and works specially (as in, it does not work) in webapp context | |
Dockimbel: 7-May-2011 | what exactly is the purpose of the overwritten 'do function in the RSP handler? Bind the loaded code to a special per-webapp context. | |
Dockimbel: 7-May-2011 | A webapp execution context is isolated as much as possible from the rest of the vhost. | |
onetom: 7-May-2011 | looks like u r using a parameter as a local variable | |
Dockimbel: 7-May-2011 | I thought I've added a note about DO having special effect in RSP scripts, but I can't find any mention in the wiki. | |
Dockimbel: 7-May-2011 | ChangeLog: yes, you should find it mentioned there. I need to add a proper entry in the wiki about that anyway. | |
onetom: 7-May-2011 | Kaj: im just saying, it's a bit misleading to use an input parameter later as a temp variable in an other meaning | |
onetom: 7-May-2011 | do/global works, btw, however a plain 'do fails very interestingly and reproducably | |
onetom: 7-May-2011 | REBOL [] do %../lib/obj.r probe to-object [a: 1] | |
onetom: 7-May-2011 | this is my test.r file and im calling it from a webapp | |
onetom: 7-May-2011 | from the root of a webapp | |
onetom: 7-May-2011 | i want cheyenne to be less sucky, really. it's one of the nicest rebol projects and it's a shame if i can break it every second day... makes me not very proud of it... :/ | |
Dockimbel: 7-May-2011 | Also, about using plain REBOL scripts in RSP engine, it was a last year request from Carl, it wasn't part of my planned feature list to support, so it can cause new issues that I have not forseen when building the RSP engine. You are the first one to report me issues with such scripts, so I guess nobody except you and Carl are using this approach. Anyway, your reports are helping me make it more reliable. | |
onetom: 7-May-2011 | until yesterday the very same script was within <% %> tags actually and this effect was still observable. just the latest svn version didn't accept the tags in a .r file anymore, that's why im showing it as a REBOL[] script. otherwise, i was just following common sense and trying to get things done in an ultra primitive way :) | |
onetom: 7-May-2011 | the script worked and still works as a CGI script btw, so i bravely switched over to the RSP handler as it's been suggested on the "Basics" documentation page and i was using the very same unless value? 'my-object pattern to load my libs. | |
onetom: 7-May-2011 | what does "run Cheyenne with a non-persistent? worker." mean, btw? -w 0? | |
Dockimbel: 7-May-2011 | It works here in a vhost (not in a webapp) using: %obj.r => REBOL [] to-object: func [a [block!]][context a] %test.r => REBOL [] do %../libs/obj.r probe to-object [a: 1] Testing within a webapp now... | |
Dockimbel: 7-May-2011 | >> read http://localhost/test.r == "make object! [^/ a: 1^/]" | |
Dockimbel: 7-May-2011 | From a webapp, it works ok too: %libs/obj.r => REBOL [] to-object: func [a [block!]][context a] %www/testapp/test.r => REBOL [] do %../libs/obj.r probe to-object [a: 1] >> read http://localhost/testapp/test.r == "make object! [^/ a: 1^/]" | |
Dockimbel: 7-May-2011 | I have disabled the 'auth keyword from /testapp webapp to do this test, to avoid being redirected to a login page. | |
Dockimbel: 7-May-2011 | I have run the tests using -w 1, using -w 0, I get a "to-object has no value" error. | |
GrahamC: 7-May-2011 | So, now I load the db from a disk file each time ... | |
GrahamC: 7-May-2011 | I have mutiple users using a web app on different ports. Each has their own vhost, and their own pages but to keep things simple, each web app is the same. I include a config file each time a rsp page is loaded with the db definition instead of in the app-init.r where it did not work | |
Dockimbel: 8-May-2011 | Kaj: pushed a fix for that in r139. | |
Kaj: 8-May-2011 | I've checked that I'm doing everything right according to the latest Cheyenne conventions. I have a fairly standard httpd.cfg with this: | |
Dockimbel: 8-May-2011 | Odd, maybe a regression in the latest revisions...I will test that on my local linux box in a few minutes. | |
Kaj: 8-May-2011 | This is a custom Linux, so no comparison to Ubuntu :-) | |
Kaj: 8-May-2011 | One difference is that the root user and group are called "system", but I didn't find a problem with that in my Cheyenne patch a year ago | |
Dockimbel: 8-May-2011 | Could you extract the mod-userdir/get-id function and try to run it from a REBOL console using: col: #":" get-id "www" | |
Dockimbel: 8-May-2011 | I have found a bug with the 'chown function. | |
Dockimbel: 8-May-2011 | Ok, I think it is not needed anymore. It seems that the set-gid call is failing on your system for group "www". Set-gid returns a logic! or none! value if running on a 2.7.8 kernel and an integer! for previous kernels (due to different mappings), that is what's causing the error. | |
Dockimbel: 8-May-2011 | If only Carl has freed /Library on Linux instead of adding 'access-os native...it would have saved me a lot of coding/debugging time... | |
Dockimbel: 8-May-2011 | Kaj: I have pushed a fix (needs testing). | |
Dockimbel: 8-May-2011 | Means a 30x HTTP code was returned by the request. | |
onetom: 8-May-2011 | needless to say i've created both app-init.r files for the sake of the experiment w a content of REBOL[] but im still getting the error | |
Dockimbel: 8-May-2011 | Have you tried to define a webapp inside another webapp? | |
onetom: 8-May-2011 | any example how do u test pages behind a session? im trying curl -D- -d 'login=test&pass=letmein' -c jar http://localhost:8080/app/login.rsp but subsequent curl -D- -c jar http://localhost:8080/app/some.html still gives me 302 to login.rsp | |
Dockimbel: 8-May-2011 | any example how do u test pages behind a session? You shouldn't use AUTH keyword if you don't want the redirection to a login page. | |
Dockimbel: 8-May-2011 | i'd be interested in looking into the sessions during runtime too.. can i do it on the cheyenne console by pressing escape? You can access them in 3 different ways: 1) if run from sources, escape in the console, then enter: probe uniserve/services/httpd/mod-list/mod-rsp/sessions/queue. Type do-event when you want to resume Cheyenne. 2) run the %clients/rconsole.r from the source archive, you will have a remote console connected to your local Cheyenne process (try on prompt: netstat) 3) add this to the config file in globals section: persist [sessions]. When you want to look to the sessions, just stop Cheyenne process, a .rsp-sessions file is created holding the session objects. | |
onetom: 8-May-2011 | it maintains cookies in a jar | |
onetom: 8-May-2011 | thats what im not sure how to handle w a little code in rebol, that's why i was asking u; thought u need have some examples in ur toolbox | |
Dockimbel: 8-May-2011 | You should try to send a GET request first on the login.rsp page. | |
onetom: 8-May-2011 | so it's worth learning. i was a wget user earlier, but since macs come w curl and i can easily apt-get install curl and even syllable comes w curl, i don't give a fuck anymore how an inefficient bloatware is curl, im still trying to use it and only it :) | |
onetom: 8-May-2011 | my-http is nice though. i wish there would be a guide for all these protocol extensions.. there are a couple of half-baked versions of them... :/ | |
onetom: 8-May-2011 | it's actually available for a lot more platforms than rebol nowadays | |
onetom: 8-May-2011 | u know if rebol would come w a nicer header dump, cookie, https and url encode/decode support by default, i would advocate it as a curl replacement probably... :/ maybe an extension script would be enough, which anyone can remember, like http://json.org/json.r | |
onetom: 8-May-2011 | pff.. my-http is not really transparent... >> do http://www.rebol.org/download-a-script.r?script-name=my-http.r connecting to: www.rebol.orgScript: "patched HTTP/HTTPS protocol with cookies support" (18-Aug-2006) == none >> trace/net on >> read http://localhost:8080/testapp/login.rsp URL Parse: none none localhost none testapp/ login.rsp** Script Error: querying has no value ** Near: http-command: either querying ["HEAD"] ["GET"] | |
Dockimbel: 8-May-2011 | btw, let me micro-interview you here: why the hell are u still using windows!? especially for development? :) I consider that GUI are an improvement over CLI that make my life easier and computers simpler and more fun to use. I stick with Windows as my main platform because I never got used to Mac OS UI (tried for a few weeks, but gave up rapidly) and I found the other UNIX GUI less "efficient" than Windows. Also I found Windows to be quite transparent for my work, it just doesn't get in my way as other OSes tend to do, so I can focus on my work and forgot about the rest (especially since Vista days, I am now a very happy Seven user). I must also add that I was an Amiga and BeOS user for more than a decade and spent all my college days on AIX, X-Windows and SunOS. | |
onetom: 8-May-2011 | :) thanks. interesting. i was doing DOS, TurboVision, then tried Win3.0. used Turbo Pascal in 2 dos windows under Win3.1, programmed serial equipement with Delphi 1.0 under Win95, but then i just fell in love w the fvwm2 theme of icewm and the big virtual desktop which even worked on trident 8900 isa cards, using suse linux. i was forced using windows until the xp version and i even saw delphi 4.0. no windows interface can compete with icewm with autofocus and saying this as someone who still can handle windows without a mouse faster than anyone else i know. i found vista and win7 particularly disgusting. those dim windows w huge decorations just make me annoyed. im the fullscreen terminal window in black&green kinda guy :) i want console in web browsers too. i think lisp machines were great examples that how the character based interface can benefit from graphical capabilities. plan9's acme is also a nice example; although i never had the chance to use it for anything real. never really seen an expert using it either... | |
Dockimbel: 8-May-2011 | No, it a browser thing (unless you can disable it in your web browser). | |
Dockimbel: 8-May-2011 | Cheyenne uses volatile cookies (with HttpOnly attribut) that are safe for holding a session key. | |
onetom: 8-May-2011 | hmhm... the auth directive is not completely useful for me, because probably i shouldn't return a 302 to the login page when the session of my json service times out... :/ | |
Kaj: 8-May-2011 | To produce the logs, Cheyenne needs write access to the folder with the configuration file and (future) logs. This becomes a problem when it gives up its root capabilities, and the mechanism to adapt the privileges of the log files still doesn't seem to work | |
Kaj: 8-May-2011 | When Cheyenne has access to this directory, but only for reading, it quits silently. -vvvv doesn't even provide a clue what went wrong | |
Kaj: 8-May-2011 | When it gets write access, it produces a crash.log under the new user name, showing that it switched. But it had already produced a normal log under the root name, and doesn't adapt its ownership. This is indeed what the crash.log then warns about | |
Dockimbel: 9-May-2011 | This is both against the structure of Unix and modern Windows systems. UNIX filesystem layout usage are not identical. Here are the Apache error log location in just 3 UNIX flavours (among dozens): * RHEL / Red Hat / CentOS / Fedora Linux Apache error file location - /var/log/httpd/error_log * Debian / Ubuntu Linux Apache error log file location - /var/log/apache2/error.log * FreeBSD Apache error log file location - /var/log/httpd-error.log and here are the possible locations of configuration file: * /usr/local/etc/apache22/httpd.conf * /etc/apache2/apache2.conf * /etc/httpd/conf/httpd.conf Notice how the file name changes too (both for the log and conf files). BTW, I personnally prefer the GoboLinux approach ;-). One the Windows front, it is barely better. The registry database is fine for storing parameters (name/value couples), but not a REBOL dialect file. A common way is to store files created at runtime in %USER%/AppData/Local/<appname>/. Cheyenne stores all his files (including config file) either in the local folder or in %ALL_USERS%/Cheyenne/. Storing them in %USER% hierarchy should be better. Taking into account every OS specificities (or oddities) is not always a good choice for a cross-platform product. I know that Cheyenne needs to be gentle with the OS best practices, so I am willing to improve it whenever it is possible, but without sacrificing the default behaviour (because that is the way I want it to work for me). BTW, I am also willing to test the centralized logging approach, but it has to be a cross-platform solution. So an abstraction layer needs to be built with connectors for UNIX syslog daemon and Windows Event Logger (they are two types to support: pre-Vista system and new Vista/7 one). Has anyone already worked on such wrappers with REBOL? I personnaly need that the log files be exactly in the same format and if possible at the same place across platforms to make my life easier, so this will keep being the default anyway. The current -f internal Cheyenne command line (Windows specific currently) could be extended to work on UNIX too (and no Max, this one cannot go into the config file, because it indicates where the config file is located ;-)). | |
Kaj: 9-May-2011 | - User data. The websites. May be segmented over multiple user accounts or a global area | |
Dockimbel: 9-May-2011 | As I understand it, this looks like Cheyenne will need a per-UNIX system install script? Or will we let users spread the files acrosse the filesystem as they want and use options to redirect properly each file classes to the right folders? | |
Kaj: 9-May-2011 | A clear way to set the path to the UniServe library in the source version would also be good. I patched the Cheyenne source for that so far | |
Dockimbel: 9-May-2011 | You mean when running %cheyenne.r from a remote location? | |
Kaj: 9-May-2011 | Structure of a package: | |
Dockimbel: 9-May-2011 | It is absolutely not simple: - Cheyenne binaries use a memory-based virtual file system. - When run from sources, files internal relative paths depends on where the REBOL binary is run from. - REBOL on Windows has 2 different working folders (one for REBOL, one for the system), while on UNIX, it seems that there is only one (from the REBOL POV). Make a cross product of items and you'll have all possible combinations to manage. | |
Dockimbel: 9-May-2011 | I would like to take this opportunity to clean up things and hide the low-level mess under a unique abstraction layer. | |
Dockimbel: 9-May-2011 | I think I will make a new virtual filesystem for Cheyenne that will abstract all files accesses (including web sites). This would have the additional benefit of allowing to encap web sites files too (a feature I wanted to have since a long time). | |
Dockimbel: 9-May-2011 | This is quite a big change, so will need several steps to complete. I will first just patch the current way to allow relocating config and error files for UNIX users. | |
onetom: 9-May-2011 | can we start out with a documentation / sample implementation 1st, please? it sounds like a project which can be very well reused in other cases too. i've outlined the mentioned directory areas here: http://piratepad.net/KkvkZ9AtME | |
Dockimbel: 10-May-2011 | Thanks for the summary. I need to study every cases first anyway and find a clean and simple way to implement it. My first idea would be to use a custom scheme for that, like vfs:// that would resolve all virtual paths transparently. | |
Dockimbel: 10-May-2011 | Yes, but it is a very basic one and you need to use custom function calls, like: do-cache, load-cache, read-cache.... | |
Dockimbel: 10-May-2011 | Kaj: I have pushed a fix for the verbose mode making Cheyenne crash when running as none-root. It works well here on my Linux box. Let me know if you have other issues (locally generated files issue aside). |
50601 / 64608 | 1 | 2 | 3 | 4 | 5 | ... | 505 | 506 | [507] | 508 | 509 | ... | 643 | 644 | 645 | 646 | 647 |