aliga8er Posted October 8, 2009 Share Posted October 8, 2009 Hello to whoever reads this, well i am having a problem in running a php script that accesses oracle database, my system configuration is as follows:- - Windows Xp sp2 - Oracle 9i - Apache 2 - php 5.2.11 i had to uninstall apache 1.3 that comes with the oracle 9i, because i wanted to use the newer version of apache. Now, the problem is if i run the php script below it doesn't display data on the browser, the only output that the browser displays is the 'OCI Test' which suggests that php is correctly configured with the apache. i have also uncommented the php_oci8.dll in the php.ini file <html> <head><title>PHP Test with Oracle</title></head> <body> <pre> <?php echo "<h1>OCI Test</h1>\n"; $conn=OCILogon("scott", "tiger", "DB10G"); $stmt = OCIParse($conn, "SELECT table_name FROM user_tables ORDER BY table_name"); OCIExecute($stmt, OCI_DEFAULT); while (OCIFetch($stmt)) { $table_name = OCIResult($stmt, "TABLE_NAME"); echo "$table_name<br />\n"; } OCIFreeStatement($stmt); OCILogoff($conn); ?> </pre> </body> </html> I can't seem to understand the problem. Quote Link to comment https://forums.phpfreaks.com/topic/176952-php5211-oracle-9i-problem/ Share on other sites More sharing options...
aliga8er Posted October 8, 2009 Author Share Posted October 8, 2009 Sorry guys, being a newbie i didnt know that i had to enable the "display_error" in the php.ini file ...which showed me the error, Fatal error: Call to undefined function OCILogon() in D:\Apache\htdocs\test2.php on line 8..but now im kinda stuck as to what shud i do..Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/176952-php5211-oracle-9i-problem/#findComment-933041 Share on other sites More sharing options...
cags Posted October 8, 2009 Share Posted October 8, 2009 Did you restart apache after making the change to the php.ini file? If not then do it, you have to restart Apache for changes to take effect. I'm not familliar with the function, but I looked it up on php.net and it's apparently an alias of oci_connect() have you tried using that instead? I highly doubt it will make a difference, but hey, worth a shot it'll take 2 seconds. Quote Link to comment https://forums.phpfreaks.com/topic/176952-php5211-oracle-9i-problem/#findComment-933162 Share on other sites More sharing options...
aliga8er Posted October 9, 2009 Author Share Posted October 9, 2009 Thanx cags, for taking tyme in replying to my problem....i did restart apache, as a matter of fact i restart apache with every change that i make ...well i did alot of search in different forums n i found someone's post with the same problem saying that php5's php_oci.dll file doesnt work with oracle 9i ..for that id need an oracle 10g instant client installed......but my requirement is to have an oracle 9i RDBMS ...soo wat should i do now?? Quote Link to comment https://forums.phpfreaks.com/topic/176952-php5211-oracle-9i-problem/#findComment-933699 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.