php-windows Digest 27 Nov 2002 10:49:56 -0000 Issue 1459

Topics (messages 17152 through 17160):

Re: C++ dll files
        17152 by: Mikey
        17156 by: Brennan Mann
        17157 by: Franco Pozzer

Redirect browser to another URL?
        17153 by: Jack Kelly Dobson
        17154 by: Kieran Hall
        17155 by: Dash McElroy
        17159 by: George Nicolae
        17160 by: Cam Dunstan

Re: php-windows Digest 26 Nov 2002 22:04:20 -0000 Issue 1458
        17158 by: Neil Smith

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
regsrvr32.exe should register it for you.

HTH,

Mikey

> -----Original Message-----
> From: Brennan Mann [mailto:[EMAIL PROTECTED]]
> Sent: 26 November 2002 22:04
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] C++ dll files
>
>
> I got my DLL all set. I am just having problems with windows. I can't get
> windows to register it. Any suggestions?
>
> Thanks,
> Brennan
> "Franco Pozzer" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I try to help to you but I do not sure if it is a correct because I have
> > study the problems but I do not have try it.
> >
> >   For my porpose instead to use COM object I like to use C or
> C++ external
> > pgm.
> >
> >   First of all, the DLL must be registred in Windows system. Mine was
> > because it was provided by a "setup" software...
> >   or with regedit32.exe pgm.
> >
> >   So, you have to get the name under witch the DLL is registed.
> >
> >    This name is not necessary the same than DLL's. To get this name, I
> used
> > to search into
> >   de registry database. I was looking for the DLL name and I managed to
> get
> > the registred name.
> >
> >   Once you get this registred name, in php you can write:
> >
> >   $obj = new COM("registred name");
> >
> >   I send a .zip with bmp to expalin the correct registred
> Dll/COM/ActiveX
> > object.
> >
> >   Another question DLL or COM or Object must be 32bit!
> >
> >   I hope this help you....................
> >
> >   Ciao Franco.
> >
> > Brennan Mann wrote:
> >
> > > Hello Everybody,
> > >
> > >     Can PHP call a DLL file? If so, do you know where I might
> be able to
> > > find an example?
> > >
> > > Thanks Again,
> > > Brennan
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>


--- End Message ---
--- Begin Message ---
 I get an error when I try to register the DLL using regsrvr32.exe .  DLL
was loaded, but the DllRegisterSever entry point was not found. File not
loaded. Any Suggestions?
Thanks,
Brennan



"Brennan Mann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I got my DLL all set. I am just having problems with windows. I can't get
> windows to register it. Any suggestions?
>
> Thanks,
> Brennan
> "Franco Pozzer" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I try to help to you but I do not sure if it is a correct because I have
> > study the problems but I do not have try it.
> >
> >   For my porpose instead to use COM object I like to use C or C++
external
> > pgm.
> >
> >   First of all, the DLL must be registred in Windows system. Mine was
> > because it was provided by a "setup" software...
> >   or with regedit32.exe pgm.
> >
> >   So, you have to get the name under witch the DLL is registed.
> >
> >    This name is not necessary the same than DLL's. To get this name, I
> used
> > to search into
> >   de registry database. I was looking for the DLL name and I managed to
> get
> > the registred name.
> >
> >   Once you get this registred name, in php you can write:
> >
> >   $obj = new COM("registred name");
> >
> >   I send a .zip with bmp to expalin the correct registred
Dll/COM/ActiveX
> > object.
> >
> >   Another question DLL or COM or Object must be 32bit!
> >
> >   I hope this help you....................
> >
> >   Ciao Franco.
> >
> > Brennan Mann wrote:
> >
> > > Hello Everybody,
> > >
> > >     Can PHP call a DLL file? If so, do you know where I might be able
to
> > > find an example?
> > >
> > > Thanks Again,
> > > Brennan
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>


--- End Message ---
--- Begin Message ---
I am not sure because I do not try these situation. I have validate in the paper
these situation, but I can write  that I have find in my investigation:

