-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm running the current version of webkit on Debian. I noticed that a
certain view on my website was unavailable and I investigated. This is
what I found. The permissions on a file have changed to the following:
cr-srwS-wt 29797 1919903063 591228022 110, 105 Nov 1 2014 Index.py
What is this? Have I been hacked? I can't delete the file. I get an
error saying that the file can't be unlinked. Help would be appreciated.
Thanks,
Randall
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQE/7kiQF4LF4iX94PARAuZnAJ4teP2sgvpjyGcvnJDFgJ/wKOrgxACfTETl
HDnxeyRZpPpWF0idPwZ5yew=
=wxoQ
-----END PGP SIGNATURE-----

On Wed, 2003-12-24 at 10:56, Jeff wrote:
> I'm upgrading to Python 2.3 and Webware 0.8.1 and am now getting
> the following error sporadically. Has anyone seen this? Any
> ideas?
> Traceback (most recent call last):
> File "WebKit/Application.py", line 415, in dispatchRequest
> File "WebKit/Application.py", line 567, in handleGoodURL
<-- snip -->
> return updatecache(filename)
> File "/usr/lib/python2.3/linecache.py", line 72, in updatecache
> basename = os.path.split(filename)[1]
> RuntimeError: maximum recursion depth exceeded
Yes, but only under quite heavy load, and I have not had the time to
track it down. I've been removing forwards (replacing with
sendRedirectAndEnd) and restarting the app server in a cron job as a
"dead man's switch".
I was assuming that I was forwarding recursively somehow, and had just
not tracked it down in my code - and the traceback was somehow
displaying wrong, I suppose... The only box this is showing up on *is*
also my only python 2.3 box though, now that you mention it.

I have a class that inherits from WebKit.Page - it loads various modules
dynamically, via __import__. Strangely, I find that modules loaded by
both the Page these sub-modules get reimported when I __import__ them,
causing an error in sqlobject (it thinks I'm redefining classes.)
This problem disappears when I change 'foo = __import__("foo")' to
'import foo'.
Is there a bug in the webkit import hooks that make it treat __import__
differently than import?
How would I even start debugging this?
- Scott

On Monday, Dec 1, 2003, at 10:23 US/Central, Ian Bicking wrote:
> On Nov 30, 2003, at 1:15 PM, Hollis Blanchard wrote:
>> In particular PATH_INFO seems to have been munged; I would have
>> expected it to be
>> /View/2003/11/30/kitties.jpg
>> because after all the real URL is
>> "/cgi-bin/wkcgi/View/2003/11/30/kitties.jpg" and wkcgi is the CGI
>> script.
>>
>> a) is this bug with PATH_INFO?
>> b) is there a proper way to get the info I want? Yes, I can
>> os.path.split(request.uri())[1:], but it seems like this should be
>> much easier.
>> c) doesn't anybody use PATH_INFO with WebKit??
>
> Try extraURLPath(), it gives you everything after the servlet. You
> have to turn it on with a setting in Application.config.
I finally got around to trying this.
class Browse(SitePage):
def writeContent(self):
self.writeln("<pre>")
self.writeln("extraURLPath: %s" % self.request().extraURLPath())
self.writeln("</pre>")
The URL "http://host/Browse/asdf/qwerty/"; yields "/" as extraURLPath().
So does the URL "http://host/Browse"; for that matter...
I'm using Apache mod_rewrite to expand that URL to
"http://host/cgi-bin/wkcgi/Browse/...";, if it matters.
-Hollis

On Sunday, Dec 14, 2003, at 23:46 US/Central, Hollis Blanchard wrote:
> On Sunday, Dec 14, 2003, at 23:18 US/Central, Hollis Blanchard wrote:
>>
>> + su -s /bin/sh -c "$LAUNCH" $WEBKIT_USER >> $LOG 2>&1 &
>
> Unfortunately the su causes $! to return a PID for the su process,
> which disappears instantly. So writing it to /var/run/webkit.pid later
> in the init script is worthless; what we really want is the PID of
> $LAUNCH. I guess the trailing & needs to be moved, but I can't figure
> it out right now. Anyone else?
A little more investigation shows that other daemons, such as sshd or
xinetd, write their pid files themselves (their init scripts don't do
it for them). That should be pretty easy to do from python as well in
Launch.py, and I believe I saw Ian mention that the experimental
standalone WebKit does this, since it writes one pid file per
application server.
Comments?
-Hollis

