user3435234 user3435234 - 3 months ago 25
PHP Question

500 error when select clob field in oracle 11g

When iam running my oracle query showing 500 error in server. The error showing when selecting clob field in oracle query.The field contains big json data

Error is:


HTTP Error 500.0 - Internal Server Error C:\php7.0.3\php-cgi.exe - The
FastCGI process exited unexpectedly


here my query:

SELECT knowyour.*,
kp.personal_details AS personal_details,
kp.fullname,
kcd.category,
kcd.ID AS kycID
FROM
(SELECT DISTINCT kc.kyc_reffer_id,
kc.ID,
kc.customer_id,
kc.json_details AS json_details,
kc.customer_joint_id,
kc.customer_id AS kycCustomer_id
FROM db.knwcustomer kc
) knowyour
INNER JOIN db.createdetails kcd
ON (knowyour.customer_id=kcd.customer_id)
INNER JOIN db.personaldetails kp
ON (knowyour.kyc_reffer_id=kp.kyc_reffer_id)
LEFT JOIN db.kaccountdetails kd
ON (knowyour.customer_id=kd.customer_id)

WHERE kcd.displayStatus!=:status
AND kcd.category=:category
AND kd.status!=:status
AND kp.status!=:status
AND kcd.client_id=:client_id
ORDER BY kcd.ID


here status = -1

(query running in php pdo)

This is an example query.

personal_details and json_details are clob fields.Distinct will not work when selecting clob field that's why Iam using this query method.

is this code problem or server problem? But this code is working perfectly in my local wamp server not in online server.

I need help !

Answer

Have you tried querying only one clob field from concrete table?

Like:

SELECT CLOB_FIELD 
FROM EX_TABLE;

If this will work, there is probably a problem in a query itself. Your query is complex enough to hide some issues.