...

View Full Version : fatal error: dl() not supported



sarah
01-31-2003, 04:15 PM
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

firepages
02-01-2003, 01:59 AM
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.

sarah
02-05-2003, 04:37 PM
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

firepages
02-05-2003, 04:49 PM
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()



<?
exec("vbscript.exe arg1 arg2",$yaks);
print_r($yaks);
?>


... OR if you mean a vbscript as in a webpage ? -



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


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

bored
02-06-2003, 05:54 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum