Server Side php script for Oracle
Server Side php script for Oracle
Hello everybody
I'm a newbie to datatables.
I'm struggleling for more than a week to make the ss-oracle-PHP-script working
My configuration = Xampp on windows 7 with apache 2.2. , php 5.3.5. and Oracle 11g on remote Database server
My PHP queries on that database runs very well.
But when I run the script I'v got the same problems as Dar descripted.
I get the error: JSON formatting error
In the apache error logggng i get this warning:
Warning: oci_bind_by_name() [function.oci-bind-by-name]: ORA-01036: illegal variable name/number in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 234
Has anyone of you suggestions /solutions ?
Thanks in advance for your help.
Ton
I'm a newbie to datatables.
I'm struggleling for more than a week to make the ss-oracle-PHP-script working
My configuration = Xampp on windows 7 with apache 2.2. , php 5.3.5. and Oracle 11g on remote Database server
My PHP queries on that database runs very well.
But when I run the script I'v got the same problems as Dar descripted.
I get the error: JSON formatting error
In the apache error logggng i get this warning:
Warning: oci_bind_by_name() [function.oci-bind-by-name]: ORA-01036: illegal variable name/number in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 234
Has anyone of you suggestions /solutions ?
Thanks in advance for your help.
Ton
This discussion has been closed.
Replies
I'm not 100% sure I'm afraid as I didn't write that script and haven't used Oracle with PHP before, but I would suggest printing out the values of $sQueryFinal and $dsplyRange and checking that they are sensible. The basic idea in the script looks fine, but it must be objecting to something in that line...
Allan
Thank you for for your quick repsonse !!!
Here I'll put the values of my debugger and $queryfinal + dsplyRange
Maybe you can see the problem
Thanks in advanced
Ton
[quote] Connection OK
( ! ) Notice: Undefined variable: sOrder in D:\PHP\PHP_Projecten\ton\ora_conn.php on line 197
Call Stack
# Time Memory Function Location
1 0.0011 394808 {main}( ) ..\ora_conn.php:0
( ! ) Warning: oci_bind_by_name() [function.oci-bind-by-name]: ORA-01036: illegal variable name/number in D:\PHP\PHP_Projecten\ton\ora_conn.php on line 242
Call Stack
# Time Memory Function Location
1 0.0011 394808 {main}( ) ..\ora_conn.php:0
2 0.1049 401360 oci_bind_by_name ( ) ..\ora_conn.php:242
( ! ) Warning: oci_bind_by_name() [function.oci-bind-by-name]: ORA-01036: illegal variable name/number in D:\PHP\PHP_Projecten\ton\ora_conn.php on line 243
Call Stack
# Time Memory Function Location
1 0.0011 394808 {main}( ) ..\ora_conn.php:0
2 0.1065 401800 oci_bind_by_name ( ) ..\ora_conn.php:243
Resource id #3:whereParam8 SELECT WKG_ID, WKG_NAAM, ADM_ID, WKG_AANSLUITNR_UWV, WKG_STRAAT, WKG_HUISNUMMER, WKG_POSTCODE, WKG_PLAATS FROM (SELECT WKG_ID, WKG_NAAM, ADM_ID, WKG_AANSLUITNR_UWV, WKG_STRAAT, WKG_HUISNUMMER, WKG_POSTCODE, WKG_PLAATS, row_number() over () rowsNumerator FROM werkgever WHERE 1=1) qry ORDER BY rowsNumerator :SELECT WKG_ID, WKG_NAAM, ADM_ID, WKG_AANSLUITNR_UWV, WKG_STRAAT, WKG_HUISNUMMER, WKG_POSTCODE, WKG_PLAATS FROM (SELECT WKG_ID, WKG_NAAM, ADM_ID, WKG_AANSLUITNR_UWV, WKG_STRAAT, WKG_HUISNUMMER, WKG_POSTCODE, WKG_PLAATS, row_number() over () rowsNumerator FROM werkgever WHERE 1=1) qry ORDER BY rowsNumerator 2147483645 : 214748364511578
( ! ) Warning: oci_execute() [function.oci-execute]: ORA-30485: missing ORDER BY expression in the window specification in D:\PHP\PHP_Projecten\ton\ora_conn.php on line 281
Call Stack
# Time Memory Function Location
1 0.0011 394808 {main}( ) ..\ora_conn.php:0
2 0.1120 402024 oci_execute ( ) ..\ora_conn.php:281
( ! ) Warning: oci_fetch_array() [function.oci-fetch-array]: ORA-24374: define not done before fetch or execute and fetch in D:\PHP\PHP_Projecten\ton\ora_conn.php on line 283
Call Stack
# Time Memory Function Location
1 0.0011 394808 {main}( ) ..\ora_conn.php:0
2 0.1177 402072 oci_fetch_array ( ) ..\ora_conn.php:283
( ! ) Notice: Undefined index: sEcho in D:\PHP\PHP_Projecten\ton\ora_conn.php on line 295
Call Stack
# Time Memory Function Location
1 0.0011 394808 {main}( ) ..\ora_conn.php:0
( ! ) Warning: oci_execute() [function.oci-execute]: ORA-30485: missing ORDER BY expression in the window specification in D:\PHP\PHP_Projecten\ton\ora_conn.php on line 302
Call Stack
# Time Memory Function Location
1 0.0011 394808 {main}( ) ..\ora_conn.php:0
2 0.1204 402128 oci_execute ( ) ..\ora_conn.php:302
( ! ) Warning: oci_fetch_array() [function.oci-fetch-array]: ORA-24374: define not done before fetch or execute and fetch in D:\PHP\PHP_Projecten\ton\ora_conn.php on line 305
Call Stack
# Time Memory Function Location
1 0.0011 394808 {main}( ) ..\ora_conn.php:0
2 0.1264 402280 oci_fetch_array ( ) ..\ora_conn.php:305
{"sEcho":0,"iTotalRecords":"11578","iTotalDisplayRecords":0,"aaData":[]}
[/quote]