[PHP] RV: Call to Oracle stored procedure

2005-02-21 Thread Jose Angel Sanchez \(Jone\)

Hi everybody..

I have two servers:

LINUX DEBIAN WEB SERVER (apache, php, oracle client) and LINUX REDHAT
ADVANCED SERVER (Oracle Database Server)

I can execute all kind of basic sql from php to oracle, it works fine
except accents and symbol of html's ntilde; (I'm Spanish)

But the problem comes when I try to call a stored procedure using
variable binding:

$db_conn = ocilogon ($GLOBALS[User],
$GLOBALS[Password],$GLOBALS[DatabaseName]);
$cmdstr = 'begin MyPackage.MyProcedure(:var1, :var2); end;';

$parsed = ociparse($db_conn, $cmdstr);

OCIBindByName($parsed,':var1',$firstVar);
OCIBindByName($parsed,':var2',$secondVar);

OCIExecute($parsed,OCI_DEFAULT);



Output error:

Warning: ociexecute(): OCIStmtExecute: ORA-06550: line 1, column 30:
PLS-00553: character set name is not recognized ORA-06550: line 0,
column 0: PL/SQL: Compilation unit analysis terminated in
/var/www/test.php on line 913

Column 29 is ':' character.

I have been looking for solutions all around the whole web and many
forums, setting environment variables like NLS_LANGUAGE and others... on
linux, apache and php, but the same.

Does anybody know what must I exactly set on system or code to make it
works?

I'have this problem from 2 months ago to now, and nobody knows how to
do!! (except any of you, I wish).

Thx for reading...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Refresh Problem

2005-02-10 Thread Jose Angel Sanchez \(Jone\)
Hi 

First of all: I'm sorry for writing errors - I don't speak English too
much (spanish)

I'm building an application which works that way:

I use url parameters to set zone (document location), actions and
params.

I've badly make security part so only registered people
($_session['USER'] - which is set after check Login/pass form) can
access different zones but my problem is on refreshing page that
contains action

i.e.
http://www.mypage.com?index.phpzone=contactaction=newcontactname=geor
ge

only registered/valid users can make this zone code runs

my pseudocode basicly works this way:

function contactzone (no params)

get URL parameters (like $action=$_get['action']

some code

switch ($action)

case 'new'
$html.= show form (on submit set action to
'newcontact'
break;
case 'newcontact'
Insert on database
On success - $html
Default
Show simple $html
}
some code

return $html


My problem is on refresh or back events on navigator; the action will
execute again.

How do I prevent that? Session variables? Check a single table storing
used hashes sent by form (generated with md5 or any) on all forms
containing actions event for all tables? What do you think?

Sorry again and thx for reading and helping :D

j0n3 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php