php-windows Digest 6 Jan 2004 23:18:18 -0000 Issue 2070

Topics (messages 22494 through 22509):

Re: Shopping Cart Woes!!
        22494 by: kaizer boab

problem after Installing php-4.3.4-installer.exe and IIS 6.0
        22495 by: Holger Winter
        22496 by: Svensson, B.A.T. (HKG)

Session Problem
        22497 by: Meteorlet
        22498 by: Svensson, B.A.T. (HKG)
        22499 by: hubo
        22500 by: Meteorlet
        22501 by: Robert Schmelzer

Undefined variable issue
        22502 by: Jim MacDiarmid
        22503 by: Frank M. Kromann

This is a test only, please disregard
        22504 by: Satch
        22506 by: Svensson, B.A.T. (HKG)

Re: sql.safe_mode ON/OFF - purpose ?
        22505 by: Svensson, B.A.T. (HKG)

Why does php exit after 6 minutes?
        22507 by: Svensson, B.A.T. (HKG)
        22508 by: Frank M. Kromann
        22509 by: Svensson, B.A.T. (HKG)

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 ---
Thanks for the replies, much appreciated. I have now managed to get the
query to work properly. As Justen suggested I added "WHERE" and the column
name.


"Kaizer Boab" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am trying to build a shopping cart for my college project. I am able to
> display items from the database, add items to the cart, but I am unable to
> view the items that are in the cart. In my "view_cart.php" page I receive
> the following error:
>
> "You have an error in your SQL syntax. Check the manual that corresponds
to
> your MySQL server version for the right syntax to use near 'IN (64) ORDER
BY
> dvd.dvd_title ASC' at line 1".
>
> The error appears to be from this part of my script:
>
> $query = 'SELECT * FROM dvd IN (';
> foreach ($_SESSION['cart'] as $key => $value) {
> $query .= $key . ',';
> }
> $query = substr ($query, 0, -1) . ') ORDER BY dvd.dvd_title ASC';
> $result = mysql_query ($query) or die(mysql_error());
>
> Could someone please tell why the query is not working?
> Thanks in advance.

--- End Message ---
--- Begin Message ---
Hi!

Did there anybody know which changes the installer do in registry and in
IIS.
One Message came that the script ... must switch.
what does the installer do there.
After I installed PHP my asp programms didn´t run.
now i have a lot of text but no graphics.

I hope anybody can me explain or give me a hint.


Thanks

--- End Message ---
--- Begin Message ---
There might be a number of reason why your scripts wont run.
You might like to start to review you "Web Servive  Extension"
to make sure every thing is properlyt set up to begin with.

To see if the problrem is related with the setting here, you
can make sure that "All Unknown CGI Extension" are allowed.

If you can run the scripts now, then you need to configure
this section. 

If it still does not work, then review your web site, select
properties, and then select the "Home Directory" tab, then
press the "Configure" button. Now you should be able to review
wich executable is coupled with the file extension. If you can
find your file extension here, you need to set it.

Then there might be some few oter stuff you need to do, like
checking that executable permission is set in the file syste.
it should be enough to set this via the IIS manger, since it
will modify the access right on operating file system level
to.

-----Original Message-----
From: Holger Winter
To: [EMAIL PROTECTED]
Sent: 2004-01-06 12:32
Subject: [PHP-WIN] problem after Installing php-4.3.4-installer.exe and IIS
6.0

Hi!

Did there anybody know which changes the installer do in registry and in
IIS.
One Message came that the script ... must switch.
what does the installer do there.
After I installed PHP my asp programms didn?t run.
now i have a lot of text but no graphics.

I hope anybody can me explain or give me a hint.


Thanks

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

--- End Message ---
--- Begin Message ---
        Hi,everyone!
        I got a problem about SESSION.When we use Seesion to store information,
we hope that the session will be destroied after you close browser IE automatically.
but sometimes it's not truth.In local test,everything is alright,but I uploaded 
them into my ISP's host,the session wouldn't be destroied at once.who encounter
this problem? I found that the PHP configuration of my computer and remote host is 
the same. the option session.cookie_lifetime always equal to 0.
        how to make the session timeout immedially after closing IE?

        for example,
        <input type="text" name="password" value="<? echo $_SESSION['password'];?>">
    after closing IE,open IE again.
    I will get <input type "text" name="password" value=""> in local test.
    but in my remote host I will always get since I first logined:
    <input type "text" name="password" value="*********"> 

        Meteorlet