Hollis Blanchard wrote:
> Unfortunately the su causes $! to return a PID for the su process, which
> disappears instantly. So writing it to /var/run/webkit.pid later in the
> init script is worthless; what we really want is the PID of $LAUNCH. I
> guess the trailing & needs to be moved, but I can't figure it out right
> now. Anyone else?
Ahh... On my machine the su process does not disappear instantly, but
killing its PID does not shutdown webware properly. Maybe the init
script should kill the PID in appserverpid.txt instead? (This is the PID
of the "python Launch.py ThreadedAppServer" process.)
Nick

On Sunday, Dec 14, 2003, at 23:18 US/Central, Hollis Blanchard wrote:
>
> + su -s /bin/sh -c "$LAUNCH" $WEBKIT_USER >> $LOG 2>&1 &
Unfortunately the su causes $! to return a PID for the su process,
which disappears instantly. So writing it to /var/run/webkit.pid later
in the init script is worthless; what we really want is the PID of
$LAUNCH. I guess the trailing & needs to be moved, but I can't figure
it out right now. Anyone else?
Note that an su command was already present in the script, though
commented out. I seem to recall that not working either when I tried it.
-Hollis

Could you please give us a little more details on what you did after you
did the build, and install? What Os platform are you on, what webserver
are you using? Did you run MakeAppWorkDir.py or are you manually
editing the default application.conf file? How did you configure your
webserver to work with webware? Are you using webkit.cgi or the apache
mod?
This should allow us to better help you out, also in general you do not
need to move the examples folder to your web servers root, since the
conf file generally knows how to find them.
Jose
-----Original Message-----
From: webware-discuss-admin@...
[mailto:webware-discuss-admin@...] On Behalf Of Del
Gong Nul
Sent: Friday, December 12, 2003 8:44 PM
To: webware-discuss@...
Subject: [Webware-discuss] examples
hi,
I just downloaded webware (0.8.1) and after much struggle got it to
build and install, and now it starts correctly, but all of the examples
but one do not work. I copied the examples directory into my web
server's root directory, and tried to access the examples, but it seems
that something is not correct.
The one example that worked correctly is Colorize.py. When I try to
visit any of the other pages, I get an error, with traceback. The
following is the traceback for ExamplePage.py:
/var/www/wkex/ExamplePage.py
Traceback (most recent call last):
File "WebKit/Application.py", line 415, in dispatchRequest
self.handleGoodURL(transaction)
File "WebKit/Application.py", line 567, in handleGoodURL
self.respond(transaction)
File "WebKit/Application.py", line 776, in respond
transaction.respond()
File "WebKit/Transaction.py", line 105, in respond
self._servlet.respond(self)
File "WebKit/HTTPServlet.py", line 38, in respond
method(trans)
File "WebKit/Page.py", line 34, in respondToGet
self._respond(transaction)
File "WebKit/Page.py", line 73, in _respond
self.writeHTML()
File "WebKit/Page.py", line 135, in writeHTML
self.writeBody()
File "WebKit/Page.py", line 204, in writeBody
self.writeBodyParts()
File "WebKit/SidebarPage.py", line 47, in writeBodyParts
self.writeSidebar()
File "/var/www/wkex/ExamplePage.py", line 63, in writeSidebar
self.writeExamplesMenu()
File "/var/www/wkex/ExamplePage.py", line 83, in writeExamplesMenu
if plugIn.name()==self.request().contextName()[:-8]:
TypeError: unsubscriptable object
Other pages complain about modules that can't be found, even though
they're in the same page as the script that is being called.
Was there any extra configuration required after installing? I didn't
see anything in the docs about configuring extra stuff, and expected the
examples to just work.
Any help would be greatly appreciated.
cheers,
del.
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for
IBM's Free Linux Tutorials. Learn everything from the bash shell to sys
admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Webware-discuss mailing list Webware-discuss@...
https://lists.sourceforge.net/lists/listinfo/webware-discuss