Your dll.s are not activex components, so you can't register them. They are
libraries (dynamic link libraries: they can be loaded/unloaded  dinamically on
runtime) wich contain some functions. To use the libraries (from C or C++). you
have to call the Win32 API function LoadLibrary. They also can be used from
Visual Basic.
IIS can use only ActiveX components which are a special kind of COM components
especially designed to be used from scripting languages like VBA or
VBScript, JScript. You can easily recognise an ActiveX component because they
use only Variant as datatype for passing and returning parameters (scripting
languages don't support data types declarations). So, I don't know if your
Apache implementation for Win32 can load dll's or ActiveX components.
Furthermore, you can't use your dll's from IIS because they aren't ActiveX
components! You have to ask someone to write for you an ActiveX wrapper for the
libraries in order to use them from IIS.  To register an COM/ActiveX component
use regsvr32.exe

I did some exploration, you're in deep trouble: the process of mixing 16 bit
code with 32bit code is called "thunking" (search MSDN for "thunk"). Is very
complicated, you need a 16 bit C/C++ compiler and a 32 bit C/C++ compiler. I've
explored the idea to use an 16 bit automation component directly, but it
seems also it can't be called like 32 bit components. It would be much easier to
recompile/port your dll's to 32 bit code. From here is very simple to build an
automation object using an modern tool.

COM was working also on 16 bit (for Win3.1). I tried to instantiate an 16 bit
automation object from an 32 bit client and it doesn't work. Maybe there is a
solution, but if it is complicated is like doing the so called "thunking".

You must build an ActiveX wrapper around your dll's in order to use them from
scripting languages (on Win platform). All COM components must be
registered (including ActiveX components) - the dll which was the problem for
Merlot intallation was an COM component. Remember, ActiveX is a technology
built using COM technology, so every ActiveX component IS an COM component, but
NOT every COM component is an ActiveX component!

After these, I have try to compile source code dll (C language) in exe object
and I link these external pgm from my php script. I try these solution and it
work fine.

Ciao a tutti. Franco.

Brennan Mann wrote:

>  I get an error when I try to register the DLL using regsrvr32.exe .  DLL
> was loaded, but the DllRegisterSever entry point was not found. File not
> loaded. Any Suggestions?
> Thanks,
> Brennan
>
> "Brennan Mann" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I got my DLL all set. I am just having problems with windows. I can't get
> > windows to register it. Any suggestions?
> >
> > Thanks,
> > Brennan
> > "Franco Pozzer" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > I try to help to you but I do not sure if it is a correct because I have
> > > study the problems but I do not have try it.
> > >
> > >   For my porpose instead to use COM object I like to use C or C++
> external
> > > pgm.
> > >
> > >   First of all, the DLL must be registred in Windows system. Mine was
> > > because it was provided by a "setup" software...
> > >   or with regedit32.exe pgm.
> > >
> > >   So, you have to get the name under witch the DLL is registed.
> > >
> > >    This name is not necessary the same than DLL's. To get this name, I
> > used
> > > to search into
> > >   de registry database. I was looking for the DLL name and I managed to
> > get
> > > the registred name.
> > >
> > >   Once you get this registred name, in php you can write:
> > >
> > >   $obj = new COM("registred name");
> > >
> > >   I send a .zip with bmp to expalin the correct registred
> Dll/COM/ActiveX
> > > object.
> > >
> > >   Another question DLL or COM or Object must be 32bit!
> > >
> > >   I hope this help you....................
> > >
> > >   Ciao Franco.
> > >
> > > Brennan Mann wrote:
> > >
> > > > Hello Everybody,
> > > >
> > > >     Can PHP call a DLL file? If so, do you know where I might be able
> to
> > > > find an example?
> > > >
> > > > Thanks Again,
> > > > Brennan
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hello,

Anyone know how to have a script re-direct the browser to a URL cleanly?

I've tried using header("location:" . $url); but I'm running into a problem
with a server error saying header data was already sent from "some line in
the script that was running" as if the new url is being opened after a
header has already been sent.

All I want to do is have the script stop it's execution and open another
page.

Any ideas?

j-


--- End Message ---
--- Begin Message ---
Try using a javascript with your php to create a redirect redirect:

<script language="JavaScript">
document.location.href="<?PHP echo $url ?>"
</script>

Hope this is useful.

Kieran Hall

-----Original Message-----
From: Jack Kelly Dobson [mailto:[EMAIL PROTECTED]] 
Sent: 26 November 2002 22:43
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Redirect browser to another URL?

Hello,

Anyone know how to have a script re-direct the browser to a URL cleanly?

I've tried using header("location:" . $url); but I'm running into a
problem
with a server error saying header data was already sent from "some line
in
the script that was running" as if the new url is being opened after a
header has already been sent.

All I want to do is have the script stop it's execution and open another
page.

Any ideas?

j-



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
Jack,

If your script which has to redirect the user spits out _ANY_ output (i.e.
carrige return, space, HTML of any sort) then it will be unable to send
header info to the browser. If the script is not supposed to send any data
to the browser other than a redirect, you have some whitespace or something
similar before a <?php tag or an echo tag or something that spits out output
above your header line.

You could try a <meta redirect...something> tag (I forget the exact syntax)
if you want the browser to refresh the page at a later time (i.e. check back
every 5 seconds for updates).

If you use the header trick, remember to place an exit; after that line. I
had a weird phantom problem where the script would send the browser
elsewhere, but continue with the rest of the script.

-Dash

-----Original Message-----
From: Jack Kelly Dobson [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, November 26, 2002 2:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Redirect browser to another URL?


Hello,

Anyone know how to have a script re-direct the browser to a URL cleanly?

I've tried using header("location:" . $url); but I'm running into a problem
with a server error saying header data was already sent from "some line in
the script that was running" as if the new url is being opened after a
header has already been sent.

All I want to do is have the script stop it's execution and open another
page.

Any ideas?

j-



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
You send some caracter (even return) to the browser. Try to put the
header("location:" . $url); on the firs line of the script.

--


Best regards,
George Nicolae
IT Manager
___________________
PaginiWeb.com  - Professional Web Design
www.PaginiWeb.com
"Jack Kelly Dobson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> Anyone know how to have a script re-direct the browser to a URL cleanly?
>
> I've tried using header("location:" . $url); but I'm running into a
problem
> with a server error saying header data was already sent from "some line in
> the script that was running" as if the new url is being opened after a
> header has already been sent.
>
> All I want to do is have the script stop it's execution and open another
> page.
>
> Any ideas?
>
> j-
>
>


--- End Message ---
--- Begin Message ---
Jack,
here is another quick and dirty function to stick in your library, yet
another way to redirect from anywhere in your script

function redirect($url){
echo "<script>window.location.replace(\"".$url."\")</script>";
}

usage:

blah
blah
redirect("any_url");

exit;



>
> -----Original Message-----
> From: Jack Kelly Dobson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 26, 2002 2:43 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Redirect browser to another URL?
>
>
> Hello,
>
> Anyone know how to have a script re-direct the browser to a URL cleanly?
>


--- End Message ---
--- Begin Message --- Visit an ILS or LDAP server, or ICQ.

http://www.fresh-toast.net does a particularly good web to ILS interface (I know, I wrote it :-)

It also happens to perform video conference calls using gnomemeeting, netmeeting, cuseeme, intel video phone and MS portrait.

At 22:04 26/11/2002 +0000, you wrote:
Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Reply-To: "mst" <[EMAIL PROTECTED]>
From: "mst" <[EMAIL PROTECTED]>
Date: Tue, 26 Nov 2002 15:56:23 +0100
Subject: Users on line

How i can check who is on line?

mst
Regards,

Neil << Baffled by how this is relevant to PHP or indeed, windows


--- End Message ---

Reply via email to