473,395 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Problem with Python Server Pages (PSP)

Hi,

I am facing a very basic problem with PSP. I have installed mod_python
(in fedora Core 1), added the lines required for loading Python
modules and handling PSP pages. I have created a hello.psp page. But
when I try to view this hello.psp page, all Python code are getting
displayed.

The said page is stored at /var/www/html/psp/hello.psp. I guess this
is some configuration problem with Apache, but not able to figure out
the exact problem. I have tried putting those configuration lines for
psp in both httpd.conf and python.conf files. But still it is not
working.

The Python module (mod_python) is getting loaded. Because when I
telnet to my server, I can find that in the headers.

These are the versions of the softwares:
Apache: 2.0.47
Python: 2.2.3
mod_python: 3.0.3

Thnaks for all your suggestions.
Jul 21 '08 #1
6 1599
On Jul 21, 9:42*pm, barun.sah...@gmail.com wrote:
Hi,

I am facing a very basic problem with PSP. I have installedmod_python
(in fedora Core 1), added the lines required for loading Python
modules and handling PSP pages. I have created a hello.psp page. But
when I try to view this hello.psp page, all Python code are getting
displayed.

The said page is stored at /var/www/html/psp/hello.psp. I guess this
is some configuration problem with Apache, but not able to figure out
the exact problem. I have tried putting those configuration lines for
psp in both httpd.conf and python.conf files. But still it is not
working.

The Python module (mod_python) is getting loaded. Because when I
telnet to my server, I can find that in the headers.

These are the versions of the softwares:
Apache: 2.0.47
Python: 2.2.3mod_python: 3.0.3

Thnaks for all your suggestions.
What is the Apache configuration snippet you are using to enable
mod_python and PSP file handling?

Graham
Jul 22 '08 #2
On Jul 22, 5:18*am, Graham Dumpleton <Graham.Dumple...@gmail.com>
wrote:
On Jul 21, 9:42*pm, barun.sah...@gmail.com wrote:


Hi,
I am facing a very basic problem with PSP. I have installedmod_python
(in fedora Core 1), added the lines required for loading Python
modules and handling PSP pages. I have created a hello.psp page. But
when I try to view this hello.psp page, all Python code are getting
displayed.
The said page is stored at /var/www/html/psp/hello.psp. I guess this
is some configuration problem with Apache, but not able to figure out
the exact problem. I have tried putting those configuration lines for
psp in both httpd.conf and python.conf files. But still it is not
working.
The Python module (mod_python) is getting loaded. Because when I
telnet to my server, I can find that in the headers.
These are the versions of the softwares:
Apache: 2.0.47
Python: 2.2.3mod_python: 3.0.3
Thnaks for all your suggestions.

What is the Apache configuration snippet you are using to enable
mod_python and PSP file handling?

Graham- Hide quoted text -

- Show quoted text -
Hi Graham,

The configuration used in httpd.conf file looks like:
<Directory /var/www/html/psp>
AddHandler .psp .psp_
PythonHandler modules/python
PythonDebug On
</Directory>
Jul 22 '08 #3
ba**********@gmail.com <ba**********@gmail.com>:
Hi,

I am facing a very basic problem with PSP. I have installed mod_python
(in fedora Core 1), added the lines required for loading Python
modules and handling PSP pages. I have created a hello.psp page. But
when I try to view this hello.psp page, all Python code are getting
displayed.
Not directly related to this issue, but I wouldn't start developing with
PSP. Modern web development is better done with a WSGI compatible
framework like Django ...

--
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)
Jul 22 '08 #4
On Jul 22, 5:36 pm, "Sebastian \"lunar\" Wiesner"
<basti.wies...@gmx.netwrote:
barun.sah...@gmail.com <barun.sah...@gmail.com>:
Hi,
I am facing a very basic problem with PSP. I have installed mod_python
(in fedora Core 1), added the lines required for loading Python
modules and handling PSP pages. I have created a hello.psp page. But
when I try to view this hello.psp page, all Python code are getting
displayed.

Not directly related to this issue, but I wouldn't start developing with
PSP. Modern web development is better done with a WSGI compatible
framework like Django ...

