Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-31-2003, 04:15 PM   PM User | #1
sarah
Regular Coder

 
Join Date: Sep 2002
Location: Nottingham, UK
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
sarah is an unknown quantity at this point
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.
sarah is offline   Reply With Quote
Old 02-01-2003, 01:59 AM   PM User | #2
firepages
Super Moderator


 
Join Date: May 2002
Location: Perth Australia
Posts: 3,901
Thanks: 5
Thanked 79 Times in 78 Posts
firepages will become famous soon enough
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)
firepages is offline   Reply With Quote
Old 02-05-2003, 04:37 PM   PM User | #3
sarah
Regular Coder

 
Join Date: Sep 2002
Location: Nottingham, UK
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
sarah is an unknown quantity at this point
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.
sarah is offline   Reply With Quote
Old 02-05-2003, 04:49 PM   PM User | #4
firepages
Super Moderator


 
Join Date: May 2002
Location: Perth Australia
Posts: 3,901
Thanks: 5
Thanked 79 Times in 78 Posts
firepages will become famous soon enough
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)
firepages is offline   Reply With Quote
Old 02-06-2003, 05:54 PM   PM User | #5
bored
New Coder

 
Join Date: Jan 2003
Location: Tulsa, OK
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
bored is an unknown quantity at this point
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.
bored is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:17 PM.


Advertisement
Log in to turn off these ads.