![]() |
getting message: oci_execute(): ORA-00942: table or view does not exist - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: getting message: oci_execute(): ORA-00942: table or view does not exist (/showthread.php?tid=72115) |
RE: getting message: oci_execute(): ORA-00942: table or view does not exist - Ahmed Haroon - 11-12-2018 hi all, still getting same error ![]() ![]() regards EDIT: have attached 4 files 1) database.php 2) controller/Depts.php 3) model/Dep_models.php 4) views/Dep_view.php database.php have been modified for 'oracle' (referred to a solution while searching for) as mentioned earlier: Database is Oracle 12c Release 2 unremark in apache/bin/php.ini following lines: extension=pdo_oci extension=oci8_12c ; Use with Oracle Database 12c Instant Client found somewhere and created new php file and it runs, showing data from table.column used in Select statement: ( i know its not CI but PHP ) PHP Code: <?php RE: getting message: oci_execute(): ORA-00942: table or view does not exist - InsiteFX - 11-13-2018 Did you setup the ./application/config/database.php ? If so can you post here that file. RE: getting message: oci_execute(): ORA-00942: table or view does not exist - InsiteFX - 11-13-2018 I will look at the files and get back to you. RE: getting message: oci_execute(): ORA-00942: table or view does not exist - InsiteFX - 11-13-2018 Your database config is wrong, please read this article. Codeigniter Oracle PDO-oci You have all of your code above the CI database code but it is still using the default. RE: getting message: oci_execute(): ORA-00942: table or view does not exist - Ahmed Haroon - 11-13-2018 (11-13-2018, 04:35 AM)InsiteFX Wrote: Your database config is wrong, please read this article. thanks a bunch for your valuable time, I failed to understand, I followed a online tutorial and I don't know about the differences between oci8 and pdo-oci, this is what for I have uploaded files here. I want to use oracle recommended oci8 but if you seniors recommend I will use pdo-oci, I will check with it and give feedback. regards EDIT: checked your link and I have tested with it "dsn" entry in database.php but it was not working, the dbdriver entry has oci8 or i misunderstood it? RE: getting message: oci_execute(): ORA-00942: table or view does not exist - Ahmed Haroon - 11-13-2018 from my attached Dep_models.php, here I am using 'oracle' and the 'default' line is remarked: PHP Code: public function __construct() //model construct function RE: getting message: oci_execute(): ORA-00942: table or view does not exist - php_rocs - 11-13-2018 @ahmed Haroon, I noticed that you had two 'save_queries' in the database.php file. Was that a typo? RE: getting message: oci_execute(): ORA-00942: table or view does not exist - Ahmed Haroon - 11-13-2018 (11-13-2018, 11:14 AM)php_rocs Wrote: @ahmed Haroon, thanks @php_rocs for your reply, i failed to get two 'save_queries' please guide me for this, I want to have to connect multiple databases, here first one is 'oracle' and second is 'mysql' ( i am not trying to teach you as you are far more experienced ), are these correct entries? if not how i can resolve the problem, all necessary files i have uploaded here. if needed i can upload here a zip file of complete project. my current modified ( as @InsiteFX referred to link for PDO-oci ) is now look like below ( entry for mysql database is same in database.php file ): PHP Code: $active_group = 'oracle'; but it is showing error as below (only first lines from both errors): A PHP Error was encountered Message: oci_connect(): ORA-01017: invalid username/password; logon denied A Database Error Occurred Unable to connect to your database server using the provided settings. I can connect with same credentials through SQL Plus (above dsn entry is copy pasted from tnsnames.ora file) please help. regards EDIT: Sorry for inconvenience, I checked again database.php and found what "two save_queries" mean, I have removed 2nd entry but still getting same error as mentioned above. RE: getting message: oci_execute(): ORA-00942: table or view does not exist - php_rocs - 11-14-2018 @ahmed Haroon, How is Oracle configured with PHP? What does your PHP.ini file say for oracle? RE: getting message: oci_execute(): ORA-00942: table or view does not exist - Ahmed Haroon - 11-14-2018 (11-14-2018, 09:46 AM)php_rocs Wrote: @ahmed Haroon, i have modified php.ini file ( in C:\wamp64\bin\apache\apache2.4.35\bin ), line un-remarked for extension=oci8_12c is there anything else to do in this file, i don't know about. i have tried various entries found on web but didn't worked yet. the following entries i have to mention with Error messages: ( now i removed entry in database.php for mysql and keep for oracle only as default and here i am posting partial entries to avoid long list ) PHP Code: //Message: oci_connect(): ORA-01017: invalid username/password; logon denied |