hi,
I just downloaded webware (0.8.1) and after much struggle got it to build
and install, and now it starts correctly, but all of the examples but one
do not work. I copied the examples directory into my web server's root
directory, and tried to access the examples, but it seems that something
is not correct.
The one example that worked correctly is Colorize.py. When I try to visit
any of the other pages, I get an error, with traceback. The following is
the traceback for ExamplePage.py:
/var/www/wkex/ExamplePage.py
Traceback (most recent call last):
File "WebKit/Application.py", line 415, in dispatchRequest
self.handleGoodURL(transaction)
File "WebKit/Application.py", line 567, in handleGoodURL
self.respond(transaction)
File "WebKit/Application.py", line 776, in respond
transaction.respond()
File "WebKit/Transaction.py", line 105, in respond
self._servlet.respond(self)
File "WebKit/HTTPServlet.py", line 38, in respond
method(trans)
File "WebKit/Page.py", line 34, in respondToGet
self._respond(transaction)
File "WebKit/Page.py", line 73, in _respond
self.writeHTML()
File "WebKit/Page.py", line 135, in writeHTML
self.writeBody()
File "WebKit/Page.py", line 204, in writeBody
self.writeBodyParts()
File "WebKit/SidebarPage.py", line 47, in writeBodyParts
self.writeSidebar()
File "/var/www/wkex/ExamplePage.py", line 63, in writeSidebar
self.writeExamplesMenu()
File "/var/www/wkex/ExamplePage.py", line 83, in writeExamplesMenu
if plugIn.name()==self.request().contextName()[:-8]:
TypeError: unsubscriptable object
Other pages complain about modules that can't be found, even though
they're in the same page as the script that is being called.
Was there any extra configuration required after installing? I didn't see
anything in the docs about configuring extra stuff, and expected the
examples to just work.
Any help would be greatly appreciated.
cheers,
del.

Has anyone here tried to use the xsdb python database (http://xsdb.sourceforge.net) with a webware application? It seems to require an installation of stackless python for most uses; can webware run using stackless python?

Hancock, David (DHANCOCK) wrote:
> What database are you using? If it's one that supports "auto" columns or
> "sequences" (automatically incremented counters, specifically for primary
> keys), consider using such a function when you insert. If your database
> doesn't support that, then I'm not sure what you can do.
Well if there is support for transactions in the database you could
maintain a table of sequence numbers and increment that as part
of the transaction used for the insert.
> What I just described is just good database practice. There's probably
> another way to trap the case of submitting the same form twice.
Could you put mutex protected flags in the session to indicate whether
or not the form had been submitted?
Nick

Hallo,
Hancock, David (DHANCOCK) hat gesagt: // Hancock, David (DHANCOCK) wrote:
> What database are you using? If it's one that supports "auto" columns or
> "sequences" (automatically incremented counters, specifically for primary
> keys), consider using such a function when you insert. I
In this specific problem this probably will not help, because only one
insert is wanted. Using autoincrement keys you'd create two valid
database rows, when the goal was to just get one.
ciao
--
Frank Barknecht _ ______footils.org__

I used it a few years ago in a business critical app and a number of
small sites. I have also used it when I needed to generate lots of
static text or html files. The big difference between Cheetah and many
PHP tempates is that chettah compiles into a true Python class. This is
great for speed and flexability, but really bad for end user managed
templates. There is nothing to stop a user from running os.popen('rm *')
in a template.
-Aaron
Michel Thadeu wrote:
>Hi guys!
>
>I've been reading about cheetah but I'm not sure if I can trust it.
>Does anyone used cheetah? I never used either cheetah or webware, I
>know a quite about php, and zope, some more about python and now I want
>to learn webware...
>
>You can find cheetah on the next url:
>http://www.cheetahtemplate.org/docs/users_guide_html_multipage/intro.html
>
>thanks for the help guys!
>
>
>=====
>--
>Michel Thadeu Sabchuk
>Curitiba/PR
>
>______________________________________________________________________
>
>Yahoo! Mail: 6MB, anti-spam e antivírus gratuito! Crie sua conta agora:
>http://mail.yahoo.com.br
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: IBM Linux Tutorials.
>Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
>Free Linux Tutorials. Learn everything from the bash shell to sys admin.
>Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
>_______________________________________________
>Webware-discuss mailing list
>Webware-discuss@...
>https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
>