[Tutor] Re: Help with 500 error on cgi script

Sheila King sheila@thinkspot.net
Mon, 19 Mar 2001 10:10:47 -0800


f3hf-0005oE-00@mail.python.org>
In-Reply-To: <E14f3hf-0005oE-00@mail.python.org>
X-Mailer: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <760DF37EFE@kserver.org>

On Mon, 19 Mar 2001 09:44:13 -0800, Sheila King <sheila@thinkspot.net>  wrote
about Re: [Tutor] Re: Help with 500 error on cgi script:

:On Mon, 19 Mar 2001 11:04:31 -0500, D-Man <dsh8290@rit.edu>  wrote about Re:
:[Tutor] Re: Help with 500 error on cgi script:

::| Python 2.0 (#1, Jan 15 2001, 01:09:04) 
::| [GCC 2.7.2.3] on linux2
::       ^^^^^
::Heh, that's a bit old.  I have heard (but not tried it for myself)
::that g++ 2.7.x had a problem with calling dtors before calling copy
::ctors when returning objects from functions.  Just FYI in case you
::decide you want to play with C++ on that system.  That C compiler
::should be ok since C is older and the compiler more mature.
:
:Are you saying, that maybe I should uninstall my Python-2.0 and then
:re-install it using the C compiler instead of GCC? You think that might help?
:<sigh--sounds like a weekend project> I used gcc because that is what I'm
:familiar with. I don't know how to use the c compilers.

Here's something else:

I was looking at the docs for the sys module for 2.0 here:
http://www.python.org/doc/current/lib/module-sys.html

And noticing that an interactive session with the interpreter via telnet gives
this:
>>> import sys
>>> for path in sys.path:
...     print path
...

/big/dom/xthinkspot/Python-2.0/Lib
/big/dom/xthinkspot/Python-2.0/Lib/plat-linux2
/big/dom/xthinkspot/Python-2.0/Lib/lib-tk
/big/dom/xthinkspot/Python-2.0/Modules
>>> import cgi
>>> print sys.modules["cgi"]
<module 'cgi' from '/big/dom/xthinkspot/Python-2.0/Lib/cgi.pyc'>
>>>  

Whereas a cgi script, performing the exact same commands, gives this:


/usr/local/lib/python2.0/
/usr/local/lib/python2.0/plat-linux2
/usr/local/lib/python2.0/lib-tk
/usr/local/lib/lib-dynload

I noticed that the docs for the sys module state this:

exec_prefix 
     A string giving the site-specific directory prefix where the
platform-dependent Python files are installed; by default, this is also
     '/usr/local'. This can be set at build time with the --exec-prefix
argument to the configure script. Specifically, all configuration files (e.g.
     the config.h header file) are installed in the directory exec_prefix +
'/lib/pythonversion/config', and shared library modules are
     installed in exec_prefix + '/lib/pythonversion/lib-dynload', where
version is equal to version[:3]. 

This makes me think that I really should reinstall, and set the exec_prefix to
be /big/dom/xthinkspot/Python-2.0 or something like that. Perhaps the problem
I'm having is because I didn't install it with the correct paths in the
configuration options ???


--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/