[EMAIL PROTECTED]
          2004-01-06

--- End Message ---
--- Begin Message ---
You can't rely on the cleint, anything can happend with the client.
Maybe calling session_destrouy() from the web server script is what you
actually want to do.

-----Original Message-----
From: Meteorlet
To: php-windows
Sent: 1/6/2004 3:27 PM
Subject: [PHP-WIN] Session Problem


        Hi,everyone!
        I got a problem about SESSION.When we use Seesion to store
information,
we hope that the session will be destroied after you close browser IE
automatically.
but sometimes it's not truth.In local test,everything is alright,but I
uploaded 
them into my ISP's host,the session wouldn't be destroied at once.who
encounter
this problem? I found that the PHP configuration of my computer and
remote host is 
the same. the option session.cookie_lifetime always equal to 0.
        how to make the session timeout immedially after closing IE?

        for example,
        <input type="text" name="password" value="<? echo
$_SESSION['password'];?>">
    after closing IE,open IE again.
    I will get <input type "text" name="password" value=""> in local
test.
    but in my remote host I will always get since I first logined:
    <input type "text" name="password" value="*********"> 

        Meteorlet
        [EMAIL PROTECTED]
          2004-01-06

--- End Message ---
--- Begin Message ---
Be sure that it is a problem about session. Sometimes the page shown is just
from the cache of your browser.

"Meteorlet" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
>
> Hi,everyone!
> I got a problem about SESSION.When we use Seesion to store information,
> we hope that the session will be destroied after you close browser IE
automatically.
> but sometimes it's not truth.In local test,everything is alright,but I
uploaded
> them into my ISP's host,the session wouldn't be destroied at once.who
encounter
> this problem? I found that the PHP configuration of my computer and remote
host is
> the same. the option session.cookie_lifetime always equal to 0.
> how to make the session timeout immedially after closing IE?
>
> for example,
> <input type="text" name="password" value="<? echo
$_SESSION['password'];?>">
>     after closing IE,open IE again.
>     I will get <input type "text" name="password" value=""> in local test.
>     but in my remote host I will always get since I first logined:
>     <input type "text" name="password" value="*********">
>
> ĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦMeteorlet
> [EMAIL PROTECTED]
> ĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦ2004-01-06
>

--- End Message ---
--- Begin Message ---
hubo,Hello!

        yes,maybe you are right.but after I clear my cache it will be the same.only if
I clear my cookies and it will be my expectation.I just wanna know why different
host will have difference about session even with the same configuration?
I remember that ASP's Session will be destoried after closing IE.it works fine.
Is there any reason from the server or the client?


======= 2004-01-07 00:27:42 =======

>Be sure that it is a problem about session. Sometimes the page shown is just
>from the cache of your browser.
>
>"Meteorlet" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
>news:[EMAIL PROTECTED]
>>
>> Hi,everyone!
>> I got a problem about SESSION.When we use Seesion to store information,
>> we hope that the session will be destroied after you close browser IE
>automatically.
>> but sometimes it's not truth.In local test,everything is alright,but I
>uploaded
>> them into my ISP's host,the session wouldn't be destroied at once.who
>encounter
>> this problem? I found that the PHP configuration of my computer and remote
>host is
>> the same. the option session.cookie_lifetime always equal to 0.
>> how to make the session timeout immedially after closing IE?
>>
>> for example,
>> <input type="text" name="password" value="<? echo
>$_SESSION['password'];?>">
>>     after closing IE,open IE again.
>>     I will get <input type "text" name="password" value=""> in local test.
>>     but in my remote host I will always get since I first logined:
>>     <input type "text" name="password" value="*********">
>>
>>         Meteorlet
>> [EMAIL PROTECTED]
>>           2004-01-06
>>
>
>-- 
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>

= = = = = = = = = = = = = = = = = = = =
                                 
        Meteorlet
[EMAIL PROTECTED]
          2004-01-07

--- End Message ---
--- Begin Message ---
I thinks its a problem of configuration.

Perhaps there is the configuration variable session.use_cookies set to true.
Then the closing of the browser does not cause the session to be destroyed.

greetings
Robert

