Re: [cx-oracle-users] Python and Oracle DB API (cx_oracle)
Brought to you by:
atuining
From: Me <zed...@ya...> - 2011-06-05 01:13:02
|
Hi thanks for your reply. what I am wondering about is, why my script shown in previous email doesn't generate the expected result which is showing 'X' in browser after execution.? explained in the Oracle page for cx_oracle db api for python. the oracle URL from which I downloaded and followed for installation is: http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html why this simple script doesn't get executed by apache? ----------------------------------------------------- another question I like to ask you is: where can I get a .exe for installing mod_python? (for python 2.7 and apache 2.2) I've read the manual process for installing modpython in this web site: http://www.modpython.org/live/mod_python-2.7.8/doc-html/app-wininst.html but it requires 'mod_python.dll' which I don't know where and how to get it after googling it. it seems hard to find modpython for automation installation. one has advise me to use 'mod_wsgi' and he said it's better then 'modpython' since i need it for web base apps in python. if you know how \ where to get modpython full installation Please give me the URL. thanks We are all equal at the end. ________________________________ From: Marco De Paoli <dep...@gm...> To: cx-...@li... Sent: Fri, June 3, 2011 11:47:53 PM Subject: Re: [cx-oracle-users] Python and Oracle DB API (cx_oracle) cx_Oracle 5.1 is the current version (I suggest you to use that and not not the 4.X) First of all build a minimal script that works at the command line. Only at that point you can build a web version psp means a mod_perl script (Apache settings are OT in this ML) Marco On Sat, Jun 4, 2011 at 4:33 AM, Me <zed...@ya...> wrote: Hello All > > >I'm newbie to Python, Oracle and Apache 2.2 >I've installed python 2.7 (ActiveState version), apache 2.2 and Oracle 10g XE. > > >All of them running in the same machine with XP as a OS. > > >I yet don't have 'mod_python' installed but I am planing to do so later. >(just using CGI script for time being although for web development i've read >mod_python is the best.) > > >I just download the 'cx_Oracle-4.1.2-win32-10g-py27.exe' from the Oracle web >site which is: >(http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html) > > >the installation went smooth with no problem as the above site walks through. >then as site instructed::Create a file ora.psp under APACHE_HOME/htdocs to see >whether the cx_Oracle module is working properly. >-------------------------------------- ><% >import cx_Oracle >db = cx_Oracle.connect('username', 'password', '127.0.0.1/XE') >c = db.cursor() > >c.execute('select * from dual') >req.write(c.fetchall()[0][0]) > >db.close() >%> > >I put my username\pass for log in to Oracle as it works with database after >login. >------------------------------------ >i did save the file in notepad and put it in C:\Program Files\Apache Software >Foundation\Apache2.2\htdocs\ora.psp ( i saved as: "ora.psp" to eliminated the >extra extention) > > > >when i go to url: ( http://127.0.0.1/ora.psp ) it just shows the content of the >file like in notepad.(plain code) as it supposed to show 'x' in browser. (as a >result of execuation of file) > > >Apache 2.2 runs in port 80 (default) >Oracle : http://127.0.0.1:8080/apex/f?p=4550:11:4261762709150240::NO::: (login >page) > > >However at python command prompt when I execute the following: >>>> import cx_Oracle >>>> print 'The version of cx_oracle is: ', cx_Oracle.version >The version of cx_oracle is: 5.1 > >------------------------------------ > > >Please help me to fix this test which is for connection to oracle. > Is it because of I yet don't have mod_python installed in my machine? > > >Your help much appreciated. > > > Pink Floyd: >>>> We are all equal at the end. > > >------------------------------------------------------------------------------ >Simplify data backup and recovery for your virtual environment with vRanger. >Installation's a snap, and flexible recovery options mean your data is safe, >secure and there when you need it. Discover what all the cheering's about. >Get your free trial download today. >http://p.sf.net/sfu/quest-dev2dev2 >_______________________________________________ >cx-oracle-users mailing list >cx-...@li... >https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |