PHP- Oracle not working- Call to undefined function OCILogon() ERROR

Hi,
I am trying to just do a test program to test php - oracle connection,
My versions are: php5.2.1-Win32 and Oracle 10g
I have made the following settings:
1.) Uncommented the following lines in php.ini:
extension=php_oci8.dll
extension=php_oracle.dll
2.) Set extension_dir = "C:\php-5.2.1-Win32\ext"
Changed the httpd.conf file as: ADDED
1.)LoadModule php5_module C:/php-5.2.1-Win32/php5apache2.dll
2.)PHPIniDir "C:/Program Files/Apache Group/Apache2/conf-"
3.) LoadFile "C:/php/php5ts.dll"
4.)<IfModule php5_module>
<Location />
AddType text/html .php .phps
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps
</Location>
</IfModule>
5.) AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
But when I am tryin to run the following program:
<?php
echo "<h1>OCI Test</h1>\n";
$conn=OCILogon("system", "sheetal16", "orcl");
$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);
?>
I am getting the following error:
OCI Test
Fatal error: Call to undefined function OCILogon() in C:\Program Files\Apache Group\Apache2\htdocs\test2.php on line 3
Please help me to solve this problem.
Thanks,
Sheetal

See Re: PHP- Oracle not working- Call to undefined function OCILogon() ERROR