"Meteorlet" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
>
> Hi,everyone!
> I got a problem about SESSION.When we use Seesion to store information,
> we hope that the session will be destroied after you close browser IE
automatically.
> but sometimes it's not truth.In local test,everything is alright,but I
uploaded
> them into my ISP's host,the session wouldn't be destroied at once.who
encounter
> this problem? I found that the PHP configuration of my computer and remote
host is
> the same. the option session.cookie_lifetime always equal to 0.
> how to make the session timeout immedially after closing IE?
>
> for example,
> <input type="text" name="password" value="<? echo
$_SESSION['password'];?>">
>     after closing IE,open IE again.
>     I will get <input type "text" name="password" value=""> in local test.
>     but in my remote host I will always get since I first logined:
>     <input type "text" name="password" value="*********">
>
> ĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦMeteorlet
> [EMAIL PROTECTED]
> ĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦ2004-01-06
>

--- End Message ---
--- Begin Message ---
Hi everyone,
 
I'm new to working with PHP (coming from a ASP/VBScript background) and
I'm currently reading the book "Teach yourself PHP, mySQL, and Apache in
24 hours".  The following code from the code from the book seems to be
causing an "undefined variable" error when run.  Would any one be able
tell me why this is happening?  Many thanks!  Jim
 
Notice:  Undefined variable:  guess in numguess.php on line 27
 
