r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[CGI] web server issues

Alek_K
15-Feb-2007
[621]
Thanks for help - I'll try to ask Sunanda
PeterWood
15-Feb-2007
[622x2]
There is a FreeBSD version of Rebol Core but I'm not sure which version 
of FreeBSD..
Given the small download and simple installation, it may be worth 
a try.
Alek_K
15-Feb-2007
[624]
Tried it - 500 as before :)
Oldes
15-Feb-2007
[625]
Can you run Rebol from shell?
Sunanda
15-Feb-2007
[626]
Al I know is that the IS neglected to start the "Linux compatability 
module" on a reboot -- and so EBOL.org 500ed for most of a day until 
we got t sorted.

I've sent Alek the full emails from the ISP documenting the problem, 
but they don't realy say very much more.
Alek_K
16-Feb-2007
[627]
Shared object "libm.so.2" not found, required by "rebol"

So ISP said "this software is old - please upgrade, as we did".

Argh... how can I argue with him? Any suggestions? I'm green in such 
subjects as freeBSD/unix/linux.
Oldes
16-Feb-2007
[628]
Try to use feedback http://www.rebol.com/feedback.html
Alek_K
16-Feb-2007
[629]
(ok - used feedback form)
Oldes
16-Feb-2007
[630]
but I think, that it's not on the top in the priority list
Gabriele
16-Feb-2007
[631]
99% of the times a symlink solves the missing lib problem.
Alek_K
17-Feb-2007
[632]
Gabriele - can You tell me what should I tell to "tech guy"?
Gabriele
19-Feb-2007
[633x3]
it don't know freebsd well enough to give you a good answer. however, 
usually, if libm.so.2 is missing but they have libm.so.x (eg libm.so.3 
or libm.so.4) then it is enough to have a ln -s libm.so.x libm.so.2 
to make rebol work. same for any other missing libraries. this does 
not work always but works in most cases.
it is possible that it can interfere with other apps, so they might 
refuse to do it. however, linux allows "local" libs (not system wide, 
but just for your cgi or even just for rebol), so if it's the same 
on freebsd they could do that.
otherwise, you need to ask Carl (repeatedly ;) for a new freebsd 
build for you.
Alek_K
19-Feb-2007
[636]
Thanks Gabriele!
Josh
23-Feb-2007
[637x3]
Ok, I have a question regarding blog.r .  I set it up on a server 
to play with it for a few minutes.  After a couple kinks, I got it 
working with a few tests.   I went to delete the test blogs but found 
they were created under the www-data user and group (this is on a 
linux server) and I do not have writes to delete or modify these 
files.   In the future, is there a way to have the files created 
under a different user / group?
Or is this server / apache config?   I have no admin access to this 
box, so this could cause some annoyances
And my second question, is this blogger.r the most fully featured 
version of the orginal blog.r ?   I've been out of the loop for a 
while.
Graham
23-Feb-2007
[640]
if the script can write the files, presumably you can use the same 
script to alter the attributes ( set-modes ).
Josh
23-Feb-2007
[641x5]
I'm trying something to this effect:
change-dir %blogs/
foreach file read %. [
		port: open file
    set-modes port [
        world-read: true
        world-write: true
        world-execute: true
    ]
    close port
]


But with my tired mind, and the no end of 500 errors, I must be forgetting 
something.
And I am officially tired.  It does help to make the script executable.......
Can you set the owner-id / group-id with set-mode?   Is there a good 
resource on set-modes other than the function dictionary?  I've been 
searching but haven't come up with anything...
I get an access error when I try to set the IDs, so it seems not 
possible...
Graham
23-Feb-2007
[646]
more likely you're in the wrong directory.
Gabriele
23-Feb-2007
[647x2]
you can't change the owner of a file, unless you are root
what's the easiest thing to do is.... delete those files from the 
script :)
Chris
23-Feb-2007
[649x5]
You shouldn't need to open a file port to set-modes, just set-modes 
%file.r [... modes ...]
Also, I don't know if this is so with every setup, but when you create 
a file with a CGI script, the process owner, not the script owner, 
is the owner of the file, so you'd need to be able to do owner-read/owner-write. 
 I usually set owner/group/world-read/write to true and execute to 
false.
I built this into my Sandbox port...
(see 'Files' group)
The process owner depends on the httpd config, right?
Gabriele
24-Feb-2007
[654]
yes; and if you use SuExec the process owner becomes the script owner 
(i.e. your user id), but SuExec is tricky business.
Maxim
26-Feb-2007
[655]
is it possible to extract/change a cookie from the site a plugin 
is working in?


  I have embedded an app within an IIS served web site.  I must make 
  the reblet interact with the site's cookie, so it follows the rest 
  of the site's status when relaunched (browsing to/from the app from 
  other pages restarts the rebol app).
Oldes
26-Feb-2007
[656]
google "javascript cookies tutorial" and use rebol to call javascript 
to get the cookies
Maxim
26-Feb-2007
[657]
thanks this will get me going   :-)
btiffin
19-Apr-2007
[658]
Hi,  question for the webheads.


   In short.  Can a form call a cgi action that processes data but doesn't 
   output any Content-type

(or anything for that matter) without the browser status coming up 
with "waiting for reply".


   I've got a client that wants a form for requesting more info, but 
   they want to leave the user on

the same screen, so I thought I could have a %process.cgi that takes 
the data and plays with it

and then have an intrinsic  onsubmit=alert(...)  to inform the user 
that the request has been submitted.

The %process.cgi doesn't 
print "Content-type ..."


it doesn't print anything, as I was hoping to leave the same browser 
screen up.

Am I living in lalaland?


Should the %process.cgi just redirect back to the original page with?


print "location: /original.html^/content-type: text/html^/"  or is 
that deprecated now?  It works under my test heads, Cheyenne and 
nonIE browser, but is there a bigger better way?  Or do I tell the 
client that the browser needs a new page and I can add a back link 
(not preferred).

Thanks for listening
Sunanda
19-Apr-2007
[659]
You could try sending back a 204 response.
Means "no content" in the response.
No idea what a webserver would do with that.
A 205 might work too.
Gabriele
19-Apr-2007
[660x2]
why should not the user leave the form? should a user be able to 
send it multiple times?
if you need to rely on JS, you could do an xmlhttp request...
btiffin
19-Apr-2007
[662x4]
I'm popping up an Alert...

This is a client request, I'm looking at options.  Thanks for the 
hints.
The form comes with a note about Javascript...so far anyway.  I'm 
showing off the

print "location: " umm, redirect, to them right now as we speak.
I'll reinform them of the potential problems of having this type 
of form on their page.
And thanks to %blog.r's abuse? code, I should be able to stop most 
of the potential harm...but I'm still reiterating this to the client.
DanielSz
25-Jul-2007
[666]
Hello, I need to send multipart/form-data to a server for uploading 
a file from the console. I've been googling and searching the script 
archive, to no avail. Can anyone help?
btiffin
25-Jul-2007
[667]
Daniel;  Try http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=cgi.r
 for some code.

And http://www.rebol.net/cookbook/recipes/0026.htmlfor a REBOL sample 
solution  and then wait for the rest of the forum members to pipe 
up with 'bigger better' solutions, and they will.  :)
DanielSz
25-Jul-2007
[668]
Thanks for the help. The recipe from the rebol cookbook show you 
how to upload a file provided the server runs a rebol script too. 
The server I'm uploading a file to doesn't. It expects multipart/form-data. 
Maybe the %cgi.r by Cal Dixon provides a solution. I'll investigate 
further. More hints will be appreciated, as well...
btiffin
25-Jul-2007
[669]
Try this ML thread http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-message.r?m=rmlKVSQ
and some notes by Sunanda on CGI 'safety' 

http://www.rebol.org/cgi-bin/cgiwrap/rebol/art-display-article.r?article=x60
DanielSz
25-Jul-2007
[670]
In that ML thread, the request was to handle a multipart upload on 
the server side (in rebol). I need to perform a multipart upload 
on the client side (in rebol). As for the seconde link, unfortunately 
I get "Article x60 is no longer available ". Any idea?