Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Com and PHP

  1. #1
    New to the CF scene
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Com and PHP

    Hi,

    I created a dll file in Visual Basic
    Public function news()
    dim a,b as Integer
    a=2
    b=3
    msgbox a+b
    end function

    I am trying to call this dll in php thru the following code
    <html>
    <body>
    <?php
    $obj=new COM("test.trial");
    echo "hi";

    $output=$obj->news();

    echo $output;

    ?>
    </body>
    </html>

    where test is the dll name and trial is the class name.

    when i run this php file in command prompt like
    c:\php>php.exe "c:\Inetupub\wwwroot\use.php"
    its working

    but the same code is not running in the web pages when i click button.

    Can any 1 help me plsssss.

    thanks

  • #2
    Regular Coder meth's Avatar
    Join Date
    Jan 2003
    Posts
    262
    Thanks
    0
    Thanked 9 Times in 9 Posts
    Does the dll file have the necessary permissions to be executed by the anonymous web user account?
    I do Web Design, Brisbane based.
    More time spent in PHP/MySQL Web Development.
    And Search Engine Optimisation takes up the rest of it.

  • #3
    New to the CF scene
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a visual basic file that migrate data from oracle to mysql. I saved this file as .dll.

    when i call this file in command prompt its working fine when i call it from we page i get following error

    Error Ocurred: [Microsoft][ODBC Driver Manager] Data source name not
    found and no default driver specified


    How to check the access permission for dll.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •