NoorAdiga Posted October 15, 2008 Share Posted October 15, 2008 Hey all, hope u all doing well I'm new to PHP and Oracle database .... and I'm building a website that should be connected to Oracle database but the problem is , I can't start the basic connection :'( :-\ I installed AppServ 2.6 with PHP6 and I copy the php_oci8.dll file to the PHP6 file, but I read that php_oracle.dll should be also copied, so I download it from the internet and added it to php6 folder after that I opened php.ini and remove the comment for both libraries extension=php_oci8.dll extension=php_oracle.dll And I edited this line extension_dir = "C:\AppServ\php6" but I keep having this error: Fatal error: Call to undefined function oci_logon() in C:\AppServ\www\test.php The code: <?php //File: dbtime.php $dbHost = "localhost"; $dbHostPort="1521"; $dbServiceName = "orcl"; $usr = "USER"; $pswd = "PASS"; $dbConnStr = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST=".$dbHost.")(PORT=".$dbHostPort.")) (CONNECT_DATA=(SERVICE_NAME=".$dbServiceName.")))"; if(!$dbConn = oci_logon($usr,$pswd,$dbConnStr)) $err = oci_error(); $strSQL = "SELECT TO_CHAR(SYSDATE, ‘HH:MI:SS') ctime FROM DUAL"; $stmt = oci_parse($dbConn,$strSQL); if (!oci_execute($stmt)) { $err = oci_error($stmt); }; oci_fetch($stmt); //$rslt = oci_result($stmt,‘CTIME'); echo "<h3>The current time is $rslt </h3>"; ?> I'm so desperate now :'( ??? , I spent the last three hours searching for a solution but I didn't find Please any suggestions ?!?!? Noor Quote Link to comment https://forums.phpfreaks.com/topic/128572-cant-start-a-connection-between-php-and-oracle-database/ Share on other sites More sharing options...
NoorAdiga Posted October 18, 2008 Author Share Posted October 18, 2008 Hey Folk ... I wonder why no body answered me, even some ppl read the post .... anyway.... I find the solution for my problem and I though to get back here and post the answer check this link http://me2learn.wordpress.com/2008/10/18/connect-php-with-oracle-database/ I want to change this post to be green and solved, I'm new here and I think i dunno how .... so it's SOLVED Regards, Noor Quote Link to comment https://forums.phpfreaks.com/topic/128572-cant-start-a-connection-between-php-and-oracle-database/#findComment-668648 Share on other sites More sharing options...
NoorAdiga Posted October 18, 2008 Author Share Posted October 18, 2008 Quote Link to comment https://forums.phpfreaks.com/topic/128572-cant-start-a-connection-between-php-and-oracle-database/#findComment-668649 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.