database dumping on browser

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi everyone !

This is my code

echo "hi";
echo "ABHOWMIC"."<br>";
    $s=oci_parse($c,"select sr_no,tot_age,bug from age_sr where
            $a = OCIResult($s, "SR_NO");
        echo $a;

Problem is, this code is showing required data on the command prompt
window but not on the browser. Can someone tell me why ???????....

Re: database dumping on browser

Aditi Jindal escribió:
Quoted text here. Click to load it

Is the web server in the same computer as the command prompt? You do not
check whether oci_connect() was successful so you might not even be able
to connect to the Oracle server.

-- - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:
-- Mi web de humor al baño María:

Re: database dumping on browser

On Mar 24, 3:21=A0pm, "=C1lvaro G. Vicario"
Quoted text here. Click to load it

Yes web server is on the same machine as the command prompt. Database
is on other machine. oci_connect() was successful. I have put display
errors as ON but no errors on on the browser.
In the given code when i run it on the browser echo "hi"; runs fine
but line echo "ABHOWMIC"."<br>";  does'nt work that means oci_connect
is not working in browser but it is working fine in command prompt.
Why ?

Re: database dumping on browser

Aditi Jindal wrote:
Quoted text here. Click to load it

if you use the command line for executing php your are using the CLI of php
which could be a different package.
On Gentoo it is all installed with the dev-lang/php package.
But on other OS it could that there are two different packages. Those packages
can be configured differently, so it could be that the command line version has
some functions which the webserver module does not have.


Re: database dumping on browser

Quoted text here. Click to load it

I could conjecture about various things which would cause this,
however, the real problem is that you've got no error checking in your
code. check the results of oci_connect, oci_parse, oci_execute and
oci_fetch and call oci_error if any of them fail.


Site Timeline