php-windows Digest 30 Jun 2005 17:51:12 -0000 Issue 2713

Topics (messages 26163 through 26172):

Re: Problems with shell_exec() running .bat with For /F
        26163 by: Fred
        26166 by: Louis Solomon [SteelBytes]

Re: problem with printing to a usb printer using php_printer.dll
        26164 by: Sean Rowe
        26165 by: Louis Solomon [SteelBytes]

Re: PHP 5.0.4 - Can anyone help me get it to work?
        26167 by: GkE
        26168 by: GkE
        26172 by: Matt Murphy

Script to query NTP server
        26169 by: David Felton
        26170 by: Rodrigo
        26171 by: Rodrigo

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 ---
So here is the source of the problem, but not the cause.
>From the XP command line etc. the dir returns a file line of
04/02/2005  02:09 AM          19405754 filename.ext
but when invoked from shell_exec() it returns
04/02/2005  02:09                 19405754 filename.ext
which means that for some reason the PHP evoked shell isnt picking up the 
custom regional settings on the machine.
Its easy enough to work around, but is this a bug or have I missed some 
finer point about regional settings?

""Fred"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> PHP5 - Apache2 - XPSP2
> I have an XP batch file incorporating a For /F command which behaves 
> strangely if run from a shell_exec() or system().
> Specifically, if the batch is run from a command prompt or from the 
> scheduler, it works as expected, but if I run the same batch from 
> shell_exec() the For /F misbehaves interpreting token fields.
> Paraphrasing, "For /F "tokens=1-4" %%a in ('dir /-c c:\somedir') do if /I 
> %%d==somevalue dosomething" always returns the fourth space delimited 
> field for %d when run fom an XP cammand prompt or scheduler, but sometimes 
> returns the third space delimited field when run from shell_exec(). It 
> always returns the wrong field from the same dir output lines. The only 
> coincidence seems to be that it returns the wrong field when there are 
> lots of consecutive spaces preceeding the field.
> Got me beat.
> Anyone had similar issues? Please? 

--- End Message ---
--- Begin Message ---
> ... or have I missed some finer point about regional settings?

probably.

check out the 'apply all setting to the current user account and the default 
user profile" in the regional control panel

-- 
Louis Solomon
www.SteelBytes.com

""Fred"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> So here is the source of the problem, but not the cause.
> From the XP command line etc. the dir returns a file line of
> 04/02/2005  02:09 AM          19405754 filename.ext
> but when invoked from shell_exec() it returns
> 04/02/2005  02:09                 19405754 filename.ext
> which means that for some reason the PHP evoked shell isnt picking up the 
> custom regional settings on the machine.
> Its easy enough to work around, but is this a bug or have I missed some 
> finer point about regional settings?
>
> ""Fred"" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
>> PHP5 - Apache2 - XPSP2
>> I have an XP batch file incorporating a For /F command which behaves 
>> strangely if run from a shell_exec() or system().
>> Specifically, if the batch is run from a command prompt or from the 
>> scheduler, it works as expected, but if I run the same batch from 
>> shell_exec() the For /F misbehaves interpreting token fields.
>> Paraphrasing, "For /F "tokens=1-4" %%a in ('dir /-c c:\somedir') do if /I 
>> %%d==somevalue dosomething" always returns the fourth space delimited 
>> field for %d when run fom an XP cammand prompt or scheduler, but 
>> sometimes returns the third space delimited field when run from 
>> shell_exec(). It always returns the wrong field from the same dir output 
>> lines. The only coincidence seems to be that it returns the wrong field 
>> when there are lots of consecutive spaces preceeding the field.
>> Got me beat.
>> Anyone had similar issues? Please? 

--- End Message ---
--- Begin Message --- if no one knows the answer to this, do you at least know where i should go to find it? i'm in a bit of a bind here, and i'm willing to figure it out on my own. if anyone knows where i can start, i would really appreciate it. thanks.

sean rowe

Sean Rowe wrote:
I have been trying to get this small bit of code to work using my dell photo
printer 720 (or any usb printer, for that matter):

<?php
$handle = printer_open("Dell Photo Printer 720"); // printer being the name
of the printer
printer_set_option($handle, PRINTER_MODE, "raw");
printer_set_option($handle, PRINTER_COPIES, "3"); // i want 3 copies
printer_write($handle, "This is a test");
printer_close($handle);
?>

The printer is initialized, and the job is spooled; however, before it
prints anything the print manager deletes the job!  I have tries this on
several different computers running IIS and Apache with the same results.  I
tried it from the command line too, with the same results.  I'm about to
lose my mind.  This code works fine if I use a non-usb printer.  Any ideas?

Sean Rowe

--- End Message ---
--- Begin Message ---
is the dell 720 capable of recieving raw text with no leading escape codes ?

I know modern epson prointers are not.

why are you sending "raw"

-- 
Louis Solomon
www.SteelBytes.com

"Sean Rowe" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> if no one knows the answer to this, do you at least know where i should go 
> to find it?  i'm in a bit of a bind here, and i'm willing to figure it out 
> on my own.  if anyone knows where i can start, i would really appreciate 
> it. thanks.
>
> sean rowe
>
> Sean Rowe wrote:
>> I have been trying to get this small bit of code to work using my dell 
>> photo
>> printer 720 (or any usb printer, for that matter):
>>
>> <?php
>> $handle = printer_open("Dell Photo Printer 720"); // printer being the 
>> name
>> of the printer
>> printer_set_option($handle, PRINTER_MODE, "raw");
>> printer_set_option($handle, PRINTER_COPIES, "3"); // i want 3 copies
>> printer_write($handle, "This is a test");
>> printer_close($handle);
>> ?>
>>
>> The printer is initialized, and the job is spooled; however, before it
>> prints anything the print manager deletes the job!  I have tries this on
>> several different computers running IIS and Apache with the same results. 
>> I
>> tried it from the command line too, with the same results.  I'm about to
>> lose my mind.  This code works fine if I use a non-usb printer.  Any 
>> ideas?
>>
>> Sean Rowe 

--- End Message ---
--- Begin Message ---
Thanks once again Edin. On the Download Page of the WAMPSERVER site, I
noticed that "WAMP5 does not work with Windows 98, Me". Since, therefore,
the operating system on my computer is Windows 98SE, I presume I still
cannot use WAMP.

Any further suggestions?

Georgio

""Edin Kadribasic"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Georgio,
>
> The easiest way to do that is to install WAMP. You'll get all you need in
> one easy to install package that includes php, apache and mysql.
>
> http://www.wampserver.com/en/
>
> Edin
>
> ----- Original Message -----
> From: "Georgio" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Tuesday, June 28, 2005 12:08 PM
> Subject: Re: [PHP-WIN] PHP 5.0.4 - Can anyone help me get it to work?
>
>
> > Thanks Matt. The Operating System on my machine is Windows 98SE. I saw
> > several versions of Apache when I searched online (
> > http://www.apache.org/dist/httpd/binaries/win32/ ) and I am sort of
> > confused. Which one would you recommend I download?
> >
> > Georgio
> >
> > ""Matt Murphy"" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> > Windows 98 is a terrible operating system. You shouldn't be using it for
> > web surfing, much less web serving.
> >
> > Windows 2000 & Apache 2.0 works just fine.
> >
> > Matt
> >
> > > -----Original Message-----
> > > From: Georgio [mailto:[EMAIL PROTECTED]
> > > Sent: Sunday, June 26, 2005 5:04 PM
> > > To: [email protected]
> > > Subject: [PHP-WIN] PHP 5.0.4 - Can anyone help me get it to work?
> > >
> > > Anyone who has successfully got PHP5.0.4 working on a system
> > > with Windows 98SE / PWS 4.0 / Internet Explorer 6 should
> > > please assist me.
> > >
> > > I just upgraded from PHP4.3.2 to PHP5.0.4 and for the past
> > > three days, I have not been able to get it to work on Windows
> > > 98SE / PWS 4.0. I get the usual HTTP 500 - Internal server
> > > error (Internet Explorer). This is the actual result
> > > displayed on the web site:
> > > ++++++
> > >  The page cannot be displayed
> > > There is a problem with the page you are trying to reach and
> > > it cannot be displayed.
> > >
> > > --------------------------------------------------------------
> > > --------------
> > > ----
> > >
> > > Please try the following:
> > >
> > >     Open the localhost home page, and then look for links to
> > > the information you want.
> > >     Click the  Refresh button, or try again later.
> > >     Click  Search to look for information on the Internet.
> > >     You can also see a list of related sites.
> > >
> > > HTTP 500 - Internal server error
> > > Internet Explorer
> > > ++++++
> > >
> > > Using the command-line program, after about 15 seconds, I get
> > > these on the screen before the output of the script:
> > > ++++++
> > > Cannot find module (IP-MIB): At line 0 in (none) Cannot find
> > > module (IF-MIB): At line 0 in (none) Cannot find module
> > > (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB):
> > > At line 0 in (none) Cannot find module (SNMPv2-MIB): At line
> > > 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in
> > > (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
> > > Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot
> > > find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot
> > > find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
> > > Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
> > > Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
> > > Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
> > > Cannot find module (SNMP-MPD-SMI): At line 0 in (none) Cannot
> > > find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
> > > Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in
> > > (none) Cannot find module (SNMPv2-TM): At line 0 in (none)
> > > ++++++
> > >
> > > Whatever these are, I do not have a clue.
> > >
> > > Could anyone help me out with these.
> > >
> > > Thanks
> > >
> > > Georgio
> > >
> > > --
> > > 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, is it that Jon's message below replies to that just posted by
GkE/Georgio?

Georgio

""Edin Kadribasic"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Georgio,
>
> The easiest way to do that is to install WAMP. You'll get all you need in
> one easy to install package that includes php, apache and mysql.
>
> http://www.wampserver.com/en/
>
> Edin
>
> ----- Original Message -----
> From: "Georgio" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Tuesday, June 28, 2005 12:08 PM
> Subject: Re: [PHP-WIN] PHP 5.0.4 - Can anyone help me get it to work?
>
>
> > Thanks Matt. The Operating System on my machine is Windows 98SE. I saw
> > several versions of Apache when I searched online (
> > http://www.apache.org/dist/httpd/binaries/win32/ ) and I am sort of
> > confused. Which one would you recommend I download?
> >
> > Georgio
> >
> > ""Matt Murphy"" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> > Windows 98 is a terrible operating system. You shouldn't be using it for
> > web surfing, much less web serving.
> >
> > Windows 2000 & Apache 2.0 works just fine.
> >
> > Matt
> >
> > > -----Original Message-----
> > > From: Georgio [mailto:[EMAIL PROTECTED]
> > > Sent: Sunday, June 26, 2005 5:04 PM
> > > To: [email protected]
> > > Subject: [PHP-WIN] PHP 5.0.4 - Can anyone help me get it to work?
> > >
> > > Anyone who has successfully got PHP5.0.4 working on a system
> > > with Windows 98SE / PWS 4.0 / Internet Explorer 6 should
> > > please assist me.
> > >
> > > I just upgraded from PHP4.3.2 to PHP5.0.4 and for the past
> > > three days, I have not been able to get it to work on Windows
> > > 98SE / PWS 4.0. I get the usual HTTP 500 - Internal server
> > > error (Internet Explorer). This is the actual result
> > > displayed on the web site:
> > > ++++++
> > >  The page cannot be displayed
> > > There is a problem with the page you are trying to reach and
> > > it cannot be displayed.
> > >
> > > --------------------------------------------------------------
> > > --------------
> > > ----
> > >
> > > Please try the following:
> > >
> > >     Open the localhost home page, and then look for links to
> > > the information you want.
> > >     Click the  Refresh button, or try again later.
> > >     Click  Search to look for information on the Internet.
> > >     You can also see a list of related sites.
> > >
> > > HTTP 500 - Internal server error
> > > Internet Explorer
> > > ++++++
> > >
> > > Using the command-line program, after about 15 seconds, I get
> > > these on the screen before the output of the script:
> > > ++++++
> > > Cannot find module (IP-MIB): At line 0 in (none) Cannot find
> > > module (IF-MIB): At line 0 in (none) Cannot find module
> > > (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB):
> > > At line 0 in (none) Cannot find module (SNMPv2-MIB): At line
> > > 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in
> > > (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
> > > Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot
> > > find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot
> > > find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
> > > Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
> > > Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
> > > Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
> > > Cannot find module (SNMP-MPD-SMI): At line 0 in (none) Cannot
> > > find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
> > > Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in
> > > (none) Cannot find module (SNMPv2-TM): At line 0 in (none)
> > > ++++++
> > >
> > > Whatever these are, I do not have a clue.
> > >
> > > Could anyone help me out with these.
> > >
> > > Thanks
> > >
> > > Georgio
> > >
> > > --
> > > 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 ---
> Thanks once again Edin. On the Download Page of the 
> WAMPSERVER site, I noticed that "WAMP5 does not work with 
> Windows 98, Me". Since, therefore, the operating system on my 
> computer is Windows 98SE, I presume I still cannot use WAMP.

There's a reason for that! 

Do yourself a favor and upgrade to windows 2000. I don't think windows
98 is even supported by microsoft anymore! Security problems,
performance problems, crappy OS problems, you just don't want to be
using that these days. 

Matt

--- End Message ---
--- Begin Message ---
Hi guys. has anyone come across a PHP script to query an NTP (Network Time
Protocol) server and process the response?

I've found one in Perl, but unfortunately nothing in PHP.

Thanks.


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**********************************************************************

--- End Message ---
--- Begin Message ---
 http://www.vanheusden.com/query_ntp.php
This site has one, maybe you can try to contact him/her..

Grtz

rodrigo

-----Original Message-----
From: David Felton [mailto:[EMAIL PROTECTED] 
Sent: donderdag 30 juni 2005 14:15
To: [email protected]
Subject: [PHP-WIN] Script to query NTP server

Hi guys. has anyone come across a PHP script to query an NTP (Network Time
Protocol) server and process the response?

I've found one in Perl, but unfortunately nothing in PHP.

Thanks.


**********************************************************************
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**********************************************************************

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

--- End Message ---
--- Begin Message ---
And here is a manual...

(found with google: php+how+to+query+ntp)

 http://www.kloth.net/software/timesrv1.php

-----Original Message-----
From: Rodrigo [mailto:[EMAIL PROTECTED] 
Sent: donderdag 30 juni 2005 14:37
To: [email protected]
Subject: RE: [PHP-WIN] Script to query NTP server

 http://www.vanheusden.com/query_ntp.php
This site has one, maybe you can try to contact him/her..

Grtz

rodrigo

-----Original Message-----
From: David Felton [mailto:[EMAIL PROTECTED]
Sent: donderdag 30 juni 2005 14:15
To: [email protected]
Subject: [PHP-WIN] Script to query NTP server

Hi guys. has anyone come across a PHP script to query an NTP (Network Time
Protocol) server and process the response?

I've found one in Perl, but unfortunately nothing in PHP.

Thanks.


**********************************************************************
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**********************************************************************

--
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 ---

Reply via email to