Similar Messages

  • Fatal error: Call to undefined function ocilogon() in d:\SITO\VENTST.php on

    Hi all,
    when I use this php script
    <?php
    $db_conn = ocilogon("venus_pkg","venus_pkg","ventst");
    ?>
    I get this error:
    Fatal error: Call to undefined function ocilogon() in d:\SITO\VENTST.php on line 3
    How to configure Apache 1.3.3 with PHP version 5 to use OCI?
    Thanks in advance

    Hi,
    Even I am facing the same problem. I have done all the above mentioned settings. I have set the php.ini file with the extension dirt to "php/ext" and also uncommented the extension=phpoci8.dll . we r using PHP5.2.0, Apache 2.2 and Oracle 10g and installed both the XE and the Client edition of oRACLE 10G on windows XP.
    Trying to execute the code:
    <?php
    echo "<h1>OCI Test</h1>\n";
    $conn=OCILogon("username", "password", "system");
    $stmt = OCIParse($conn, "SELECT * FROM employee ORDER BY name");
    OCIExecute($stmt, OCI_DEFAULT);
    while (OCIFetch($stmt)) {
         $table_name = OCIResult($stmt, "employee");
         echo "$table_name<br />\n";
    OCIFreeStatement($stmt);
    OCILogoff($conn);
    ?>
    and getting the error as:
    Debug Error: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test.php line 3 - Call to undefined function OCILogon()
    Please help me out solving this problem.

  • Fatal error: Call to undefined function OCILogon()

    Dear,
    Under WinXp_Sp2 in iis I installed 5.1.6. It worked fine but when used with oracle 9.2.0.1.0 it gives error "Fatal error: Call to undefined function OCILogon()" while other extensions are working fine in extension dir. Please help me.
    Thanks & regards.
    Jamil

    You haven't mentioned having 9i installed locally. This way it should work well but in some cases ORACLE_HOME dependencies could not be resolved. If you need precise information what file to put where try the filemon utility.
    http://www.sysinternals.com/Utilities/Filemon.html
    It would show you the files php is trying to access in order to make use of the oci module.

  • Error -Call to undefined function: ocilogon() ( Php4.4+ Apache2.2 +Windows)

    1) Configured Php4.4 to have oci8 enabled with Apache2.2 on Windows 2000 ( service pack4). No error at the time of Apache start but when trying to connect to Oracle using Oracle Instant Client below error is thrown..
    "Fatal error: Call to undefined function: ocilogon() in C:\Apache2 \htdocs\star\dbconnect.php on line 7"
    Configuration steps..
    1) Uncommented "extension=php_oci8.dll" in php.ini to enable oci API's.
    2)Configured Oracle Instant client by adding path to Windows path variable as per it documentation.
    3)Copied all Php4.4 dlls( oci..etc) into the directory pointed by "PHPIniDir", which is configured in httpd.conf
    If i run phpinfo(), i dont see oci8 enabled in the output. I guess there is problem in the configuration? Any insights into the error is greatly appreciated..
    BTW, I did same configuartion on Windows XP and is working fine..

    Also, I dont see path value for path variable in phpinfo() ouput for Oracle Instant Client, which i updated in Windows?
    Below is the snippet of ouput from phpinfo().
    Apache Environment
    Variable Value
    HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
    HTTP_ACCEPT_LANGUAGE en-us
    HTTP_ACCEPT_ENCODING gzip, deflate
    HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
    HTTP_HOST localhost
    HTTP_CONNECTION Keep-Alive
    PATH D:\CESi\isis\bin;D:\CESi\Gateway\mico-win32-bin\;D:\CESi\Gateway\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Support Tools\
    SystemRoot C:\WINNT
    COMSPEC C:\WINNT\system32\cmd.exe
    PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    WINDIR C:\WINNT
    SERVER_SIGNATURE <address>Apache/2.0.59 (Win32) PHP/4.4.4 Server at localhost Port 80</address>
    SERVER_SOFTWARE Apache/2.0.59 (Win32) PHP/4.4.4
    SERVER_NAME localhost
    SERVER_ADDR 127.0.0.1
    SERVER_PORT 80
    REMOTE_ADDR 127.0.0.1
    DOCUMENT_ROOT C:/Apache2/htdocs
    SERVER_ADMIN [email protected]
    SCRIPT_FILENAME C:/Apache2/htdocs/info.php
    REMOTE_PORT 4977
    GATEWAY_INTERFACE CGI/1.1
    SERVER_PROTOCOL HTTP/1.1
    REQUEST_METHOD GET
    QUERY_STRING no value
    REQUEST_URI /info.php
    SCRIPT_NAME /info.php
    Environment
    Variable Value
    ALLUSERSPROFILE C:\Documents and Settings\All Users
    CMM_CELL CSTAR_STAR
    CommonProgramFiles C:\Program Files\Common Files
    COMPUTERNAME STAR-SM-NR-PROD
    ComSpec C:\WINNT\system32\cmd.exe
    NUMBER_OF_PROCESSORS 2
    OS Windows_NT
    Os2LibPath C:\WINNT\system32\os2\dll;
    Path D:\CESi\isis\bin;D:\CESi\Gateway\mico-win32-bin\;D:\CESi\Gateway\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Support Tools\
    PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    PROCESSOR_ARCHITECTURE x86
    PROCESSOR_IDENTIFIER x86 Family 6 Model 11 Stepping 1, GenuineIntel
    PROCESSOR_LEVEL 6
    PROCESSOR_REVISION 0b01
    ProgramFiles C:\Program Files
    SMS_LOCAL_DIR C:\WINNT
    SystemDrive C:
    SystemRoot C:\WINNT
    TEMP C:\WINNT\TEMP
    TMP C:\WINNT\TEMP
    USERPROFILE C:\Documents and Settings\xwback
    windir C:\WINNT
    AP_PARENT_PID 884

  • Re: Fatal error: Call to undefined function ocilogon() in d:\SITO\VENTST.ph

    http://www.oracle.com/technology/tech/php/htdocs/inst_php_apache_windows.html
    I have followed all these instructions, installed what was specified (including all versions needed).
    First problem I encountered was there were no oci8 title in phpinfo.php,
    Second was when I compiled the oci8test.php it brings this error,
    Fatal error: Call to undefined function ocilogon() in C:\Program Files\Apache Group\Apache2\htdocs\ocisample.php on line 3
    As I said, I have followed exactly what was specified in the instructions, yet the error is persistent.
    Actions taken:
    restarted apache
    checked folder locations
    checked php.ini-recommended
    checked httpd.conf
    everything is where they need to be.
    I need help.
    Thanks everyone. Have a nice day.

    If this is line #3, then try changing "//127.0.0.1/XE" to "localhost", or better yet to your TNS alias, which is typically "XE".
    $db_conn = ocilogon("hr", "your_hr_password", "//127.0.0.1/XE");
    It should look like this if you're using a USER account of test with a password of test:
    $db_conn = ocilogon("test","test","XE");

  • Oci not loaded (Call to undefined function oci_connect)

    hi
    i have oracle linux with oracle database 11gR2
    i install php with oci as the following link :
    http://oss.oracle.com/projects/php/dist/documentation/installation.html
    but when i try phpinfo() i found just only
    *" /etc/php.d/oci8.ini"* in the result
    and when i test connection i have this error
    *" Fatal error: Call to undefined function oci_connect() "*

    Cross-posted
    Re: problem with httpd and oracle database

  • Getting Fatal error: Call to undefined function mysql_connect() error.

    ok, so before I had my mysql_connect php script and it ran fine, no errors, but once I changed my php.ini file to give ERROR_REPORTING E_ALL I now get Fatal error: Call to undefined function mysql_connect(). I am just wondering how I can fix this?
    I followed the arch linux LAMP wiki and I can't figure out why I am getting this error after turnning on error_reporting.
    Thanks
    this is my php code
    <?php
    $connection = mysql_connect('localhost', 'root', 'password');
    if(!$connection){
    echo mysql_error();
    } else {
    echo 'connected';
    if (!mysql_select_db('my_first_db')){
    echo 'uh';
    } else {
    echo 'selected database';
    ?>
    <?php phpinfo(); ?>
    Last edited by clandest (2012-03-22 04:36:43)

    aking9 wrote:grabbing into the back of the back of my memory here but don't you need to specify a port to connect to?
    Only if you change the port from the default 3306. But even then, a different error message will output, in this case the mysql modules have not loaded for some reason.
    There is a syntax error in your php.ini file, at line 510. Comment out this line as it's a line giving information rather than an option. Then uncomment the error_reporting option.
    So this:
    Default Value: E_ALL & ~E_NOTICE
    ; Development Value: E_ALL | E_STRICT
    ; Production Value: E_ALL & ~E_DEPRECATED
    ; http://php.net/error-reporting
    ;error_reporting = E_ALL & ~E_DEPRECATED
    Should be changed to this:
    ; Default Value: E_ALL & ~E_NOTICE
    ; Development Value: E_ALL | E_STRICT
    ; Production Value: E_ALL & ~E_DEPRECATED
    ; http://php.net/error-reporting
    error_reporting = E_ALL & ~E_DEPRECATED
    After this try "sudo /etc/rc.d/httpd restart" then see if you have any better luck connecting to mysql.
    Last edited by astiak (2012-03-22 23:24:40)

  • Fatal error: Call to undefined function add__custom_background() in /home4/dargonza/public_html/wp-content/themes/twentythirteen/functions.php on line 24

    Fatal error: Call to undefined function add__custom_background() in /home4/dargonza/public_html/wp-content/themes/twentythirteen/functions.php on line 24
    While practicing with HTML with WordPress Themes, I inserted a phrase (add_custom_background) in the wrong sentence.

    Its wordpress theme issue
    *issue in path location
    Try with wordpress forum
    *http://wordpress.org/support/
    May be try this
    *http://wordpress.org/support/topic/fatal-error-call-to-undefined-function-add_custom_background

  • My iphone 4 fell down from 3 feet height and display is not working now, phone is functioning with calls and messages etc.. except no display :( please advise me a corrective action...

    my iphone 4 fell down from 3 feet height and display is not working now, phone is functioning with calls and messages etc.. except no display please advise me a corrective action...

    Take it to an Apple Store and see about getting an out of warranty replacement. I believe it will run you about $150.

  • Fatal error: Call to undefined function oci_connect()

    I get below error when I try to connect to oracle in PHP on SUSE 10. I orginally posted this question in PHP forum but I was advised to post it to Linux forum. so here is the error and other details.
    Fatal error: Call to undefined function oci_connect()
    I followed one of the documentation realed to this error and I get below error.
    /home/knaik # php -version
    PHP 5.2.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 23 2008 23:35:28)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    /home/knaik/oci8-1.3.5 # phpize
    Configuring for:
    PHP Api Version: 20041225
    Zend Module Api No: 20060613
    Zend Extension Api No: 220060519
    Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
    environment variable is set correctly and then rerun this script.
    I was looking into below link. But I could not find oci8.so file after the OCI build.
    http://www.orware.net/tips-and-how-tos/plesk/46-oracle-oci8-php-installation.html
    ===================================================
    ===> In reply to my request *"mgogala's"* reply was as below.
    Install autoconf using yast. Check whether the package is installed by using:
    $>rpm -qa autoconf
    autoconf-2.59-5
    BTW, this is not a Linux forum. There is one on OTN, I'm sure that Frits Hoogland will gladly help you out.
    ====>
    I am not able to find "autoconf" rpm for Suse 10.
    Below is the exact version details of the O/S.
    #*more SuSE-release*
    SUSE Linux Enterprise Server 10 (i586)
    VERSION = 10
    PATCHLEVEL = 2
    #*uname -a*
    Linux osdvglobalopsdv02 2.6.16.60-0.21-smp #1 SMP Tue May 6 12:41:02 UTC 2008 i686 i686 i386 GNU/Linux
    Please let me know, from where can I download this RPM?
    Thanks
    Shelly

    btw, this is the oracle enterprise linux forum, the forum specific for oracle's linux distro, there is a general linux forum here: Generic Linux

  • Call to undefined function: oci_parse()

    Hi guys, I'm working with php and oracle.
    I use easyphp to load my file on local server.
    When I try to execute this code
    <?php
    if ($c=OCILogon("xxxx", "xxxx")) {
    echo "Successfully connected to Oracle.\n";
    OCILogoff($c);
    } else {
    $err = OCIError();
    echo "Oracle Connect Error ";
    ?>
    The result is:
    Successfully connected to Oracle!
    But when I have to modify my table, so when I try to use
    oci_parse, oci_connect
    The result is:
    Call to undefined function: oci_parse()
    I have uncomment the extension php_oci8.dll e php_oracle.dll
    in easyphp/conf_files/php
    easyphp/php/php.ini
    Can you help me??
    thanks!!

    Wrong forum, try posting here instead:
    PHP

  • [SOLVED]Call to undefined function mysql_connect()

    Hi. Up until this point I have had mysql, php, and apache up and running just fine. Recently I made a little change. I configured Apache to read my .php pages from /home/user/code/php instead of /srv/http. It wasn't working originally so I created a new http user using this command:
    useradd -d /srv/http -r -s /bin/false -U http
    And replaced /srv/http with the directory of my choice. Almost everything went fine. I was able to see all my .php files. The problem was with one file. This is the code for it:
    <?php
    mysql_connect("localhost", "root", "mypass") or die(mysql_error());
    echo "Connected to MySQL<br />";
    ?>
    Originally it displayed everything fine but once I made the switch it displayed this error:
    Fatal error: Call to undefined function mysql_connect() in /home/'user'/code/php/connect.php on line 2
    I tried to login to phpMyAdmin as well and this error is displayed:
    The mysqli extension is missing. Please check your PHP configuration. <a href="Documentation.html#faqmysql" target="documentation"><img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help" /></a>
    Not sure if it matters but I have made the switch to a systemd only installation and have run systemctl enable httpd.service, systemctl enable mysqld.service, systemctl start httpd.service, and systemctl start mysql.service countless times just to be sure. I have also made sure that
    extension=mysqli.so
    extension=mysql.so
    Are both uncommented in /etc/php/php.ini
    Last edited by xworld (2012-11-08 00:48:14)

    Here's phpinfo():
    Linux net 3.6.6-1-ARCH #1 SMP PREEMPT Mon Nov 5 11:57:22 CET 2012 x86_64
    Build Date Oct 17 2012 20:31:37
    Configure Command './configure' '--srcdir=../php-5.4.8' '--config-cache' '--prefix=/usr' '--sysconfdir=/etc/php' '--localstatedir=/var' '--with-layout=GNU' '--with-config-file-path=/etc/php' '--with-config-file-scan-dir=/etc/php/conf.d' '--disable-rpath' '--mandir=/usr/share/man' '--without-pear' '--disable-cli' '--with-apxs2' '--enable-bcmath=shared' '--enable-calendar=shared' '--enable-dba=shared' '--enable-exif=shared' '--enable-ftp=shared' '--enable-gd-native-ttf' '--enable-intl=shared' '--enable-mbstring' '--enable-phar=shared' '--enable-posix=shared' '--enable-shmop=shared' '--enable-soap=shared' '--enable-sockets=shared' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--enable-zip=shared' '--with-bz2=shared' '--with-curl=shared' '--with-db4=/usr' '--with-enchant=shared,/usr' '--with-freetype-dir=/usr' '--with-gd=shared' '--with-gdbm' '--with-gettext=shared' '--with-gmp=shared' '--with-iconv=shared' '--with-icu-dir=/usr' '--with-imap-ssl' '--with-imap=shared' '--with-jpeg-dir=/usr' '--with-vpx-dir=/usr' '--with-ldap=shared' '--with-ldap-sasl' '--with-mcrypt=shared' '--with-mhash' '--with-mssql=shared' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysql=shared,mysqlnd' '--with-mysqli=shared,mysqlnd' '--with-openssl=shared' '--with-pcre-regex=/usr' '--with-pdo-mysql=shared,mysqlnd' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-pgsql=shared' '--with-pdo-sqlite=shared,/usr' '--with-pgsql=shared' '--with-png-dir=/usr' '--with-pspell=shared' '--with-snmp=shared' '--with-sqlite3=shared,/usr' '--with-tidy=shared' '--with-unixODBC=shared,/usr' '--with-xmlrpc=shared' '--with-xsl=shared' '--with-zlib'
    Server API Apache 2.0 Handler
    Virtual Directory Support disabled
    Configuration File (php.ini) Path /etc/php
    Loaded Configuration File /etc/php/php.ini
    Scan this dir for additional .ini files /etc/php/conf.d
    Additional .ini files parsed (none)
    PHP API 20100412
    PHP Extension 20100525
    Zend Extension 220100525
    Zend Extension Build API220100525,NTS
    PHP Extension Build API20100525,NTS
    Debug Build no
    Thread Safety disabled
    Zend Signal Handling disabled
    Zend Memory Manager enabled
    Zend Multibyte Support provided by mbstring
    IPv6 Support enabled
    DTrace Support disabled
    Registered PHP Streams compress.zlib, php, file, glob, data, http, ftp
    Registered Stream Socket Transports tcp, udp, unix, udg
    Registered Stream Filters zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk
    Sorry if there is a better way to post this. If so I'm willing to fix it. I posted the part that I thought was relevant
    I do have extension_dir="/usr/lib/php/modules:
    ; Directory in which the loadable extensions (modules) reside.
    ; http://php.net/extension-dir
    extension_dir = "/usr/lib/php/modules/"
    ; On windows:
    ; extension_dir = "ext"
    Also, the file /usr/lib/php/modules/mysql.so does exist.

  • Visual composer report not working after change backend function ?

    We already suffered from strange behaviour of visual composer reports totally not functioning at all at some times.
    now I made a change in a function which is called in a function that is used by visual composer. after transporting the change the VC report is not working anymore (while the function itself in the backend is working fine)
    how comes that the VC report is not working anymore after inside changes of the functions it calls ??
    kind regards
    arthur

    As you have made changes to the function those changes wont be reflected to the VC.so you try to re call the function into VC then it will work fine.

  • When I am on a Youtube video that is running and I want to switch to another tab, the Ctrl+ tab number does not work, is that intended functionality?

    When I am on a Youtube video that is running and I want to switch to another tab, the Ctrl+<tab number> does not work, is that intended functionality?

    This can happen when the video player (Flash plugin) has the focus.
    In that case the plugin consumes all the key presses.
    You will have to click with the mouse elsewhere on the page or in the user interface to make keyboard shortcuts work.

  • Till my last software update on my MacBook Air I have been able to use my iPhone as a modem via USB. Now it's not working anymore. Other functions via USB are still fine. Any ideas???

    Till my last software update on my MacBook Air I have been able to use my iPhone as a modem via USB. Now it's not working anymore. Other functions via USB are still fine. Any ideas???

    The Mac was recently upgraded so it is the Mac, or is it?
    Looking for a common denominator:  I'l start with wi-fi as the common communication medium.
    Known:
    A) Broken: iPhone —> wi-fi —> Mac.
    B) Broken: iPhone —>USB—> Mac.
    C) Broken: iPhone —> Bluetooth —> Mac.
    D) Working: Mac —> USB —> other USB devices.
    Unknowns:
    E) Test Mac —> wi-fi —> a non-iPhone router.
    F) Test iPhone —> wi-fi —> another wi-fi device.
    Given not A, not B and not C either the Mac or the iPhone could be the culprit.
    1) E        |  F        : Non sequitur (deepens the mystery).
    2) not E  |  F        : The Mac is the common denominator.
    3) E        |  not F  : The iPhone is the common denominator.
    4) not E  |  not F  : All heck broke loose.
    For case 1:  It would be something on the Mac that prevents it talking to the iPhone through three media even though it can talk to other routers over wi-fi.  That would be weird indeed, given the iPhone is talking to other wi-fi devices with no trouble. 
    For case 2:  All of the Mac’s intranet media broken (wi-fi, Bluetooth, and wired-USB) and at least wi-fi works on the iPhone.  Something weird is going on in the Mac.
    For case 3:  The iPhone router function is broken.  Upgrade the iOS?  Test using another iPhone?
    For case 4:  Throw everything in the trash and start over.

Maybe you are looking for

  • How to implement the runtime compression of texture?

    I've read the doc here: http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d5b.html Flash Player 11.4 and AIR 3.4 support runtime texture compression, which is useful in certain situations, such as when rendering dynami texture

  • Problem while changing Cheque Form

    Hi all, I have uploaded the cheque form form Qul to Dev server with the same NAME what has in Qul Server, as it is not exit in Qul. Both are different servers. After the modificationt to form i transported the form from Dev to Qul. the modifications

  • Zebra setting for viewer window?

    For some reason I am suddenly getting zebra warnings in my viewer window. (little black lines around hot spots in the image) I never had this before- not sure why I have them now- but I don't. How do I shut this off?

  • Moving projects and imported media from computer to EHD

    Hello all I have just recently finished a project in  FCPX and all the media is stored on my Macs hard drive. I am wanting to move this project to my EHD, so its not taking up so much space on my computers HD. But in doing so i also want to be able t

  • Why are some of my songs on my itouch highlighted gray?

    Please HELPPPP!!