--
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)
Thanks to all. But can someone suggest me what the possible cause/
solution for this behaviour could be?
Jul 23 '08 #5
On Jul 22, 1:54*pm, barun.sah...@gmail.com wrote:
On Jul 22, 5:18*am, Graham Dumpleton <Graham.Dumple...@gmail.com>
wrote:
On Jul 21, 9:42*pm, barun.sah...@gmail.com wrote:
Hi,
I am facing a very basic problem with PSP. I have installedmod_python
(in fedora Core 1), added the lines required for loading Python
modules and handling PSP pages. I have created a hello.psp page. But
when I try to view this hello.psp page, all Python code are getting
displayed.
The said page is stored at /var/www/html/psp/hello.psp. I guess this
is some configuration problem with Apache, but not able to figure out
the exact problem. I have tried putting those configuration lines for
psp in both httpd.conf and python.conf files. But still it is not
working.
The Python module (mod_python) is getting loaded. Because when I
telnet to my server, I can find that in the headers.
These are the versions of the softwares:
Apache: 2.0.47
Python: 2.2.3mod_python: 3.0.3
Thnaks for all your suggestions.
What is the Apache configuration snippet you are using to enable
mod_pythonand PSP file handling?
Graham- Hide quoted text -
- Show quoted text -

Hi Graham,

The configuration used in httpd.conf file looks like:
<Directory /var/www/html/psp>
* * AddHandler .psp .psp_
* * PythonHandler modules/python
* * PythonDebug On
</Directory>
Go read the documentation properly.

http://www.modpython.org/live/curren.../hand-psp.html

What is PythonHandler set to?

Graham
Jul 23 '08 #6
On Jul 23, 6:18 pm, Graham Dumpleton <Graham.Dumple...@gmail.com>
wrote:
On Jul 22, 1:54 pm, barun.sah...@gmail.com wrote:
On Jul 22, 5:18 am, Graham Dumpleton <Graham.Dumple...@gmail.com>
wrote:
On Jul 21, 9:42 pm, barun.sah...@gmail.com wrote:
Hi,
I am facing a very basic problem with PSP. I have installedmod_python
(in fedora Core 1), added the lines required for loading Python
modules and handling PSP pages. I have created a hello.psp page. But
when I try to view this hello.psp page, all Python code are getting
displayed.
The said page is stored at /var/www/html/psp/hello.psp. I guess this
is some configuration problem with Apache, but not able to figure out
the exact problem. I have tried putting those configuration lines for
psp in both httpd.conf and python.conf files. But still it is not
working.
The Python module (mod_python) is getting loaded. Because when I
telnet to my server, I can find that in the headers.
These are the versions of the softwares:
Apache: 2.0.47
Python: 2.2.3mod_python: 3.0.3
Thnaks for all your suggestions.
What is the Apache configuration snippet you are using to enable
>mod_pythonand PSP file handling?
Graham- Hide quoted text -
- Show quoted text -
Hi Graham,
The configuration used in httpd.conf file looks like:
<Directory /var/www/html/psp>
AddHandler .psp .psp_
PythonHandler modules/python
PythonDebug On
</Directory>

Go read the documentation properly.

http://www.modpython.org/live/curren.../hand-psp.html

What is PythonHandler set to?

Graham
Hi Graham,

I'm extremely sorry. I had typed wrongly the configuration. Following
is the one I'm using:

<Directory /var/www/html/psp>
AddHandler mod_python .psp .psp_
PythonHandler mod_python.psp
PythonDebug On
</Directory>

Strange thing is, same thing is working in windows, but not in Linux.
Jul 23 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: news.telenet.be | last post by:
Hi, i'm looking at python to do programming for the new intranet here at the company. I'm looking at plone/zope also. Before, I've used jsp for webprogramming but i'm considering python for...
27
by: Florian Lindner | last post by:
Hello, I've been using Python a lot for scripting (mainly scripts for server administration / DB access). All these scripts were shell based. Now I'm considering using Python (with mod_python on...
12
by: vpr | last post by:
Hi All I want to build an Website using Apache / Python and MySQL. I dont want to spend to much time hacking html. I'm looking for some recommendations e.g. should I be using mod_python ?...
13
by: John Salerno | last post by:
I'm hoping someone can give me the basics for how to do very simple things with Python scripts from within my HTML. For example, I know that I can do this in PHP: <h1>Here is a header</h1>...
37
by: John Salerno | last post by:
I contacted my domain host about how Python is implemented on their server, and got this response: ------------------- Hello John, Please be informed that the implementation of python in our...
3
by: exhuma.twn | last post by:
Simple problem: When I define a funtion the way you would with the publisher handler (without using psp), all works as expected. However when I define a publisher-like function and instantiate a...
4
by: John Salerno | last post by:
I get this internal error message when I try to access a PSP page: "Invalid command 'PythonHandler', perhaps mis-spelled or defined by a module not included in the server configuration" So it...
48
by: northband | last post by:
Hi, I am interested in re-writing my website in Python vs PHP but have a few questions. Here are my specs, please advise as to which configuration would be best: 1.Dell Poweredge Server, w/IIS,...
8
by: Nagarajan | last post by:
Hi group, I need to develop a web application. I am in a fix as to choose among the various server-side scripting options. I want to explore python (am a newbie) to gain expertise and upon search,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.