php-windows Digest 15 Nov 2002 22:15:36 -0000 Issue 1442
Topics (messages 16959 through 16976):
php - login and password
16959 by: Rui Monteiro
16976 by: Cam Dunstan
Re: set up mysql without winmysqladmin?
16960 by: Brian McGarvie
16961 by: Stephen Edmonds
16962 by: A. J. McLean
16963 by: Marcelo Laia
16973 by: Dash McElroy
Re: Php Setup - begginer
16964 by: Step Schwarz
using tmpfile()
16965 by: Frode Mangseth
Re: php com+ components on appache
16966 by: Franco Pozzer
Calling exe/cgi
16967 by: Brennan Mann
16968 by: Tiny
16969 by: Brennan Mann
16970 by: Michael Hazelden
16971 by: Michael Hazelden
16972 by: Tiny
COM issue, problems with return type.
16974 by: Merritt, Eric
Word input on client's side
16975 by: Szilard Bokros
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 ---
I must say that I'm new at this php world.
There are some web sites that when you enter a page, a pop-up windows
appears requesting a login and password.
How can I make a form in php (login page) that searches for the login and
password of the page that is requested?
I really don't know where the file containing the login or password is
stored, but I suppose theres is a rule where to be hold up.
Thank you,
Rui Monteiro
--- End Message ---
--- Begin Message ---
Rui,
There are a hundred ways of doing this, popup windows are often simple
client side javascript routines, but most often, serious passwording
involves the use of databases. So get yourself a copy of mySQL and start
by familiarlising yourself with that and PHPs unrivalled set of db
connection and query gizzmos. Many if not most of your projects are going
to need database interaction in any case. Once you have a handle on that,
passwording will be a relatively trivial problem to solve. In the meantime,
check some javascript sites for some basic popup code. Also, while you are
learning the ropes, keep uppermost and clear in your mind the difference
between what happens client side (with stuff like javascript being executed
by the browser) and SERVER side with PHP, a continuing source of confusion
with newcomers - good luck.
----- Original Message -----
From: "Rui Monteiro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 15, 2002 9:43 AM
Subject: [PHP-WIN] php - login and password
> I must say that I'm new at this php world.
>
> There are some web sites that when you enter a page, a pop-up windows
> appears requesting a login and password.
>
> How can I make a form in php (login page) that searches for the login and
> password of the page that is requested?
>
> I really don't know where the file containing the login or password is
> stored, but I suppose theres is a rule where to be hold up.
>
> Thank you,
>
> Rui Monteiro
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
I think it's only possible under nt/2k....
http://www.mysql.com/doc/en/NT_start.html
"A. J. McLean" <[EMAIL PROTECTED]> wrote in message
news:20021114141034.48692.qmail@;pb1.pair.com...
> Is it possible to configure mysql to load up automatically whenever apache
> is run (without having to load up winmysqladmin in the systray)?
>
> Thanks!!
>
>
--- End Message ---
--- Begin Message ---
On my Windows XP System, I only ran WinMySQLAdmin once. Now whenever my PC
loads, MySQL comes online with it. I suggest you try closing WinMySQLAdmin,
restarting, then seeing if you can access the database
Stephen
----- Original Message -----
From: "A. J. McLean" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 2:10 PM
Subject: [PHP-WIN] set up mysql without winmysqladmin?
> Is it possible to configure mysql to load up automatically whenever apache
> is run (without having to load up winmysqladmin in the systray)?
>
> Thanks!!
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Unfortunately, I already tried this. I know that once you run
WinMySQLAdmin, it puts itself in the startup folder/systray. However, I
remember that in one of those PHP distros for windows (I forget which one),
that if you load up Apache, it was able to connect to MySQL and PHP without
loading the WinMySQLAdmin (i.e. it was not visible in the systray). The
reason I ask is, I don't want my localhost running on startup. I want to be
able to press one key to fire up the AMP and to also close it down (to
conserve system resources). Make sense?
Thank you anyway!
"Stephen Edmonds" <[EMAIL PROTECTED]> wrote in message
news:002e01c28c9c$c2729070$2e00a8c0@;q...
> On my Windows XP System, I only ran WinMySQLAdmin once. Now whenever my PC
> loads, MySQL comes online with it. I suggest you try closing
WinMySQLAdmin,
> restarting, then seeing if you can access the database
>
> Stephen
>
> ----- Original Message -----
> From: "A. J. McLean" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, November 14, 2002 2:10 PM
> Subject: [PHP-WIN] set up mysql without winmysqladmin?
>
>
> > Is it possible to configure mysql to load up automatically whenever
apache
> > is run (without having to load up winmysqladmin in the systray)?
> >
> > Thanks!!
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
--- End Message ---
--- Begin Message ---
Hello,
When I installed MySQL for the first time, he began
automatically when the windows began. However, a
beautiful day, when I was exploring the paste
c:\mysql\bin, I found the file winmysqladmin.exe. I
executed it to see what was. Cursed hour. Of this
moment in before, whenever the windows is begun this
tool is also inciated automatically. I already tried
of all the ways but I don't get to turn off her.
I believe to be this his problem, also.
If you, or other friend, he knows as turning off it,
tell me, please.
Therefore, this tool, winmysqladmin.exe, is not
necessary so that the service mysql is begun
automatically in the windows.
If it doesn't go this the problem, I am sorry,
therefore I might not have understood correctly.
--- Stephen Edmonds <[EMAIL PROTECTED]>
escreveu: > On my Windows XP System, I only ran
WinMySQLAdmin
> once. Now whenever my PC
> loads, MySQL comes online with it. I suggest you try
> closing WinMySQLAdmin,
> restarting, then seeing if you can access the
> database
>
> Stephen
>
> ----- Original Message -----
> From: "A. J. McLean" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, November 14, 2002 2:10 PM
> Subject: [PHP-WIN] set up mysql without
> winmysqladmin?
>
>
> > Is it possible to configure mysql to load up
> automatically whenever apache
> > is run (without having to load up winmysqladmin in
> the systray)?
> >
> > Thanks!!
> >
> >
> >
> > --
> > 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
>
_______________________________________________________________________
Yahoo! GeoCities
Tudo para criar o seu site: ferramentas fáceis de usar, espaço de sobra e acessórios.
http://br.geocities.yahoo.com/
--- End Message ---
--- Begin Message ---
Make yourself a simple batch script:
amp.bat:
@echo off
start c:\path\to\apache\apache.exe
c:\path\to\mysql\bin\mysqld.exe --console
echo Press ^C to stop stuff
pause>NUL
c:\path\to\apache\apache.exe -k stop
or something (I'm guessing on the mysqld option). The start command may be
particularly of service here. Open up a command prompt, type in 'start /?'
to see all it can do (start /wait can be a handy option...)
The above batch script is totally untested and may need a fair amount of
tweaking, but it just might do what you want.
-Dash
-----Original Message-----
From: A. J. McLean [mailto:x@;americanmotorcycle.com]
Sent: Thursday, November 14, 2002 6:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] set up mysql without winmysqladmin?
Is it possible to configure mysql to load up automatically whenever apache
is run (without having to load up winmysqladmin in the systray)?
Thanks!!
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
[Hello, I didn't subscribe to this list until the 11th, so I'm sorry I can't
reply to the original message.]
Rob -- I recently set up PHP on a standalone computer running Windows XP
Professional and IIS and I'd be happy to help. If you want to try two
things, please let me know how you get on..
First, you may go through the Add or Remove Programs Control Panel,
uninstall PHP, and start from scratch. Try and install from the "PHP 4.2.3
installer" available at http://www.php.net/downloads.php and NOT from the
larger "PHP 4.2.3 zip package". The PHP 4.2.3 installer should configure
IIS for you.
Second, just to make sure IIS is running, open up a web browser and check
http://127.0.0.1/ -- that will try and access whatever web server is running
on your own machine.
Good luck!,
-Step
> Hey Rob,
> Its tough getting started, even with the manual at your side, but you will
> make it. Lots of folk do fine with IIS but I suspect Apache is less
> bothersome - one or two small additions to the config file and you are up
> and away. If you change to Apache and still have problems, mail me for an
> example config and other stuff including an automatic setup of the whole kit
> and kaboodle (mySQL, Apache PHP) and I shall send it to you direct.
>
> ----- Original Message -----
> From: "Rob" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, November 07, 2002 8:55 AM
> Subject: [PHP-WIN] Php Setup - begginer
>
>
>> Hello,
>>
>> I'm wanting to learn php, but am having trouble setting up my computer so
>> that I can use it. I know that you need to have a server with php enabled.
>> I'm using a single PC with Windows XP, and have IIS installed. I have also
>> downloaded the latest version of php and installed that too. Still though, I
>> can't seem to get it working, I'm not sure if its the php, the server or just
>> my stupidity. Does anyone know how to do this? (I guess so considering this
>> is php.windows). Or, does anyone know a good web site that explains how to
>> set it all up. I've tried using the php manual and some php books, but they
>> don't really focus on how to get the whole thing working together, and I find
>> them particularly vague when explaining the server thing.
>>
>> Also, is IIS the best solution or is there something a bit easier, like the
>> Microsoft Personal Server or Apache?...I don't really know much about
>> these...but then I don't really know much about IIS either. I'm a
>> server/networking novice you might say.
>>
>> Cheers for any help in advance.
>>
>> Rob
>> email: [EMAIL PROTECTED]
>>
>>
>>
>> --
>> PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
--- End Message ---
--- Begin Message ---
I'd like to use the tmpfile()-function, but how can I get hold
of the filename and directory?
Frode
--- End Message ---
--- Begin Message ---
> 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.
>
> kai wrote:
>
>> hi guy's I have a problem running com+ code and would appreciate any
>> help.
>>
>> What I like to do is have the mediaplayer run a wave file triggert
>> from php
>> via com.
>> but I can not run any example code from the help without errors.
>>
>> this code is from a the help and should work but doesn't on my
>> mashine:
>>
>> // starting word
>> $word = new COM("word.application") or die("Unable to instanciate
>> Word");
>> print "Loaded Word, version {$word->Version}\n";
>>
>> //bring it to front
>> $word->Visible = 1;
>> //open an empty document
>> $word->Documents->Add();
>> //do some weird stuff
>> $word->Selection->TypeText("This is a test...");
>> $word->Documents[1]->SaveAs("Useless test.doc");
>> //closing word
>> $word->Quit();
>> //free the object
>> $word->Release();
>> $word = null;
>>
>> This is all very basic code and should run.
>> I do not have word so I tried with other apps. like wordpad or
>> painbrush
>> but allways recieve this error:
>>
>> Warning: Invalid ProgID, GUID string, or Moniker: Invalid syntax in
>> D:\Apache\htdocs\ring.php on line 7
>> Unable to instanciate ..........
>>
>> Now I tried to give the access right's on the particular apps in
>> dcomcnfg
>> and
>> also edited php.ini to
>> allow Distributed-COM calls
>> com.allow_dcom = true
>>
>> Does anybody can give me a run down on what I have to do exactly to
>> get this
>> code running for
>> let's say wordpad.
>>
>> Thank you
>>
>> KAi
>>
>> --
>> PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hello everybody!
I am new to PHP. I have several C and C++ programs that run as cgi(s).
Currently, I am just using a form on a web page to call the cgi(s). I am
running PHP on a Windows 2000 server with IIS. Can you call/invoke an exe
program from a PHP script? If so, could you please show an example.
Thanks for your help!
Brennan
--- End Message ---
--- Begin Message ---
Try this:
echo `you_script_name.exe`;
or
system('you_script_name.exe')
>Hello everybody!
>
> I am new to PHP. I have several C and C++ programs that run as cgi(s).
>Currently, I am just using a form on a web page to call the cgi(s). I am
>running PHP on a Windows 2000 server with IIS. Can you call/invoke an exe
>program from a PHP script? If so, could you please show an example.
>
>Thanks for your help!
>Brennan
>
--------
--
JUST Tiny
--- End Message ---
--- Begin Message ---
I am sorry. I forgot to add that the CGI uses the get method to receive
data.
For example "my_cgi.exe?=1000"
The system("my_cgi.exe") call worked. But I still need to pass data to the
exe. Any suggestions?
Thanks again!
Brennan
"Brennan Mann" <[EMAIL PROTECTED]> wrote in message
news:20021115145428.12116.qmail@;pb1.pair.com...
> Hello everybody!
>
> I am new to PHP. I have several C and C++ programs that run as cgi(s).
> Currently, I am just using a form on a web page to call the cgi(s). I am
> running PHP on a Windows 2000 server with IIS. Can you call/invoke an exe
> program from a PHP script? If so, could you please show an example.
>
> Thanks for your help!
> Brennan
>
>
--- End Message ---
--- Begin Message ---
Open it using the fopen command - but do it as an HTTP open to the same
server your PHP is on.
Then you can pass the get string along with the open request ... the Apache
system (or whatever your using) should then execute the CGI with the get ...
and you get read the results using fpassthru or fread.
We use this technique to generate a kind of 3 teir business application
model - where we use the PHP to open HTTP connections to JSP on another
server to get them to do the bulk of the work. Works quite nicely (providing
you don't have to battle with over-zealous network routers that cut you off
after a 5 minute connection) - but that's my problem and we're dealing with
it.
Make any sense?
Michael.
-----Original Message-----
From: Brennan Mann [mailto:brennan@;hire-experience.com]
Sent: 15 November 2002 15:58
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: Calling exe/cgi
I am sorry. I forgot to add that the CGI uses the get method to receive
data.
For example "my_cgi.exe?=1000"
The system("my_cgi.exe") call worked. But I still need to pass data to the
exe. Any suggestions?
Thanks again!
Brennan
"Brennan Mann" <[EMAIL PROTECTED]> wrote in message
news:20021115145428.12116.qmail@;pb1.pair.com...
> Hello everybody!
>
> I am new to PHP. I have several C and C++ programs that run as cgi(s).
> Currently, I am just using a form on a web page to call the cgi(s). I am
> running PHP on a Windows 2000 server with IIS. Can you call/invoke an exe
> program from a PHP script? If so, could you please show an example.
>
> Thanks for your help!
> Brennan
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Control Centre.
This message has been checked for all known viruses by the MessageLabs Virus Control
Centre.
*********************************************************************
Notice: This email is confidential and may contain copyright material of Ocado
Limited (the "Company"). Opinions and views expressed in this message may not
necessarily reflect the opinions and views of the Company.
If you are not the intended recipient, please notify us immediately and delete all
copies of this message. Please note that it is your responsibility to scan this
message for viruses.
Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY
*********************************************************************
--- End Message ---
--- Begin Message ---
to give an example ... just cos I'm nice like that:
$file1=fopen("http://myserver/cgi.exe?=1000","r");
fpassthru($file1);
will get your webserver to run the cgi ... and then will simply output the
result back to the user.
if you need to - you could even add some authentication in there and pass it
in the URL ... user:password@myserver etc ...
-----Original Message-----
From: Michael Hazelden [mailto:michael.hazelden@;ocado.com]
Sent: 15 November 2002 16:02
To: 'Brennan Mann'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: Calling exe/cgi
Open it using the fopen command - but do it as an HTTP open to the same
server your PHP is on.
Then you can pass the get string along with the open request ... the Apache
system (or whatever your using) should then execute the CGI with the get ...
and you get read the results using fpassthru or fread.
We use this technique to generate a kind of 3 teir business application
model - where we use the PHP to open HTTP connections to JSP on another
server to get them to do the bulk of the work. Works quite nicely (providing
you don't have to battle with over-zealous network routers that cut you off
after a 5 minute connection) - but that's my problem and we're dealing with
it.
Make any sense?
Michael.
-----Original Message-----
From: Brennan Mann [mailto:brennan@;hire-experience.com]
Sent: 15 November 2002 15:58
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: Calling exe/cgi
I am sorry. I forgot to add that the CGI uses the get method to receive
data.
For example "my_cgi.exe?=1000"
The system("my_cgi.exe") call worked. But I still need to pass data to the
exe. Any suggestions?
Thanks again!
Brennan
"Brennan Mann" <[EMAIL PROTECTED]> wrote in message
news:20021115145428.12116.qmail@;pb1.pair.com...
> Hello everybody!
>
> I am new to PHP. I have several C and C++ programs that run as cgi(s).
> Currently, I am just using a form on a web page to call the cgi(s). I am
> running PHP on a Windows 2000 server with IIS. Can you call/invoke an exe
> program from a PHP script? If so, could you please show an example.
>
> Thanks for your help!
> Brennan
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Control Centre.
This message has been checked for all known viruses by the MessageLabs Virus
Control Centre.
*********************************************************************
Notice: This email is confidential and may contain copyright material of
Ocado Limited (the "Company"). Opinions and views expressed in this message
may not necessarily reflect the opinions and views of the Company.
If you are not the intended recipient, please notify us immediately and
delete all copies of this message. Please note that it is your
responsibility to scan this message for viruses.
Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY
*********************************************************************
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
This message has been checked for all known viruses by the MessageLabs Virus Control
Centre.
*********************************************************************
Notice: This email is confidential and may contain copyright material of Ocado
Limited (the "Company"). Opinions and views expressed in this message may not
necessarily reflect the opinions and views of the Company.
If you are not the intended recipient, please notify us immediately and delete all
copies of this message. Please note that it is your responsibility to scan this
message for viruses.
Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY
*********************************************************************
--- End Message ---
--- Begin Message ---
On Fri, 15 Nov 2002 10:58:06 -0500, [EMAIL PROTECTED]
(Brennan Mann) wrote:
$param=escapeshellcmd($param);
system("program.exe $param");
>I am sorry. I forgot to add that the CGI uses the get method to receive
>data.
>For example "my_cgi.exe?=1000"
>The system("my_cgi.exe") call worked. But I still need to pass data to the
>exe. Any suggestions?
>
>Thanks again!
>
>Brennan
>
>"Brennan Mann" <[EMAIL PROTECTED]> wrote in message
>news:20021115145428.12116.qmail@;pb1.pair.com...
>> Hello everybody!
>>
>> I am new to PHP. I have several C and C++ programs that run as cgi(s).
>> Currently, I am just using a form on a web page to call the cgi(s). I am
>> running PHP on a Windows 2000 server with IIS. Can you call/invoke an exe
>> program from a PHP script? If so, could you please show an example.
>>
>> Thanks for your help!
>> Brennan
>>
>>
>
--- End Message ---
--- Begin Message ---
Hello all,
I am having a little problem with return types from a COM object. Basically
(code follows) I get a collection back from the object and I can not figure
out a way to iterate through this collection. Posted is a snippet of test
code that I hope one of you can help me with.
<?php
echo "Starting\n";
$system = new COM("ADSystemInfo") or die("failed to get system info");
$usr = new COM("WinNT://$system->DomainDNSName/USERID,user") or
die("failed on usr");
$groups = $usr->Groups() or die("fail");
//Groups should be a collection of objects that I can iterate through, but
for
//of me I can't figure out how.
//iteration through group should be here.
?>
If someone could point me to some relevent documentation about this It
would be great.
Thanks,
Eric
--- End Message ---
--- Begin Message ---
Hello,
how can I make a page open in Word instead of the browser?
If I just write:
header( "Content-type: application/msword" );
won't change anything, the page opens in explorer.
The file is generated on the fly,
so there is no real file to open, just the output from the webserver.
As far as I know, Word can open html pages as well as documents.
The following button opens word if the user clicks on it.
Test
<INPUT type="button" value="Open Word"
onclick="OpenWord()">
The problem is: how to pass to word the output of the php code?
Thanks for any idea
Szilard
--- End Message ---