<?php 
$num_to_guess = 42;
$num_tries = ( isset($_POST["num_tries"])) ? $num_tries + 1 : 0;
//$guess = (isset($_POST["guess"])) ? $_POST["guess"] : 0;
$message = "";
if (!isset($_POST["guess"])) {
            $message = "Welcome to the guessing machine!";
} elseif ( $_POST["guess"] > $num_to_guess) {
            $message = "$_POST[guess] is too big! Try a smaller number";
} elseif ( $_POST["guess"] < $num_to_guess) {
            $message = "$_POST[guess] is too small! Try a larger
number";
} else {
            $message = "Well done!";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
>
</head>
<body>
<h1><?php print $message ?></h1>
Guess number: <?php print $num_tries ?>
<form action="<?php print $_SERVER["PHP_SELF"] ?>" method="post">
Type your guess here: 
<input name="guess" type="text" value="<?php print $guess ?>">
<input name="num_tries" type="hidden" value="<?php print $num_tries ?>">
</form>
</body>
</html>

--- End Message ---
--- Begin Message ---
Hi Jim,

I don't think the code you posted matches the code you are running. This
code does not give any errors, it works fine. There is no $guess variable
in line 27.

- Frank

> Hi everyone,
>  
> I'm new to working with PHP (coming from a ASP/VBScript background) and
> I'm currently reading the book "Teach yourself PHP, mySQL, and Apache
in
> 24 hours".  The following code from the code from the book seems to be
> causing an "undefined variable" error when run.  Would any one be able
> tell me why this is happening?  Many thanks!  Jim
>  
> Notice:  Undefined variable:  guess in numguess.php on line 27
>  
> <?php 
> $num_to_guess = 42;
> $num_tries = ( isset($_POST["num_tries"])) ? $num_tries + 1 : 0;
> //$guess = (isset($_POST["guess"])) ? $_POST["guess"] : 0;
> $message = "";
> if (!isset($_POST["guess"])) {
>             $message = "Welcome to the guessing machine!";
> } elseif ( $_POST["guess"] > $num_to_guess) {
>             $message = "$_POST[guess] is too big! Try a smaller
number";
> } elseif ( $_POST["guess"] < $num_to_guess) {
>             $message = "$_POST[guess] is too small! Try a larger
> number";
> } else {
>             $message = "Well done!";
> }
> ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
> >
> </head>
> <body>
> <h1><?php print $message ?></h1>
> Guess number: <?php print $num_tries ?>
> <form action="<?php print $_SERVER["PHP_SELF"] ?>" method="post">
> Type your guess here: 
> <input name="guess" type="text" value="<?php print $guess ?>">
> <input name="num_tries" type="hidden" value="<?php print $num_tries
?>">
> </form>
> </body>
> </html>
> 

--- End Message ---
--- Begin Message ---
This is just a test.  Please disregard.

Thanks!

--------------------------------------------------------------------------------

Satch




"Warwick Chapman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
  This applies to Access, Sybase and MS-SQL as far as I know.

  On 11 Oct 00, at 17:09, Warwick Chapman (Budgee) wrote:

  > Hi All
  > 
  > After a little research I found a solution. The escape character for a 
  > single quote is in fact another single quote, not a \. If one turns on 
  > the magic_quotes_sybase directive On and uses the addslashes 
  > function, php turns all ' into ''.
  > 
  > Problem solved. No need for AccessAddSlashes!
  > 
  > Thanks to John for the help.
  > 
  > Cheers
  > 
  > Warwick Chapman (1999)
  > Assistant IT Manager
  > Glenwood High School, Durban, South Africa
  > 031 2055241
  > 083 7797094
  > www.glenwoodhighschool.co.za
  > 
  > -- 
  > PHP Windows Mailing List (http://www.php.net/)
  > To unsubscribe, e-mail: [EMAIL PROTECTED]
  > For additional commands, e-mail: [EMAIL PROTECTED]
  > To contact the list administrators, e-mail: [EMAIL PROTECTED]
  > 



  Warwick Chapman (1999)
  Assistant IT Manager
  Glenwood High School, Durban, South Africa
  031 2055241
  083 7797094
  www.glenwoodhighschool.co.za

--- End Message ---
--- Begin Message ---
I am disregarding this mail. :) 

-----Original Message-----
From: Satch
To: [EMAIL PROTECTED]
Sent: 2004-01-06 16:34
Subject: [PHP-WIN] This is a test only, please disregard

This is just a test.  Please disregard.

Thanks!

--- End Message ---
--- Begin Message ---
Is the scope only MySQL and Ingres?

For instance ODBC has default user and defualt passwd
as well, would not ODBC be affect as well then?

PostGress, MS SQL seams not to have the support to set
defualt user and passwd, so it a bit harder to imagine
it could affect those RDBMS, but for the RDBMS's who
actually have it (ibase, odbc, etc) will those not be
affected?

-----Original Message-----
From: choinet
To: Svensson, B.A.T. (HKG)
Sent: 2004-01-06 19:53
Subject: Re: [PHP-WIN] sql.safe_mode ON/OFF - purpose ?

http://uploadmio.visicommedia.com/ZendInformationCenter/ZendServerCenter/sql
_safe_mode.htm

I believe that in sql safe mode, the user id is the same as that of PHP.

--- "Svensson, B.A.T. (HKG)" <B.A.T.Svenssonlumc.nl> wrote:

> What does sql.safe_mode ON/OFF affect?
 

--- End Message ---
--- Begin Message ---
* CONFIG:

PHP version 4.3.4
IIS version 6.0
MS SQL server 2000
Windows 2003 server - dual Pentium

phpinfo(): safe_mode:  off
phpinfo(): max_execution_time:  1800s
phpinfo(): mssql.timeout:  1800s

IIS: website script execution time:  f.a.p.p. unlimited
IIS: website sessions:  keep alive.

RDBMS: query execution time:  unlimited


* WHAT HAPPENED:

while running a long running query php.exe is visible
in the task manager for 6 minutes, then it dies with
out telling anything - what so ever! 

* DISCUSSION:

This query works just fine if the query process data quickly,
let say in about 30 to 60 seconds, but when the query needs
to be processing data for ~25 minutes, php will exits after
six minutes and then the database seams then to be doing a
rollback for the next 20 minutes or so on the transactions
made by the php connection.

Before php exits the RDBMS responds normal - but has a CPU
load of 100%. After php exits the RDBMS does not respond any
more or respond very sluggish. I can see no kind of I/O
activities with the RDBMS, only 100% CPU load. The RDBMS
keeps in this state for about 20-30 minutes, then the RDBMS
goes back to normal operation again.

Any suggestion on what might be going on here is welcome.


-- 

To readers of [EMAIL PROTECTED]:

Ursakta engelskan.

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

Iĝm asuing you are accessing the script through a browser ?

There is sevral time out values that you should be aware of.

PHP's timeout, The database timeout, The web servers CGI timeout and the
connection time out between the browser and the web server.

The first two seams to be set correct, the web servers time out is
configured under IIS and would normally be 900 seconds. The only way to
get arround the browser time out would be to keep sending content from the
server to the browser. Make sure you use flush() after each print so data
is transfered right away.

- Frank

> * CONFIG:
> 
> PHP version 4.3.4
> IIS version 6.0
> MS SQL server 2000
> Windows 2003 server - dual Pentium
> 
> phpinfo(): safe_mode:  off
> phpinfo(): max_execution_time:  1800s
> phpinfo(): mssql.timeout:  1800s
> 
> IIS: website script execution time:  f.a.p.p. unlimited
> IIS: website sessions:  keep alive.
> 
> RDBMS: query execution time:  unlimited
> 
> 
> * WHAT HAPPENED:
> 
> while running a long running query php.exe is visible
> in the task manager for 6 minutes, then it dies with
> out telling anything - what so ever! 
> 
> * DISCUSSION:
> 
> This query works just fine if the query process data quickly,
> let say in about 30 to 60 seconds, but when the query needs
> to be processing data for ~25 minutes, php will exits after
> six minutes and then the database seams then to be doing a
> rollback for the next 20 minutes or so on the transactions
> made by the php connection.
> 
> Before php exits the RDBMS responds normal - but has a CPU
> load of 100%. After php exits the RDBMS does not respond any
> more or respond very sluggish. I can see no kind of I/O
> activities with the RDBMS, only 100% CPU load. The RDBMS
> keeps in this state for about 20-30 minutes, then the RDBMS
> goes back to normal operation again.
> 
> Any suggestion on what might be going on here is welcome.
> 
> 
> -- 
> 
> To readers of [EMAIL PROTECTED]:
> 
> Ursakta engelskan.
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
Yes, I am accessing the script through a browser.

I am not using, flush(), but ob_flush() to send data
straight back to the browser as it is collected. However,
in this case, php exits before the query has completed
so there is no data to send (the query last for 24m, but
php exits after 6m). 

The web servers CGI timeout, if this is the same as
Website->Properties->[don't-remember-tab-name]->timeout,
is set to don't-remember-the-value-but-something-sufficient-high.

I am also pretty sure about that the web server is set to sends
keep alive message to the client, since I did review the server
settings today and saw something saying so. But never say never.
I will review them again, just to be 100% sure, when I am back at
work tomorrow.

I have to say I really hope it the IIS setting that is
screwed up, otherwise I am in deep shit, since I have
no clue on to what's going on right now.


-- 

P.S. To PHP readers: if you CC to [EMAIL PROTECTED],
you will get a bounce, since that is a closed, private,
member-only, e-mail list which only registered member
are able to post to. 

I am sorry for the inconvenience.

D.S.




-----Original Message-----
From: Frank M. Kromann
To: Svensson, B.A.T. (HKG)
Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
Sent: 2004-01-06 23:30
Subject: Re: [PHP-WIN] Why does php exit after 6 minutes?

Hi,

Iĝm asuing you are accessing the script through a browser ?

There is sevral time out values that you should be aware of.

PHP's timeout, The database timeout, The web servers CGI timeout
and the connection time out between the browser and the web server.

The first two seams to be set correct, the web servers time out is
configured under IIS and would normally be 900 seconds. The only way to
get arround the browser time out would be to keep sending content from
the server to the browser. Make sure you use flush() after each print so
data is transfered right away.

- Frank

> * CONFIG:
> 
> PHP version 4.3.4
> IIS version 6.0
> MS SQL server 2000
> Windows 2003 server - dual Pentium
> 
> phpinfo(): safe_mode:  off
> phpinfo(): max_execution_time:  1800s
> phpinfo(): mssql.timeout:  1800s
> 
> IIS: website script execution time:  f.a.p.p. unlimited
> IIS: website sessions:  keep alive.
> 
> RDBMS: query execution time:  unlimited
> 
> 
> * WHAT HAPPENED:
> 
> while running a long running query php.exe is visible
> in the task manager for 6 minutes, then it dies with
> out telling anything - what so ever! 
> 
> * DISCUSSION:
> 
> This query works just fine if the query process data quickly,
> let say in about 30 to 60 seconds, but when the query needs
> to be processing data for ~25 minutes, php will exits after
> six minutes and then the database seams then to be doing a
> rollback for the next 20 minutes or so on the transactions
> made by the php connection.
> 
> Before php exits the RDBMS responds normal - but has a CPU
> load of 100%. After php exits the RDBMS does not respond any
> more or respond very sluggish. I can see no kind of I/O
> activities with the RDBMS, only 100% CPU load. The RDBMS
> keeps in this state for about 20-30 minutes, then the RDBMS
> goes back to normal operation again.
> 
> Any suggestion on what might be going on here is welcome.
> 
> 
> -- 
> 
> To readers of [EMAIL PROTECTED]:
> 
> Ursakta engelskan.
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---

Reply via email to