Thanks for the help you can give me.
I am having a problem using OCI8 in PHP 7.2 with PL/SQL statements in Oracle 9i. I am using oracle instant client 11.2.
SQL:
BEGIN
DBMS_OUTPUT.put_line('¡Hola Mundo!');
END;
PHP:
$rs = oci_parse($conn, $SqlCode);
$RExec = @oci_execute($rs);
ERROR:
ORA-06550: line 1, column 7: PLS-00103: Encountered the symbol "" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe The symbol "" was ignored. ORA-06550: line 2, column 42: PLS-00103: Encountered the symbol "" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with
I have problems with all PL / SQL statements in Oracle 9i, but if I try a basic statement like "SELECT * FROM some_table" it works correctly.
If I execute the same PL / SQL statement in Oracle 10 and 11 Database, it works normally.
UPDATE 2020-02-04:
I have a PHP portal, which has a form to save the scripts (PL / SQL Oracle) in a MYSQL database, then in another view I select the script that I want to execute, so I get the script (PL / SQL) that I want to run in an Oracle database.
Locking up the problem, I find that if I read the PL / SQL code or script from the MYSQL database and then execute it, I get the error "ORA-06550: line 1, column 7: PLS-00103: Encountered the symbol", but if I take the code and store it in a variable directly in the PHP file, it executes it correctly.
So the problem must be some character coding issue when I insert or query the MYSQL database to get the pl/sql code that I intend to execute in Oracle database.
Thanks.
$SqlCode
? At a guess I'd wonder if it's a line break/carriage return issue, from the reported position of the errors. – Alex Poole