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 5 of 5
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    Nottingham, UK
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    fatal error: dl() not supported

    Hi All,

    I am trying to use the following function dl(mydll.dll)

    But I keep getting the following error message
    FATAL ERROR: dl() is not supported in multithreaded Web servers. Use the extensions statement in your php.ini c:\localhost blah blah...

    I read about dl() on php.net that dl() is not suported on multithread servers such as XP, but I'm running this on a Win2K machine with Apache configured (downloaded this from firepages.com.au)

    Has anyone used this function to call a dll before? If so could you shed some light on this grey area. An example of code would be excellent, if not a point to a URL with an example would be appreciated.

    Thanks in advance
    You are not a human being having a spiritual experience, your a spiritual
    being having a human experience.

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,051
    Thanks
    10
    Thanked 94 Times in 92 Posts
    Hi, apache is the server & it is multithreaded so you basically can't dl() in an apache mod_php environment.

    you could call php as a CGI and then use dl() though.

    better question is why you want to dl() in the first place.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Location
    Nottingham, UK
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi firepages

    Apologies for the late response - got bogged down with this dll thingy.

    The reason why I am using dl() is I have a file called bankscan.dll and this verifies sort codes and account numbers, makes sure they match, bank addresses, etc.

    The problem I am having is calling this file.

    Is it possible to call a script thats not in php, i.e a vbscript file or a delphi script? Its jus that I already have a script that is written in VB that I can use. How would i include this file? Would it be a simple case of include "filename.ext"; or would the extension have to be ".php"

    If it has to be ".php" can i create and use a php script which echos out the VB:

    i.e myscript.php - (external file)

    <?php
    echo (" (General / Declarations ");
    echo (" Global Const field_1 = 1 ");
    ?>

    etc

    then in bankfile.php I include this script:
    <?php
    include "myscript.php";
    ?>
    <html>
    etc

    Would this work? Or would I have to convert all the delhi / VB code into PHP?

    Thanks for your time
    Sarah

    p.s hope ur not confused or lost, please let me know if I have, then I can try and explain in more detail
    You are not a human being having a spiritual experience, your a spiritual
    being having a human experience.

  • #4
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,051
    Thanks
    10
    Thanked 94 Times in 92 Posts
    hmmm a quick and dirty method would be ...assuming your VB script can take command line parameters ? to call that script from PHP using exec()

    PHP Code:
    <?
    exec
    ("vbscript.exe arg1 arg2",$yaks);
    print_r($yaks);
    ?>
    ... OR if you mean a vbscript as in a webpage ? -

    PHP Code:
    <?
    $fp 
    fsockopen ("127.0.0.1"80$errno$errstr30); 
    if (!
    $fp) { 
       echo 
    "$errstr ($errno)<br>\n"
    } else { 
       
    fputs ($fp"GET /test.php?[b]arg1=this&arg2=that[/b] HTTP/1.0\r\nHost: [url]www.irrelevant.com\r\n\r\n[/url]"); 
       while (!
    feof($fp)) { 
           echo 
    fgets ($fp,128); 
       } 
       
    fclose ($fp); 

    ?>
    you could pass the arguments in the GET request ? , assuming your script just outputs HTML ?
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #5
    New Coder
    Join Date
    Jan 2003
    Location
    Tulsa, OK
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think you got hit with the Vbulletin bug again, looking at the host. You meant to post the URL stand-alone and got automated.


  •  

    Posting Permissions

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