php-windows Digest 26 Mar 2003 08:45:05 -0000 Issue 1653

Topics (messages 19119 through 19147):

Re: installing Curl
        19119 by: Svensson, B.A.T. (HKG)
        19128 by: Luis Ferro

Re: php as exe in windows
        19120 by: Svensson, B.A.T. (HKG)
        19123 by: Mike Brum
        19124 by: Svensson, B.A.T. (HKG)
        19126 by: skate
        19127 by: Svensson, B.A.T. (HKG)

can't get SQL result ...
        19121 by: Thomas debost
        19122 by: Svensson, B.A.T. (HKG)

Re: configuration error... where??
        19125 by: Vladimir Galkov

Simple Addition issue
        19129 by: Herhuth, Ron
        19130 by: Rich Gray
        19132 by: Sven Schnitzke

vb translations
        19131 by: skate
        19133 by: Luis Ferro
        19134 by: skate

Syntax Error on Win2000-Apache
        19135 by: Arijit Chaudhuri
        19136 by: Paolo Bonavoglia
        19140 by: Arijit Chaudhuri

Read COM1
        19137 by: Waldemar Brand Neto
        19138 by: skate
        19139 by: Waldemar Brand Neto
        19142 by: skate
        19143 by: Gene Dymarskiy

Global & POST & uploading files
        19141 by: Afan Pasalic
        19146 by: chris

GD in PHP 4.3.0
        19144 by: Afan Pasalic
        19145 by: Christoph Grottolo

uploading files
        19147 by: Bobo Wieland

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 ---
Read for instance:

http://www2.psy.uq.edu.au/~ftp/Crypto/

http://www.zip.com.au/~roca/LIBEAY.TXT


> -----Original Message-----
> From: Diana Castillo [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 25, 2003 9:57 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] installing Curl
> 
> 
> The documentation for Curl says the following:
> 
> Note to Win32 Users: In order to enable this module on a Windows
> environment, you must copy libeay32.dll and ssleay32.dll from the DLL
> folder of the PHP/Win32 binary package to the SYSTEM32 folder of your
> windows machine. (Ex: C:\WINNT\SYSTEM32 or C:\WINDOWS\SYSTEM32) 
> 
> However I cannot find those files on my machine.  Any ideas?
> 

--- End Message ---
--- Begin Message --- From what i recall, the libeay dlls are shipped with one name and curl is "expecting" the dlls to be named another... renaming the dll could solve install problems (which end up with a non-descript error).

Luis Ferro
TelaDigital.net

(at least that was the correction needed on our install under win2k)

Svensson, B.A.T. (HKG) wrote:

Read for instance:

http://www2.psy.uq.edu.au/~ftp/Crypto/

http://www.zip.com.au/~roca/LIBEAY.TXT




-----Original Message-----
From: Diana Castillo [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 9:57 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] installing Curl


The documentation for Curl says the following:


Note to Win32 Users: In order to enable this module on a Windows
environment, you must copy libeay32.dll and ssleay32.dll from the DLL
folder of the PHP/Win32 binary package to the SYSTEM32 folder of your
windows machine. (Ex: C:\WINNT\SYSTEM32 or C:\WINDOWS\SYSTEM32)


However I cannot find those files on my machine. Any ideas?









--- End Message ---
--- Begin Message ---
> > I want to create an application that I can run on my web-server every five
> > minutes. The application should look in my ftp-catalogue and move incomming
> > files to other directories. I want to do this in php. Is it possible - and
> > in that case - how?

Why not simply loop forever and execute your task and sleep for 5 minutes inside
the loop fore each iteration? Can't be that hard to write such a script.

--- End Message ---
--- Begin Message ---
There's a few problems with that - Let's say someone closes the window it's
running in - then it's gone. Or let's say there's an error and it haults or
Windows just messes up (Windows - mess up? - never!).

With the Scheduled Task option, you can add limits on how long it's going to
run and other options. It's just a lot more stable.

Not to mention that if you poorly write the PHP script - it will consume A
LOT of memory!

-Mike

-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 8:11 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: php as exe in windows


> > I want to create an application that I can run on my web-server every
five
> > minutes. The application should look in my ftp-catalogue and move
incomming
> > files to other directories. I want to do this in php. Is it possible -
and
> > in that case - how?

Why not simply loop forever and execute your task and sleep for 5 minutes
inside
the loop fore each iteration? Can't be that hard to write such a script.

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





--- End Message ---
--- Begin Message ---
What about the added requirement: "I want to do this in php."?

And I don't as obviously as you see the need this to run
inside a window? Is this a kind of restriction on php, or?

        //Anders - very ignorant about php

> -----Original Message-----
> From: Mike Brum [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 25, 2003 2:21 PM
> To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Re: php as exe in windows
> 
> 
> There's a few problems with that - Let's say someone closes the window it's
> running in - then it's gone. Or let's say there's an error and it haults or
> Windows just messes up (Windows - mess up? - never!).
> 
> With the Scheduled Task option, you can add limits on how long it's going to
> run and other options. It's just a lot more stable.
> 
> Not to mention that if you poorly write the PHP script - it will consume A
> LOT of memory!
> 
> -Mike
> 
> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 25, 2003 8:11 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Re: php as exe in windows
> 
> 
> > > I want to create an application that I can run on my web-server every five
> > > minutes. The application should look in my ftp-catalogue and move incomming
> > > files to other directories. I want to do this in php. Is it possible - and
> > > in that case - how?
> 
> Why not simply loop forever and execute your task and sleep for 5 minutes
> inside the loop fore each iteration? Can't be that hard to write such a script.

--- End Message ---
--- Begin Message ---
php is a command line program, so yes, it has to be run in a command line
window, or through some kinda service (webserver). using VB you can hide the
command window, but that's not always an option, and with automated tasks
you can minimize it... but the command window is still there...

the program would still be done in php, but php has to be called somehow,
and this would be easiest done through a command line window. a batch file
would be better suited to the whole thing, but this would still need to be
run from a command window.

hence, why it is running php from the command line.

i would shy away very much from running php permanently in a sleep loop, i'd
imagine the resource usage would be fairly big, and as said before, bad
programming could easily kill your computer...

this is something easily achieved on *nix through crontabs, but windows
solution, the automated task, is a fair solution too.

but i may be wrong, i'm sure there's a more fluid way of doing this???

skate - fatcuban.com
----- Original Message -----
From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 25, 2003 1:52 PM
Subject: RE: [PHP-WIN] Re: php as exe in windows


> What about the added requirement: "I want to do this in php."?
>
> And I don't as obviously as you see the need this to run
> inside a window? Is this a kind of restriction on php, or?
>
> //Anders - very ignorant about php
>
> > -----Original Message-----
> > From: Mike Brum [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, March 25, 2003 2:21 PM
> > To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
> > Subject: RE: [PHP-WIN] Re: php as exe in windows
> >
> >
> > There's a few problems with that - Let's say someone closes the window
it's
> > running in - then it's gone. Or let's say there's an error and it haults
or
> > Windows just messes up (Windows - mess up? - never!).
> >
> > With the Scheduled Task option, you can add limits on how long it's
going to
> > run and other options. It's just a lot more stable.
> >
> > Not to mention that if you poorly write the PHP script - it will consume
A
> > LOT of memory!
> >
> > -Mike
> >
> > -----Original Message-----
> > From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, March 25, 2003 8:11 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [PHP-WIN] Re: php as exe in windows
> >
> >
> > > > I want to create an application that I can run on my web-server
every five
> > > > minutes. The application should look in my ftp-catalogue and move
incomming
> > > > files to other directories. I want to do this in php. Is it
possible - and
> > > > in that case - how?
> >
> > Why not simply loop forever and execute your task and sleep for 5
minutes
> > inside the loop fore each iteration? Can't be that hard to write such a
script.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



--- End Message ---
--- Begin Message ---
Hi skate,

thanks for you informative answer.

You asked for other solutions. Well one is already suggested,
and that is to use the scheduler. It might also be possible
to use at.exe, also (but this requires some programming
knowledge) is to write once own service in C/C++, this is
fairly straight forward if one know C/C++ and has the advantage
that the process can be adjusted by the user in a fairly
simple manner. 

Another possibility would is to install cygwin (Freeware - gnu -
at http://www.cygwin.com/) and then one gets the power of *nix
on the machine, and can for example schedule it with cron.

Just look what happen at my NT prompt when I writes "man cron":

[d:\]man cron
CRON(8)                                                                CRON(8)

NAME
       cron - daemon to execute scheduled commands (Vixie Cron)

SYNOPSIS
       cron

DESCRIPTION
       Cron   should   be   started   from   /sbin/init.d/cron,   /etc/rc   or
       /etc/rc.local.  It will return immediately, so you don't need to  start
       it with '&'.

       Cron  searches  /var/spool/cron/tabs  for crontab files which are named
       after accounts in /etc/passwd; crontabs found are loaded  into  memory.
       Cron also searches for /etc/crontab which is in a different format (see
       crontab(5)).  Additionally, cron reads the  files  in  /etc/cron.d;  it
       treats  the files in /etc/cron.d as extensions to the /etc/crontab file
       (they follow the special format of that file,  i.e.  they  include  the
       user  field). The intended purpose of this feature is to allow packages
       that   require   finer   control   of   their   scheduling   than   the
       /etc/cron.{daily,weekly,monthly}  directories  allow  to  add a crontab
       file to /etc/cron.d. Such files should be named after the package  that
       supplies them. Files must conform to the same naming convention as used
       by run-parts(8): they must consist solely of upper- and lower-case let-
       ters, digits, underscores, and hyphens. Like /etc/crontab, the files in
       the /etc/cron.d directory are monitored for changes.  Cron  then  wakes
       up  every  minute, examining all stored crontabs, checking each command
       to see if it should be run in the current minute.  When executing  com-
       mands, any output is mailed to the owner of the crontab (or to the user
       named in the MAILTO  environment  variable  in  the  crontab,  if  such
       exists).

       Additionally,  cron  checks each minute to see if its spool directory's
       modtime (or the modtime on /etc/crontab) has changed, and  if  it  has,
       cron  will  then  examine  the modtime on all crontabs and reload those
       which have changed.  Thus cron need not be restarted whenever a crontab
       file is modified.  Note that the crontab(1) command updates the modtime
       of the spool directory whenever it changes a crontab.

SEE ALSO
       crontab(1), crontab(5)

AUTHOR
       Paul Vixie <[EMAIL PROTECTED]>

4th Berkeley Distribution      20 December 1993                        CRON(8)
(END)



> -----Original Message-----
> From: skate [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 25, 2003 2:59 PM
> To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Re: php as exe in windows
> 
> 
> php is a command line program, so yes, it has to be run in a command line
> window, or through some kinda service (webserver). using VB you can hide the
> command window, but that's not always an option, and with automated tasks
> you can minimize it... but the command window is still there...
> 
> the program would still be done in php, but php has to be called somehow,
> and this would be easiest done through a command line window. a batch file
> would be better suited to the whole thing, but this would still need to be
> run from a command window.
> 
> hence, why it is running php from the command line.
> 
> i would shy away very much from running php permanently in a sleep loop, i'd
> imagine the resource usage would be fairly big, and as said before, bad
> programming could easily kill your computer...
> 
> this is something easily achieved on *nix through crontabs, but windows
> solution, the automated task, is a fair solution too.
> 
> but i may be wrong, i'm sure there's a more fluid way of doing this???
> 
> skate - fatcuban.com
> ----- Original Message -----
> From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 25, 2003 1:52 PM
> Subject: RE: [PHP-WIN] Re: php as exe in windows
> 
> 
> > What about the added requirement: "I want to do this in php."?
> >
> > And I don't as obviously as you see the need this to run
> > inside a window? Is this a kind of restriction on php, or?
> >
> > //Anders - very ignorant about php
> >
> > > -----Original Message-----
> > > From: Mike Brum [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, March 25, 2003 2:21 PM
> > > To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
> > > Subject: RE: [PHP-WIN] Re: php as exe in windows
> > >
> > >
> > > There's a few problems with that - Let's say someone closes the window
> it's
> > > running in - then it's gone. Or let's say there's an error and it haults
> or
> > > Windows just messes up (Windows - mess up? - never!).
> > >
> > > With the Scheduled Task option, you can add limits on how long it's
> going to
> > > run and other options. It's just a lot more stable.
> > >
> > > Not to mention that if you poorly write the PHP script - it will consume
> A
> > > LOT of memory!
> > >
> > > -Mike
> > >
> > > -----Original Message-----
> > > From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, March 25, 2003 8:11 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: [PHP-WIN] Re: php as exe in windows
> > >
> > >
> > > > > I want to create an application that I can run on my web-server
> every five
> > > > > minutes. The application should look in my ftp-catalogue and move
> incomming
> > > > > files to other directories. I want to do this in php. Is it
> possible - and
> > > > > in that case - how?
> > >
> > > Why not simply loop forever and execute your task and sleep for 5
> minutes
> > > inside the loop fore each iteration? Can't be that hard to write such a
> script.
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> 

--- End Message ---
--- Begin Message ---
I can't access my data after a working query :
$byter="
            select SUM(bytesrecvd)
            from WebProxyLog
            where DestHost = \""  . $name . "\"";

$recv= mssql_query($byter, $linkid);

When i try to print $recv, it prints ressource ID #..

how can i print the result of the sum ?

Thank you !



--- End Message ---
--- Begin Message ---
> I can't access my data after a working query :
> $byter="
>             select SUM(bytesrecvd)
>             from WebProxyLog
>             where DestHost = \""  . $name . "\"";
> 

SELECT SUM(bytesrecvd) AS SOME_NAME

(Aggregates drops the column name...)

--- End Message ---
--- Begin Message ---
well ... problem wasn't in php. it was in NT filesystem owner.



--- End Message ---
--- Begin Message ---
I have a very dumb question that I'm puzzled with.  I am creating a script that is 
returning tow values from a DB...The values will either be a number or the word 
resident so i'm checking for that first...if they are indeed numbers they need to be 
added together storing the sum in a variable which will give the total later in the 
script.  For some reason I keep getting back a very incorrect value when using the 
script below:

$total_state_income = 0;

$row['CA_state_source_income'] = "14,133";
$row['GA_state_source_income'] = "Resident";
$row['IL_state_source_income'] = "10,556";

if(!strchr($row['CA_state_source_income'],"Resident"))
{
        $total_state_income = $total_state_income + 
(int)$row['CA_state_source_income'];
}

if(!strchr($row['GA_state_source_income'],"Resident"))
{
        $total_state_income = $total_state_income + 
(int)$row['GA_state_source_income'];
}

if(!strchr($row['IL_state_source_income'],"Resident"))
{
        $total_state_income = $total_state_income + 
(int)$row['IL_state_source_income'];
}


When I check the value of $total_state_income it equals 24 not the expected 24,689.

The datatype of the values returned from SQL Server are Varchar so I tried typecasting 
the values to integers before adding them to the running total.

What am I doing wrong??

Thanks in advance for your help,
Ron

--- End Message ---
--- Begin Message ---
> When I check the value of $total_state_income it equals 24 not 
> the expected 24,689.
> 
> The datatype of the values returned from SQL Server are Varchar 
> so I tried typecasting the values to integers before adding them 
> to the running total.
> 
> What am I doing wrong??
> 
> Thanks in advance for your help,
> Ron

does it work if you remove the thousands sspearators?
Rich


--- End Message ---
--- Begin Message ---
It looks like the comma (',') is in this case interpreted as the decimal 
separator,
not (as you apparently suppose) the grouping separator.
>> You have a difference in the "locale" between your SQL Server and PHP. 
You
     might want to try getting e.g. 14.133,00 (to the cent) or tell PHP to 
use 14,133.00
See setlocale() and localeconv() and related in the docs.
--
Sven

> -----Ursprüngliche Nachricht-----
> Von:  Herhuth, Ron [SMTP:[EMAIL PROTECTED]
> Gesendet am:  Dienstag, 25. März 2003 15:46
> An:   [EMAIL PROTECTED]
> Betreff:      [PHP-WIN] Simple Addition issue
>
>
> I have a very dumb question that I'm puzzled with.  I am creating a 
script that is returning tow values from a DB...The values will either be a 
number or the word resident so i'm checking for that first...if they are 
indeed numbers they need to be added together storing the sum in a variable 
which will give the total later in the script.  For some reason I keep 
getting back a very incorrect value when using the script below:
>
> $total_state_income = 0;
>
> $row['CA_state_source_income'] = "14,133";
> $row['GA_state_source_income'] = "Resident";
> $row['IL_state_source_income'] = "10,556";
>
> if(!strchr($row['CA_state_source_income'],"Resident"))
> {
>       $total_state_income = $total_state_income + 
(int)$row['CA_state_source_income'];
> }
>
> if(!strchr($row['GA_state_source_income'],"Resident"))
> {
>       $total_state_income = $total_state_income + 
(int)$row['GA_state_source_income'];
> }
>
> if(!strchr($row['IL_state_source_income'],"Resident"))
> {
>       $total_state_income = $total_state_income + 
(int)$row['IL_state_source_income'];
> }
>
>
> When I check the value of $total_state_income it equals 24 not the 
expected 24,689.
>
> The datatype of the values returned from SQL Server are Varchar so I 
tried typecasting the values to integers before adding them to the running 
total.
>
> What am I doing wrong??
>
> Thanks in advance for your help,
> Ron
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
i know this is a fairly random question, and maybe not the best place for it...

but i'm a php programmer having to do some VB stuff (horrible) and i'm wondering if 
there is anywhere that lists the equivelant PHP functions into what they would be in 
VB?

--- End Message ---
--- Begin Message --- I'm a vb programmer that loved to learn php and now i'm working on a vb project... and guess what... i'm hating every minute...

LF


--- End Message ---
--- Begin Message ---
hehe!!! tell me about it!!!

i've actually created an interface between php and vb just so i can still do
some of the cool stuff i'm used to in PHP.

but i'm still wondering if there's any easy way of getting a VB equivelant
of a PHP function?

my big thing, is there any way to do reg-exp's in VB???

cheers :)

----- Original Message -----
From: "Luis Ferro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 25, 2003 4:20 PM
Subject: Re: [PHP-WIN] vb translations


> I'm a vb programmer that loved to learn php and now i'm working on a vb
> project... and guess what... i'm hating every minute...
>
> LF
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



--- End Message ---
--- Begin Message ---
Hi all,

My Win2000-Apache-PHP-MySQL setup works fine. I shifted to Apache from IIS
due to the cookie-redirection problem of IIS. The only problem with my setup
is - when there is a syntax error in php code, it does not show any error
messages - just a clean blank screen on the browser! What needs to be
tweaked?

Regards,
Arijit



--- End Message ---
--- Begin Message --- At 22:47 25/03/2003 25/03/2003, you wrote:
My Win2000-Apache-PHP-MySQL setup works fine. I shifted to Apache from IIS due to the cookie-redirection problem of IIS. The only problem with my setup is - when there is a syntax error in php code, it does not show any error messages - just a clean blank screen on the browser! What needs to be tweaked?

Look at the php.ini file in the windows directory, and set the following variable:


display_errors = On

This is useful for debugging but error messages will show on the web page, and users will see them also. If you prefer not to show error messages to users, set

display_errors = Off
log_errors = On

error_log = c:\php\errori.log (or any other directory and file of your choice)

and all error messages will be saved in this text-file.

Hope this can be helpful.



Paolo Bonavoglia

Cannaregio 3027/R
30121 V E N E Z I A
========================================================
Sito del Liceo Foscarini http://www.liceofoscarini.it/
Astronomia e Calendari http://digilander.iol.it/paolobona/astro/home.html



--- End Message ---
--- Begin Message ---
Absolutely - the "display_errors = On" was missing in php.ini.

Thanks everyone!
Arijit

"Paolo Bonavoglia" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 22:47 25/03/2003 25/03/2003, you wrote:
> >My Win2000-Apache-PHP-MySQL setup works fine. I shifted to Apache from
IIS
> >due to the cookie-redirection problem of IIS. The only problem with my
> >setup is - when there is a syntax error in php code, it does not show any
> >error messages - just a clean blank screen on the browser! What needs to
> >be tweaked?
>
> Look at the php.ini file in the windows directory, and set the following
> variable:
>
> display_errors = On
>
> This is useful for debugging but error messages will show on the web page,
> and users will see them also. If you prefer not to show error messages to
> users, set
>
> display_errors = Off
> log_errors = On
>
> error_log = c:\php\errori.log  (or any other directory and file of your
choice)
>
> and all error messages will be saved in this text-file.
>
> Hope this can be helpful.
>
>
>
>          Paolo Bonavoglia
>
> Cannaregio 3027/R
> 30121 V E N E Z I A
> ========================================================
> Sito del Liceo Foscarini        http://www.liceofoscarini.it/
> Astronomia e
> Calendari          http://digilander.iol.it/paolobona/astro/home.html
>



--- End Message ---
--- Begin Message ---
Hy guys

I need to read the COM1 port from de server. Can I do this with PHP. 

Thank´s, Waldemar

--- End Message ---
--- Begin Message ---
maybe it's just me, but that doesn't really make any sense...

what are you trying to read from COM1 on the server?

----- Original Message -----
From: "Waldemar Brand Neto" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 25, 2003 6:47 PM
Subject: [PHP-WIN] Read COM1


Hy guys

I need to read the COM1 port from de server. Can I do this with PHP.

Thank´s, Waldemar



--- End Message ---
--- Begin Message ---
Actually is my boss he want´s some data from the Phone Central.

----- Original Message -----
From: "skate" <[EMAIL PROTECTED]>
To: "Waldemar Brand Neto" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, March 25, 2003 3:54 PM
Subject: Re: [PHP-WIN] Read COM1


> maybe it's just me, but that doesn't really make any sense...
>
> what are you trying to read from COM1 on the server?
>
> ----- Original Message -----
> From: "Waldemar Brand Neto" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 25, 2003 6:47 PM
> Subject: [PHP-WIN] Read COM1
>
>
> Hy guys
>
> I need to read the COM1 port from de server. Can I do this with PHP.
>
> Thank´s, Waldemar
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
i can't see it's physically possible...

php really doesn't have the functionality to interact with devices like
this, well, not without specific extensions, and i don't know about these...

you'd need some kinda intermediate program that'd talk to your phone
central, and then give back the results to php in some form. PHP could quite
easily read from a file or a database, or it could call a specific program,
but no way to directly access COM1. and even if it could, i'm sure Phone
Central would be speaking a different language to what PHP could
interpret...

sorry...

----- Original Message -----
From: "Waldemar Brand Neto" <[EMAIL PROTECTED]>
To: "skate" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, March 25, 2003 7:10 PM
Subject: Re: [PHP-WIN] Read COM1


Actually is my boss he want´s some data from the Phone Central.

----- Original Message -----
From: "skate" <[EMAIL PROTECTED]>
To: "Waldemar Brand Neto" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, March 25, 2003 3:54 PM
Subject: Re: [PHP-WIN] Read COM1


> maybe it's just me, but that doesn't really make any sense...
>
> what are you trying to read from COM1 on the server?
>
> ----- Original Message -----
> From: "Waldemar Brand Neto" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 25, 2003 6:47 PM
> Subject: [PHP-WIN] Read COM1
>
>
> Hy guys
>
> I need to read the COM1 port from de server. Can I do this with PHP.
>
> Thank´s, Waldemar
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php






--- End Message ---
--- Begin Message ---
try this 
http://www.trios.org/php/serialport/


-----Original Message-----
From: Waldemar Brand Neto [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 12:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Read COM1


Hy guys

I need to read the COM1 port from de server. Can I do this with PHP. 

Thank´s, Waldemar

--- End Message ---
--- Begin Message --- While was working on staging server (Global On) everythign was working ok:
<form ENCTYPE=multipart/form-data action="<?php echo $PHP_SELF; ?>" name=qmform method=post>
Product name: <input name=prod_name value="<?php echo $_POST[prod_name]; ?>" type=text size=30>
Product Ser.#:<input name=img_name value="<?php echo $_POST[img_name]; ?>" type=text size=30>
Upload 1st image: <input name=var1 type=file size=30>
Upload 2nd image: <input name=var2 type=file size=30>
Upload 3rd image: <input name=var3 type=file size=30>
<INPUT type=hidden name=MAX_FILE_SIZE value="<?php echo $my_max_file_size; ?>">
<input type=submit name=SubmitAdd value="Upload!"></td>
</form>


But, pushing to other server (Global Off) - can't read variables $var1, $var2, $var3, actually $POST[var1], $POST[var3], $POST[var3].
Even, listing by:


while(list($key, $value) = each($HTTP_POST_VARS))
echo"$key: $value<br>";

can see just prod_name, MAX_FILE_SIZE i SubmitAdd variables.

Need $var1, $var2 and $var3 to validate uploaded files - have to be only jpg format.

Any idea?

Afan


--- End Message ---
--- Begin Message --- On Tue, 25 Mar 2003 13:13:05 -0500, Afan Pasalic <[EMAIL PROTECTED]> wrote:

While was working on staging server (Global On) everythign was working ok:
<form ENCTYPE=multipart/form-data action="<?php echo $PHP_SELF; ?>" name=qmform method=post>
Product name: <input name=prod_name value="<?php echo $_POST[prod_name]; ?>" type=text size=30>
Product Ser.#:<input name=img_name value="<?php echo $_POST[img_name]; ?>" type=text size=30>
Upload 1st image: <input name=var1 type=file size=30>
Upload 2nd image: <input name=var2 type=file size=30>
Upload 3rd image: <input name=var3 type=file size=30>
<INPUT type=hidden name=MAX_FILE_SIZE value="<?php echo $my_max_file_size; ?>">
<input type=submit name=SubmitAdd value="Upload!"></td>
</form>


But, pushing to other server (Global Off) - can't read variables $var1, $var2, $var3, actually $POST[var1], $POST[var3], $POST[var3].
Even, listing by:


while(list($key, $value) = each($HTTP_POST_VARS))
echo"$key: $value<br>";

can see just prod_name, MAX_FILE_SIZE i SubmitAdd variables.

Need $var1, $var2 and $var3 to validate uploaded files - have to be only jpg format.

Any idea?

Afan



http://bugs.php.net/bug.php?id=17958


I think I have the same problem on a Win2k server running Apache. When we switch it to IIS, it works. If I try a print_r($_POST), it shows an empty array. Only happens with "multipart/form-data" forms.

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

--- End Message ---
--- Begin Message --- GD is now a part of PHP 4.3.0. But, do I have to make some changes in php.ini (set it up) before I start using it or it's already set up to use?
I'm still getting error message:


Fatal error: Call to undefined function: imagecreate() in /home/admin/resize_image.php on line 12

Afan
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] (Afan Pasalic) wrote:

>GD is now a part of PHP 4.3.0. But, do I have to make some changes in 
>php.ini (set it up) before I start using it or it's already set up to use?
>I'm still getting error message:

uncomment 
;extension=php_gd2.dll
in your php.ini file (remove the semicolon) or,
if you use CGI you can load it dynamically if you don't use it much:
dl("php_gd2.dll");
at the top of your script.

You'll find more info at www.php.net/gd

Christoph

--- End Message ---
--- Begin Message ---
Is it possible to upload multiple files at once? ...In a form, using a
"file" input and being able to select more then one file?


.bobo


--- End Message ---

Reply via email to