Entry
Call to undefined function: ociplogon() with Apach4, PHP4, Oracle 8i.
Nov 7th, 2001 00:52
Sally Greenaway, Lee Wright,
This is question is a little ambiguous but below is some code which
definitely works.
<?
$db="database_name";
$connection=ocilogon("username","password",$db) or die ("Couldn't
Logon");
?>
<?
$sql="select fieldname1, fieldname2 from table1";
$sql_parse=ociparse($connection,$sql) or die("Couldn't Parse");
ociexecute($sql_parse) or die ("Couldn't Execute");
?>
<TABLE BORDER=1>
<TR><TH>Column1</TH><TH>Column2</TH></TR>
<?
while(ocifetchinto($sql_parse, &$arr_Arrayname,
OCI_ASSOC+OCI_RETURN_NULLS))
{
?>
<TR><TD><?=$arr_Arrayname['FIELDNAME1']?></TD>
<TD><?=$arr_Arrayname['FIELDNAME2']?></TD>
</TR>
<?{?>
</TABLE>
If this code doesn't work and you get the same error then I would think
that there is something wrong with the connection between PHP and
Oracle. Check the dll extensions that are in use in the php.ini if you
are using windows. If using Orcle8i then you only need to have the
php_oci8.dll extension un-commented, the php_oracle.dll one is for
earlier versions of Oracle and conflicts if both are uncommented.
If this still doesn't help, re-check all installation for Apache,
Oracle and PHP.