From: Junmin L. <ju...@pc...> - 2006-01-24 16:39:27
|
Hi, Amruta, Ok, so the issue is that the ora_logon works in command line but not in browser. That is due to the differences of enviroments running in command line and browser. In command, you run the script as "you", I guess, in browser, you run it as "nobody" or "apache", depending on how you set it up. I am pretty sure if you "su" as "apache", then the script will fail. So there are some additional configurations missing to make sure the apache and oracle work together. Unfortuantely my knowledge stops here. Juan, can you help? In terms of the log, there is a php config file /etc/php.ini to set up how php handles the log. You should check it out. User can overwrite some of the log setting in this php.ini, like we do in current RAD-SA version, and print them out to a specific file. In your old version, the log will go to whatever file the php.ini says. ---junmin On Mon, 23 Jan 2006, Amruta Joshi wrote: > Hi, > > I had to recompile php to get the basic script running on command-line. Now > that it is failing in a browser, I suspect if some other php version is > getting called when run from browser. > Is there a way to check this? > >> 1. did you see the login page with user name and password menus when you >> start up the RAD-SA? > yes > >> I assume you did, then you saw the top saying "New users, click here", >> then you click that, and it didn't bring up anything, right? > yes > >> 2. check any output messages in the log file, which is defined in your >> webPropFile's log_file property? any useful message there? > I'm using the older RADSA. It does not have log_file property. Is there any > other way I can know what the error may be. > >> 3. from your email, i have to guess somehow the ora_logon function fails >> in your site, simply because the first "print" runs and second doesn't. > yes. > I forgot to mention that the php script spits out the correct output when > run on command line, but fails on the browser. > >> you can write it in long form: >> >> $db = "(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = >> cbildb03.pcbi.upenn.edu)(PORT = 1521)) ) (CONNECT_DATA=(SID=...... >> $connHandle = ora_logon(DB_USER . "@$db" , DB_PASS); >> Somehow due to the way you set up the oracle, the long string works but >> short string doesn't. I guess that may be your case. > I tried using the long string. The same problem continues viz. works on > command line and fails in browser. > > thanks, > Amruta >> >> >> >> >> On Sun, 22 Jan 2006, Amruta Joshi wrote: >> >>> Hi, >>> >>> I'm trying to set up RAD StudyAnnotator using OCI. >>> I'm facing a similar problem as Juan faced earlier. >>> When I try to run user_registration.php from the web-browser, I get a >>> blank page >>> >>> I get no warning messages. In fact the function ora_logon itself fails >>> and does not return. >>> I just added 2 print statements before and after the ora_logon call in >>> include.php dbConnectionSetup function. >>> The first print is output, but not the second. Any idea where I might >>> have messed up? >>> >>> Regards, >>> Amruta >>> >>> >>> print "Trying:dbConnectionSetup"; >>> $connHandle = ora_logon(DB_USER . "@" . DB_NAME, DB_PASS); >>> print "dbConnectionSetup:ora_logon returned ".$connHandle; >>> // check if connect was successful >>> if ($connHandle <= 0) { >>> Header( "WWW-authenticate: basic realm=\"Oracle Realm\""); >>> Header( "HTTP/1.0 401 Unauthorized"); >>> printf( "Could not log into the DB.<br>"); >>> exit; >>> } >>> } >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.net email is sponsored by: Splunk Inc. Do you grep through log >>> files >>> for problems? Stop! Download the new AJAX search engine that makes >>> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 >>> _______________________________________________ >>> Gusdev-rad-issues mailing list >>> Gus...@li... >>> https://lists.sourceforge.net/lists/listinfo/gusdev-rad-issues >>> > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > _______________________________________________ > Gusdev-rad-issues mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-rad-issues > |