php-windows Digest 5 Dec 2002 20:13:22 -0000 Issue 1472
Topics (messages 17281 through 17303):
Re: Fast Web server
17281 by: J.Veenhuijsen
17291 by: Radovan Radic
XML parsing
17282 by: Frode Mangseth
Re: PHP sessions in Windows
17283 by: J.Veenhuijsen
17284 by: gary.hayers.org
17285 by: gary.hayers.org
17303 by: Juan Rosero
auto increment
17286 by: Pat Johnston
17287 by: George Nicolae
17288 by: Ignatius Reilly
17289 by: Cam Dunstan
eregi problem
17290 by: A. Mikkelsen
17292 by: Asendorf, John
IIS/PHP w/ NTFS issue
17293 by: Christopher England
17297 by: Christopher England
17298 by: Charles P. Killmer
17299 by: Luis Ferro
17300 by: Charles P. Killmer
socket timeout
17294 by: Gareth Thomas
17295 by: Stephen Edmonds
socket timeout issue
17296 by: Gareth Thomas
Timed mailing: is it possible?
17301 by: Paolo Bonavoglia
17302 by: Ignatius Reilly
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 ---
Try Sambar or Xitami
Radovan Radic wrote:
Hi
Can you tell me your experiences about web servers.
I need fast web server which runs on Win2000, compatible with PHP (i mean
that php works without problems) and is not IIS
Thx
Radovan
--- End Message ---
--- Begin Message ---
Thanks for the info guys
I think i will try Apache, i have been using it on Win98, i dont know how it
will be on 2000.
Radovan
"Radovan Radic" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi
>
> Can you tell me your experiences about web servers.
> I need fast web server which runs on Win2000, compatible with PHP (i mean
> that php works without problems) and is not IIS
>
> Thx
> Radovan
>
>
--- End Message ---
--- Begin Message ---
I have an XML-issue.
I have a XML-file which I call master. Then when I make
small changes to this(a variant of the master) I don't want to store the
whole XML
in a different file, but just store the differences in
a database.
What would be the most efficient way to do this.
Would it be better to combine php with Apache Xerces(java servlets,
serverpages) for instance?
Frode
--- End Message ---
--- Begin Message ---
Check if the directory where PHP stores session info
exists in PHP.ini and on the harddisk ( C:\temp ??)
Jochem
Juan Rosero wrote:
Hello,
I've been trying to run a PHP program called PHPList 1.9.3 available at
http://www.phplist.com/files/. The program does not seem to retain it's
sessions when running on a Windows environment.
The program runs well on my Mac OS X 10.2 "Jaguar".
Here is the info on my Windows machine:
Windows XP with Service Pack 3
Apache 2.0.43
PHP 4.3 RC2 (module)
mySQL 3.23.x
Can anyone give a hint of what's going on?
Thanks in advance.
geo
--- End Message ---
--- Begin Message ---
try here http://pear.php.net/
Juan Rosero <[EMAIL PROTECTED]> wrote on 04.12.2002, 23:50:51:
> Hello,
> I've been trying to run a PHP program called PHPList 1.9.3 available at
> http://www.phplist.com/files/. The program does not seem to retain it's
> sessions when running on a Windows environment.
> The program runs well on my Mac OS X 10.2 "Jaguar".
>
> Here is the info on my Windows machine:
> Windows XP with Service Pack 3
> Apache 2.0.43
> PHP 4.3 RC2 (module)
> mySQL 3.23.x
>
> Can anyone give a hint of what's going on?
>
> Thanks in advance.
>
> geo
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Opps sorry wrong reply to wrong email :os
[EMAIL PROTECTED] wrote on 05.12.2002, 12:01:04:
> try here http://pear.php.net/
>
> Juan Rosero wrote on 04.12.2002, 23:50:51:
> > Hello,
> > I've been trying to run a PHP program called PHPList 1.9.3 available at
> > http://www.phplist.com/files/. The program does not seem to retain it's
> > sessions when running on a Windows environment.
> > The program runs well on my Mac OS X 10.2 "Jaguar".
> >
> > Here is the info on my Windows machine:
> > Windows XP with Service Pack 3
> > Apache 2.0.43
> > PHP 4.3 RC2 (module)
> > mySQL 3.23.x
> >
> > Can anyone give a hint of what's going on?
> >
> > Thanks in advance.
> >
> > geo
> >
> >
> >
> > --
> > 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 ---
Jochem,
Thank you for your help. Yes, "session.save_path" has to point to a
directory in Windows. This is how I entered in my configuration.
session.save_path = c:/WINDOWS/Temp
Thank you Jockem and to Rico Derks to point me to the right solution.
Best regards,
geo
"J.Veenhuijsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Check if the directory where PHP stores session info
> exists in PHP.ini and on the harddisk ( C:\temp ??)
>
> Jochem
>
> Juan Rosero wrote:
> > Hello,
> > I've been trying to run a PHP program called PHPList 1.9.3 available at
> > http://www.phplist.com/files/. The program does not seem to retain it's
> > sessions when running on a Windows environment.
> > The program runs well on my Mac OS X 10.2 "Jaguar".
> >
> > Here is the info on my Windows machine:
> > Windows XP with Service Pack 3
> > Apache 2.0.43
> > PHP 4.3 RC2 (module)
> > mySQL 3.23.x
> >
> > Can anyone give a hint of what's going on?
> >
> > Thanks in advance.
> >
> > geo
> >
> >
>
--- End Message ---
--- Begin Message ---
Hi
With php, just wondering if anyone knows if I can auto increment a number
that has a part string? Is it possible to code this for an ID in MySQL
database?
ie
rur01
rur02
rur03
--- End Message ---
--- Begin Message ---
just
for ($i=1;$i<100;i++)
{
if($i<10) $string="rur0".$i;
else $string="rur:.$i;
{
--
Best regards,
George Nicolae
IT Manager
___________________
PaginiWeb.com - Professional Web Design
www.PaginiWeb.com
"Pat Johnston" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi
> With php, just wondering if anyone knows if I can auto increment a number
> that has a part string? Is it possible to code this for an ID in MySQL
> database?
>
> ie
> rur01
> rur02
> rur03
>
>
--- End Message ---
--- Begin Message ---
You can not do it straightforwardly. The required data type does not exist
in MySQL. An auto_increment field is of type INTEGER.
Ignatius
____________________________________________
----- Original Message -----
From: "Pat Johnston" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 05, 2002 12:35 PM
Subject: [PHP-WIN] auto increment
> Hi
> With php, just wondering if anyone knows if I can auto increment a number
> that has a part string? Is it possible to code this for an ID in MySQL
> database?
>
> ie
> rur01
> rur02
> rur03
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
another gotcha with auto increment fields - you can`t combine contents of
two tables, each with their own auto incrementing fields which dis-allow
duplicates - oughta be a law against them.
do a query for the largest (max() function ) in an integer field, add one
and then INSERT new value. store the short varchar "rur" in another field.
Concat them when presenting to the user. Split them when the user posts a
request. See also str_pad function
----- Original Message -----
From: "Ignatius Reilly" <[EMAIL PROTECTED]>
To: "Win32 list PHP" <[EMAIL PROTECTED]>; "Pat Johnston"
<[EMAIL PROTECTED]>
Sent: Thursday, December 05, 2002 11:12 PM
Subject: Re: [PHP-WIN] auto increment
> You can not do it straightforwardly. The required data type does not exist
> in MySQL. An auto_increment field is of type INTEGER.
>
> Ignatius
> ____________________________________________
> ----- Original Message -----
> From: "Pat Johnston" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, December 05, 2002 12:35 PM
> Subject: [PHP-WIN] auto increment
>
>
> > Hi
> > With php, just wondering if anyone knows if I can auto increment a
number
> > that has a part string? Is it possible to code this for an ID in MySQL
> > database?
> >
> > ie
> > rur01
> > rur02
> > rur03
> >
> >
> >
> > --
> > 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 ---
Hey
I'm trying to validate these strings
wmli001234 wmli001234a
using this
if( eregi( "^" .
"wm" . //first 2 letters
"((li)*(si)*(wi)*)+" . //next 2 letters shal be ether
LI / SI / WI
"[0-9]{6,6}" . //next 6 numbers
"[a-z]{0,1}" . //if extra letter (only 1
letter)
"$", $wm_id))
return TRUE;
else return FALSE;
can anyone help me ?????
Anders
--- End Message ---
--- Begin Message ---
eregi( "^wm(li|si|wi)[0-9]{6}[a-z]?$", $wm_id)
That should do it... tear it apart and understand it :)
Part of the problem was in the alternation in the li|si|wi
Part of the problem was that the + would accept sisi or wisilisiwi
With {min,max}... if they are the same number, you only need one
Also, ? is a substitute for {0,1} (means the same thing)
See it here: http://www.lcounty.com/is/website/test_center/test_eregi.php
---------------------
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
> -----Original Message-----
> From: A. Mikkelsen [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 05, 2002 8:39 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] eregi problem
>
>
> Hey
>
> I'm trying to validate these strings
>
> wmli001234 wmli001234a
>
> using this
>
> if( eregi( "^" .
> "wm" . //first 2 letters
> "((li)*(si)*(wi)*)+" . //next 2 letters
> shal be ether
> LI / SI / WI
> "[0-9]{6,6}" . //next 6 numbers
> "[a-z]{0,1}" . //if extra
> letter (only 1
> letter)
> "$", $wm_id))
> return TRUE;
> else return FALSE;
>
>
> can anyone help me ?????
>
>
> Anders
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
I have IIS 5 with PHP 4.2.3 on a Windows 2000 server and I use NTFS to
control access to the directories. A user with read/execute (or even Full
Control in testing) can get to the directory fine, and .html files fine. But
.php files do not come up - access denied basically.
However, if a user is a member of the local Administrators group, they can
get in to the php files great and do everything needed with php/mysql and
all that.
Also, if I add a user to Full Control to the C:\PHP folder, I instead get an
HTTP 500 Internal Server error.
Any ideas? This has been bothering me quite a bit for a while.
Thanks in advance,
Chris
--- End Message ---
--- Begin Message ---
Ok, I may have fixed my own problem. I am posting so that others can see how
I did so.
1. I changed from running as CGI Binary to ISAPI filter. I had tried this
before but forgot something that time around.
2. Allowed "EVERYONE" group to read/exec the C:\PHP folder (instead of just
IWSR user).
Hope this can help someone in the future.
Chris
"Christopher England" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have IIS 5 with PHP 4.2.3 on a Windows 2000 server and I use NTFS to
> control access to the directories. A user with read/execute (or even Full
> Control in testing) can get to the directory fine, and .html files fine.
But
> .php files do not come up - access denied basically.
> However, if a user is a member of the local Administrators group, they can
> get in to the php files great and do everything needed with php/mysql and
> all that.
> Also, if I add a user to Full Control to the C:\PHP folder, I instead get
an
> HTTP 500 Internal Server error.
>
> Any ideas? This has been bothering me quite a bit for a while.
>
> Thanks in advance,
> Chris
>
>
--- End Message ---
--- Begin Message ---
The problem when it was running as a cgi is the php.ini may not have
been accessible by the user. Since it is in the winnt directory by
default permission would only exist admins and everyone(Read) unless you
tightened it down. Also check any dll that may be needed.
Charles Killmer
PHP 4.2.3 IIS 5.0 Windows 2000 Server
-----Original Message-----
From: Christopher England [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 11:42 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: IIS/PHP w/ NTFS issue
Ok, I may have fixed my own problem. I am posting so that others can see
how
I did so.
1. I changed from running as CGI Binary to ISAPI filter. I had tried
this
before but forgot something that time around.
2. Allowed "EVERYONE" group to read/exec the C:\PHP folder (instead of
just
IWSR user).
Hope this can help someone in the future.
Chris
"Christopher England" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have IIS 5 with PHP 4.2.3 on a Windows 2000 server and I use NTFS to
> control access to the directories. A user with read/execute (or even
Full
> Control in testing) can get to the directory fine, and .html files
fine.
But
> .php files do not come up - access denied basically.
> However, if a user is a member of the local Administrators group, they
can
> get in to the php files great and do everything needed with php/mysql
and
> all that.
> Also, if I add a user to Full Control to the C:\PHP folder, I instead
get
an
> HTTP 500 Internal Server error.
>
> Any ideas? This has been bothering me quite a bit for a while.
>
> Thanks in advance,
> Chris
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
And i think that IIS uses the user IWAN for running CGIs instead of the
IUSR user...
Cheers...
Luis Ferro
Charles P. Killmer wrote:
The problem when it was running as a cgi is the php.ini may not have
been accessible by the user. Since it is in the winnt directory by
default permission would only exist admins and everyone(Read) unless you
tightened it down. Also check any dll that may be needed.
Charles Killmer
PHP 4.2.3 IIS 5.0 Windows 2000 Server
-----Original Message-----
From: Christopher England [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 11:42 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: IIS/PHP w/ NTFS issue
Ok, I may have fixed my own problem. I am posting so that others can see
how
I did so.
1. I changed from running as CGI Binary to ISAPI filter. I had tried
this
before but forgot something that time around.
2. Allowed "EVERYONE" group to read/exec the C:\PHP folder (instead of
just
IWSR user).
Hope this can help someone in the future.
Chris
"Christopher England" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I have IIS 5 with PHP 4.2.3 on a Windows 2000 server and I use NTFS to
control access to the directories. A user with read/execute (or even
Full
Control in testing) can get to the directory fine, and .html files
fine.
But
.php files do not come up - access denied basically.
However, if a user is a member of the local Administrators group, they
can
get in to the php files great and do everything needed with php/mysql
and
all that.
Also, if I add a user to Full Control to the C:\PHP folder, I instead
get
an
HTTP 500 Internal Server error.
Any ideas? This has been bothering me quite a bit for a while.
Thanks in advance,
Chris
---
[This E-mail scanned for viruses by Declude Virus]
--- End Message ---
--- Begin Message ---
I believe it is the reverse of that. IWAN for Isapi and IUSR for cgi.
Correct me if I am wrong.
Christopher, in your email you wrote iwsr. Did you mean iusr or iwan?
Charles Killmer
-----Original Message-----
From: Luis Ferro [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 11:53 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Re: IIS/PHP w/ NTFS issue
And i think that IIS uses the user IWAN for running CGIs instead of the
IUSR user...
Cheers...
Luis Ferro
Charles P. Killmer wrote:
>The problem when it was running as a cgi is the php.ini may not have
>been accessible by the user. Since it is in the winnt directory by
>default permission would only exist admins and everyone(Read) unless
you
>tightened it down. Also check any dll that may be needed.
>
>Charles Killmer
>PHP 4.2.3 IIS 5.0 Windows 2000 Server
>
>-----Original Message-----
>From: Christopher England [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, December 05, 2002 11:42 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] Re: IIS/PHP w/ NTFS issue
>
>Ok, I may have fixed my own problem. I am posting so that others can
see
>how
>I did so.
>
>1. I changed from running as CGI Binary to ISAPI filter. I had tried
>this
>before but forgot something that time around.
>2. Allowed "EVERYONE" group to read/exec the C:\PHP folder (instead of
>just
>IWSR user).
>
>Hope this can help someone in the future.
>
>Chris
>
>"Christopher England" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
>>I have IIS 5 with PHP 4.2.3 on a Windows 2000 server and I use NTFS to
>>control access to the directories. A user with read/execute (or even
>>
>>
>Full
>
>
>>Control in testing) can get to the directory fine, and .html files
>>
>>
>fine.
>But
>
>
>>.php files do not come up - access denied basically.
>>However, if a user is a member of the local Administrators group, they
>>
>>
>can
>
>
>>get in to the php files great and do everything needed with php/mysql
>>
>>
>and
>
>
>>all that.
>>Also, if I add a user to Full Control to the C:\PHP folder, I instead
>>
>>
>get
>an
>
>
>>HTTP 500 Internal Server error.
>>
>>Any ideas? This has been bothering me quite a bit for a while.
>>
>>Thanks in advance,
>>Chris
>>
>>
>>
>>
>
>
>
>
>
---
[This E-mail scanned for viruses by Declude Virus]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,
I am attempting to timeout a socket_read() that is part of a handshaking
process using socket_set_timeout(). Problem is it doesn't seem to work at
all. If I switch off the handshaking write on the server side the read just
sits there and doesn't time out at all. I have tried
socket_set_timeout($socket,1) which I believe is 1 second and it never times
out...
Any thoughts on this would be most appreciated.
Gareth
--- End Message ---
--- Begin Message ---
Take a look at http://www.php.net/manual/en/function.socket-set-timeout.php
Quote:
'this function _does_not_ work on sockets which
connect to a port you set up using the
sockets-family of functions.
it only seems to work for connections using fsock and fopen. (and functions
which are derived from these)'
Stephen
----- Original Message -----
From: "Gareth Thomas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 05, 2002 4:55 PM
Subject: [PHP-WIN] socket timeout
Hi,
I am attempting to timeout a socket_read() that is part of a handshaking
process using socket_set_timeout(). Problem is it doesn't seem to work at
all. If I switch off the handshaking write on the server side the read just
sits there and doesn't time out at all. I have tried
socket_set_timeout($socket,1) which I believe is 1 second and it never times
out...
Any thoughts on this would be most appreciated.
Gareth
--- End Message ---
--- Begin Message ---
Hi,
apparently this does not work with socket_read() but only with higher level socket
functions (fread etc). However I have found a function called
socket_set_nonblock(socketname) which apparently does something very similar, it
prevents the socket_read from waiting to receive data. I simply built my own timeout
loop into the code and voila!!
Gareth
--- End Message ---
--- Begin Message ---
I have PhP 4.23 installed as a SAPI extension of Apache 1.3.24 on
the Windows 2000 server of our school; everything works very well, but
there is a problem I wasn't able to solve:
I have realized a Calendar system with a Paradox 9 data-base and a
few php web pages to access the calendar, add and modify events etc.etc.
(use ODBC)
Now I would like to have the system mail reminder e-mail or notify
new documents to a mailing-list at specified time (e.g. every day at 19:00,
every other day, every week ... two days before the event ...); I searched
the PhP manual on-line, but I didn't find anything good; maybe the new MCAL
functions group, but I have the calendar already working and wouldn't like
to make it all over again. What I need is just a "timer" function able to
mail a message (or do any other specified action) at a specified time.
Is that possible with PhP? Has someone tried something of the
like? Any ideas?
Thanks to whoever can help me.
Paolo Bonavoglia
---------------------------------------------------------------------------
Responsabile Lab.Informatica e sito Web
Liceo Classico "Marco Foscarini"
Cannaregio 4942
I 30121 VENEZIA - ITALY
--------------------------------------------------------------------------
Pagine Web http://www.liceofoscarini.it/
--- End Message ---
--- Begin Message ---
You should use Win2K's excellent task scheduling.
Create an AT with the command "c:/php/php.exe c:/.../my_script.php" (adapt)
HTH
Ignatius
____________________________________________
----- Original Message -----
From: "Paolo Bonavoglia" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 05, 2002 7:39 PM
Subject: [PHP-WIN] Timed mailing: is it possible?
>
> I have PhP 4.23 installed as a SAPI extension of Apache 1.3.24 on
> the Windows 2000 server of our school; everything works very well, but
> there is a problem I wasn't able to solve:
>
> I have realized a Calendar system with a Paradox 9 data-base and
a
> few php web pages to access the calendar, add and modify events etc.etc.
> (use ODBC)
> Now I would like to have the system mail reminder e-mail or
notify
> new documents to a mailing-list at specified time (e.g. every day at
19:00,
> every other day, every week ... two days before the event ...); I searched
> the PhP manual on-line, but I didn't find anything good; maybe the new
MCAL
> functions group, but I have the calendar already working and wouldn't like
> to make it all over again. What I need is just a "timer" function able to
> mail a message (or do any other specified action) at a specified time.
>
> Is that possible with PhP? Has someone tried something of the
> like? Any ideas?
>
> Thanks to whoever can help me.
>
>
> Paolo Bonavoglia
> --------------------------------------------------------------------------
-
> Responsabile Lab.Informatica e sito Web
>
> Liceo Classico "Marco Foscarini"
> Cannaregio 4942
> I 30121 VENEZIA - ITALY
>
> --------------------------------------------------------------------------
> Pagine Web http://www.liceofoscarini.it/
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---