php-windows Digest 14 Jan 2003 20:27:08 -0000 Issue 1535
Topics (messages 17854 through 17865):
Re: Ping, Script ends before it's finished
17854 by: Torben Dehn
Looking for something simple
17855 by: Asendorf, John
Windows Service interactions with PHP
17856 by: Paul Menard
17858 by: Ignatius Reilly
17860 by: Paul Menard
17861 by: Ignatius Reilly
17863 by: Dash McElroy
17864 by: Frank M. Kromann
Re: secure ldap connections
17857 by: Daniel Fisher
Re: Installation problems =(
17859 by: Mikey
PHP Errors
17862 by: Matthew Clark
Good SMPT mail script?
17865 by: Nicole
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 ---
Hello again !
Sorry about this but it was a server problem, the web server did not allow
the script to run for more than 300 sec.
I upped that number and now everything works as it was supposed to.
"J.Veenhuijsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Sorry I missed : set_time_limit(0); !!!!
>
>
>
> J.Veenhuijsen wrote:
> > Your first problem is likely to be the 30 sec runtime a script is
> > allowed to take . See php.ini for this.
> >
> > Jochem
> >
> > Torben Dehn wrote:
> >
> >> Hello !
> >> I am tryin to make a script that will ping a whole subnet and it looks
> >> like
> >> it works, but it does not...
> >> It will ping around 60 to 70 computers and then it will stop.. no
> >> error just
> >> finishes.
> >>
> >> I am new at php so maybe i am doing something wrong ?
> >> Any Help Would be appreciated.
> >>
> >> Another thing.. is there anyway to set a timelimit on the exec("ping
> >> -n 1
> >> $realip", $result); command ? because if it pings an ip where there is
no
> >> computer i will wait for several seconds before it will ping the next
ip.
> >>
> >> The script looks like this
> >>
> >> <?php
> >> set_time_limit(0);
> >> for ($i=2;$i<=255;$i++)
> >> {
> >> $realip = "192.168.1.$i";
> >> exec("ping -n 1 $realip", $result);
> >> echo $i." ".$result[3]."<hr>";
> >> $result = '';
> >> }
> >> ?>
> >>
> >>
> >
>
--- End Message ---
--- Begin Message ---
I miss the old days of PHP when all you could find were little snippets of
code instead of "huge suites for working with everything"...
I'm looking for a simple script that just writes html. ALl I want is
something that will look at the fields in a MySQL database and spits out a
form that can be used to insert data...
Anyone know of anything like that without a bunch of bells and whistles? If
not, I may just create one myself...
Thanks, John
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
--- End Message ---
--- Begin Message ---
All,
I' converting a Web site from ASP to PHP. One of the
last issues I am working on is converting the ASP page
that will show the status of a specific Service.
This page also allows the Admin level user to
stop/start the service.
What is the 'best' way to code this in PHP and/or
Perl?
Paul
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--- End Message ---
--- Begin Message ---
You can access the command line with the backtick operator:
<?php
// restart the servers
`net stop mysql` ; // backtick, not quote
`net stop apache` ;
`net start mysql` ;
`net start apache` ;
// To access the running services:
`net start > "file_to_parse.txt"` ;
?>
En espérant que cela aide
Ignatius
____________________________________________
----- Original Message -----
From: "Paul Menard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 14, 2003 5:10 PM
Subject: [PHP-WIN] Windows Service interactions with PHP
> All,
>
> I' converting a Web site from ASP to PHP. One of the
> last issues I am working on is converting the ASP page
> that will show the status of a specific Service.
>
> This page also allows the Admin level user to
> stop/start the service.
>
> What is the 'best' way to code this in PHP and/or
> Perl?
>
> Paul
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Yes this does work but how do I simply destermine the
status of the service without actually starting it?
Obviosly is the service is running and you call
--- Ignatius Reilly <[EMAIL PROTECTED]> wrote:
> You can access the command line with the backtick
> operator:
>
> <?php
>
> // restart the servers
> `net stop mysql` ; // backtick, not quote
> `net stop apache` ;
> `net start mysql` ;
> `net start apache` ;
>
> // To access the running services:
> `net start > "file_to_parse.txt"` ;
>
> ?>
>
>
> En espérant que cela aide
> Ignatius
> ____________________________________________
> ----- Original Message -----
> From: "Paul Menard" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, January 14, 2003 5:10 PM
> Subject: [PHP-WIN] Windows Service interactions with
> PHP
>
>
> > All,
> >
> > I' converting a Web site from ASP to PHP. One of
> the
> > last issues I am working on is converting the ASP
> page
> > that will show the status of a specific Service.
> >
> > This page also allows the Admin level user to
> > stop/start the service.
> >
> > What is the 'best' way to code this in PHP and/or
> > Perl?
> >
> > Paul
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> > http://mailplus.yahoo.com
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit:
> http://www.php.net/unsub.php
> >
> >
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--- End Message ---
--- Begin Message ---
net start outputs a list of *running* services.
Or do you mean other service status information (automatic/ manual), etc.? I
don't know. Not with the DOS net tools, AFAI.
Ignatius
____________________________________________
----- Original Message -----
From: "Paul Menard" <[EMAIL PROTECTED]>
To: "Ignatius Reilly" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, January 14, 2003 7:24 PM
Subject: Re: [PHP-WIN] Windows Service interactions with PHP
> Yes this does work but how do I simply destermine the
> status of the service without actually starting it?
>
> Obviosly is the service is running and you call
>
> --- Ignatius Reilly <[EMAIL PROTECTED]> wrote:
> > You can access the command line with the backtick
> > operator:
> >
> > <?php
> >
> > // restart the servers
> > `net stop mysql` ; // backtick, not quote
> > `net stop apache` ;
> > `net start mysql` ;
> > `net start apache` ;
> >
> > // To access the running services:
> > `net start > "file_to_parse.txt"` ;
> >
> > ?>
> >
> >
> > En espérant que cela aide
> > Ignatius
> > ____________________________________________
> > ----- Original Message -----
> > From: "Paul Menard" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, January 14, 2003 5:10 PM
> > Subject: [PHP-WIN] Windows Service interactions with
> > PHP
> >
> >
> > > All,
> > >
> > > I' converting a Web site from ASP to PHP. One of
> > the
> > > last issues I am working on is converting the ASP
> > page
> > > that will show the status of a specific Service.
> > >
> > > This page also allows the Admin level user to
> > > stop/start the service.
> > >
> > > What is the 'best' way to code this in PHP and/or
> > > Perl?
> > >
> > > Paul
> > >
> > > __________________________________________________
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> > now.
> > > http://mailplus.yahoo.com
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit:
> > http://www.php.net/unsub.php
> > >
> > >
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
There is a tool I have installed on my machine - I believe it came with
the Windows 2000 Resource kit (of sorts... obtained via TechNet) that
gives a lot more data.
It's called 'netsvc'. Here's what it outputs:
C:\>netsvc
Controls and displays the status of services.
NETSVC servicename \\computername /command
servicename Name of the service
computername Name of the computer to administer.
/command One of the following:
/query Queries the status of the service.
/start Starts the service.
/stop Stops the service.
/pause Pauses the service.
/continue Starts the paused service.
/list Lists installed services (omit servicename)
Example: NETSVC server \\joes486 /query
Example: NETSVC "Clipbook Server" \\popcorn /stop
Example: NETSVC alerter \\joes486 /pause
Example: NETSVC /list \\joes486
Arguments are allowed in any order.
When I do this: 'netsvc apache2 \\dash /query' it tells me this:
Service is running on \\dash
This tool also allows for remote administration (assuming the user that
runs PHP (system? iuser_whatever?) has rights to the other machine).
Hope this helps,
-Dash
God is not dead! He's alive and autographing bibles at Cody's
On Tue, 14 Jan 2003, Ignatius Reilly wrote:
> net start outputs a list of *running* services.
>
> Or do you mean other service status information (automatic/ manual), etc.? I
> don't know. Not with the DOS net tools, AFAI.
>
> Ignatius
> ____________________________________________
> ----- Original Message -----
> From: "Paul Menard" <[EMAIL PROTECTED]>
> To: "Ignatius Reilly" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, January 14, 2003 7:24 PM
> Subject: Re: [PHP-WIN] Windows Service interactions with PHP
>
>
> > Yes this does work but how do I simply destermine the
> > status of the service without actually starting it?
> >
> > Obviosly is the service is running and you call
> >
> > --- Ignatius Reilly <[EMAIL PROTECTED]> wrote:
> > > You can access the command line with the backtick
> > > operator:
> > >
> > > <?php
> > >
> > > // restart the servers
> > > `net stop mysql` ; // backtick, not quote
> > > `net stop apache` ;
> > > `net start mysql` ;
> > > `net start apache` ;
> > >
> > > // To access the running services:
> > > `net start > "file_to_parse.txt"` ;
> > >
> > > ?>
> > >
> > >
> > > En espérant que cela aide
> > > Ignatius
> > > ____________________________________________
> > > ----- Original Message -----
> > > From: "Paul Menard" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, January 14, 2003 5:10 PM
> > > Subject: [PHP-WIN] Windows Service interactions with
> > > PHP
> > >
> > >
> > > > All,
> > > >
> > > > I' converting a Web site from ASP to PHP. One of
> > > the
> > > > last issues I am working on is converting the ASP
> > > page
> > > > that will show the status of a specific Service.
> > > >
> > > > This page also allows the Admin level user to
> > > > stop/start the service.
> > > >
> > > > What is the 'best' way to code this in PHP and/or
> > > > Perl?
> > > >
> > > > Paul
> > > >
> > > > __________________________________________________
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> > > now.
> > > > http://mailplus.yahoo.com
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit:
> > > http://www.php.net/unsub.php
> > > >
> > > >
> > >
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > http://mailplus.yahoo.com
> >
> > --
> > 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 ---
Or you can use the iisfunc extension (not documentented), available from
PECL or my site (http://kromann.info/php4.php)
the functions
int iis_stop_service(string service)
int iis_start_service(string service)
int iis_get_service_state(string service)
- Frank
> net start outputs a list of *running* services.
>
> Or do you mean other service status information (automatic/ manual),
etc.? I
> don't know. Not with the DOS net tools, AFAI.
>
> Ignatius
> ____________________________________________
> ----- Original Message -----
> From: "Paul Menard" <[EMAIL PROTECTED]>
> To: "Ignatius Reilly" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> Sent: Tuesday, January 14, 2003 7:24 PM
> Subject: Re: [PHP-WIN] Windows Service interactions with PHP
>
>
> > Yes this does work but how do I simply destermine the
> > status of the service without actually starting it?
> >
> > Obviosly is the service is running and you call
> >
> > --- Ignatius Reilly <[EMAIL PROTECTED]> wrote:
> > > You can access the command line with the backtick
> > > operator:
> > >
> > > <?php
> > >
> > > // restart the servers
> > > `net stop mysql` ; // backtick, not quote
> > > `net stop apache` ;
> > > `net start mysql` ;
> > > `net start apache` ;
> > >
> > > // To access the running services:
> > > `net start > "file_to_parse.txt"` ;
> > >
> > > ?>
> > >
> > >
> > > En espérant que cela aide
> > > Ignatius
> > > ____________________________________________
> > > ----- Original Message -----
> > > From: "Paul Menard" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, January 14, 2003 5:10 PM
> > > Subject: [PHP-WIN] Windows Service interactions with
> > > PHP
> > >
> > >
> > > > All,
> > > >
> > > > I' converting a Web site from ASP to PHP. One of
> > > the
> > > > last issues I am working on is converting the ASP
> > > page
> > > > that will show the status of a specific Service.
> > > >
> > > > This page also allows the Admin level user to
> > > > stop/start the service.
> > > >
> > > > What is the 'best' way to code this in PHP and/or
> > > > Perl?
> > > >
> > > > Paul
> > > >
> > > > __________________________________________________
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> > > now.
> > > > http://mailplus.yahoo.com
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit:
> > > http://www.php.net/unsub.php
> > > >
> > > >
> > >
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > http://mailplus.yahoo.com
> >
> > --
> > 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 ---
On Tue, 14 Jan 2003 08:37:44 +0200
Leon <[EMAIL PROTECTED]> wrote:
> Hi Daniel
>
> Very important: TLS is NOT SSL.... The start TLS is almost guaranteed not to
> work for secure layer communication to your LDAP server. (You do need two
> dll files in your win\sys32 directory though)
>
We're using OpenLdap 2.x and TLS works fine.
We recommend that our clients use TLS instead of SSL, however we do
keep port 636 open for those clients that cannot use TLS.
(Our ldap configuration requires TLS on port 389, if you connect and do not immediately
upgrade your connection, then your connection is dropped.)
Our Unix servers have compiled PHP to use ldap_start_tls with no problems.
In addition all our JSP based applications have no trouble using JNDI to start TLS.
My hope was that our clients using PHP on windows could at least use ldaps
if TLS was not an option.
I guess the answer to my question is that this version of PHP does not support secure
connections to a Ldap.
> What I suggest is the following: Install STUNNEL accept connections on a
> port... send all this communication to the LDAP server on its secure port.
> STUNNEL will act as a wrapper for all LDAP queries.
>
> Your script will then connect to your localhost on the port you chose above
> and will not even know that the LDAP query is being sent away via a stunnel.
>
We have this configuration working, but we feel the installation is too complex for
most
of our clients to take advantage.
We'll wait until PHP on windows catches up, then tell people to upgrade.
Thanks.
--
Daniel Fisher
Middleware Services, Virginia Tech
> Cheers
>
> > Hello,
> > I'm using the 4.3.0 version of php on Windows 2000 SP3.
> > I'm trying to get php to make a secure connection to our ldap server.
> > I am able to make insecure connections and queries just fine.
> > In the php.ini file I have enabled php_ldap.dll and php_openssl.dll.
> > If I attempt to use ldap_start_tls I get an error: 'Call to undefined
> function'.
> > So I'm assuming the ldap libs were not compiled with TLS.
> > Unfortunately I cannot get ldaps to work either.
> > Using a statement like:
> > ldap_connect("ldaps://ldap.host.com") or ldap_connect("ldap.host.com",
> 636)
> > produces the error: 'Unable to bind to server', when a bind is attempted.
> > Our ldap logs show a connection being opened and then immediately closed.
> >
> > I also tried downloading and installing libsasl.dll, but this had no
> effect on my problem.
> > Does this version php for windows suppport secure connections?
> >
> > --Daniel Fisher
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
--- End Message ---
--- Begin Message ---
> Bobo,
>
> Perhaps your zlib issue could be due to an old php_zlib.php dll file.
>
> I would definitely upgrade your MySQL to at least 4.0.8, if you're set on
> 4.0. There were a few nasty bugs in the older versions (4.0.4 in
> particular bugger'd me up big time).
>
> -Dash
According to the Changelog:
ZLIB extension is now built-in in the Windows distribution. External
extension (php_zlib.dll) has been removed. (Edin)
So all you need to do is comment out the zlib extension line in your php.ini
file.
HTH,
Mikey
--- End Message ---
--- Begin Message ---
Greetings all:
I am quite sure I have PHP installed and running properly, but when I
try to run some PHP scripts, I get "failed to create stream: No such
file or directory in blah blah blah" errors. Any idea what could cause
this? I am leaving out the script details because 1) it happens to
several scripts, and 2) I'm trying to make this short and sweet :-).
I also run PHP on a Linux server, and the same scripts run fine. I
think it has something to do with the "include_path" variable. And
while I'm at it, what is this variable for? If I leave it undefined, it
defaults to "C:\PHP\Pear".
Any ideas would be most appreciated! If anyone needs any more info,
just ask.
Matthew Clark
Divergent Systems Incorporated
--- End Message ---
--- Begin Message ---
Does anyone have a good smtp mail script to handle text and/or HTML
messages?
I found phpmailer which I'm having some trouble with.
mail() isn't enough. I need to do smtp mail and I just am not strong enough
yet in generating mail via smtp in PHP other than just using the mail()
function.
Any good docs? The search engine is not what it used to be anymore. I can't
find good resources.
Any help would be great.
Thanks!
--- End Message ---