php-windows Digest 23 May 2001 08:07:56 -0000 Issue 613

Topics (messages 7846 through 7865):

Re: Need help with Cookies
        7846 by: Ivan Milanez Castellanos

php 4.0/win 2000/sql server
        7847 by: PHPFAN
        7849 by: andrew morton

Re: OK, I'm officially screwed if I can't get some sugg estions
        7848 by: Jason Gan

PLEASE HELP.
        7850 by: PHPFAN
        7853 by: Flint Doungchak
        7854 by: Ivan Milanez Castellanos

Runtime Errors on Win2k IIS 5
        7851 by: SLundwall
        7855 by: Ignatius Teo
        7858 by: SLundwall

RE:escape loop on timeout
        7852 by: Brendan
        7856 by: Ignatius Teo
        7859 by: Zak Greant

Re: problems with php_track_vars. please help
        7857 by: Ignatius Teo

include
        7860 by: sunker
        7861 by: Ignatius Teo
        7862 by: Mike Flynn

Re: include - one more thing
        7863 by: Mike Flynn

Problems coding in PHP
        7864 by: Khai Mun

Re: Multiple value selection box (mix php/html problem) returning only one value
        7865 by: Matt Williams

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]


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



Thanx Brian but I allready resolved the problem by switching the web server
from IIS 5 to Apache aparentrly IIS has problems setting cookies from PHP
scripts.

I'll still try your files and tell you what happened ok.

Later.

-----Original Message-----
From: Brian Little [mailto:[EMAIL PROTECTED]]
Sent: Martes, 22 de Mayo de 2001 02:37 p.m.
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Need help with Cookies


Can't say I know what the problem is, but here are two test files, that work
on my Windows 2000, IIS 5, SQL 7 machine. Let me know if you have a problem
with them and maybe we can find the problem.

Brian






When ever I am trying to access a php file with an error,my system is
overwelmingly slowing down and restarting is the only solution.
Previously I worked on linux/apache/php 4.0/mysql ,I never had such
problem.I used to get some errors and I used to correct them but working in
this environment is almost impossible as I am restarting my system 95% of
time.

Any ideas what might be the problem and got any tips?

Thanks in advance,
Sagil.






Are you running PHP through ISASP or CGI? If you're not I'd recomend
switching to CGI or if you don't have any ASP code switch to Apache.

andrew

-----Original Message-----
From: PHPFAN [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 14:03
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] php 4.0/win 2000/sql server


When ever I am trying to access a php file with an error,my system is
overwelmingly slowing down and restarting is the only solution.
Previously I worked on linux/apache/php 4.0/mysql ,I never had such
problem.I used to get some errors and I used to correct them but working
in
this environment is almost impossible as I am restarting my system 95%
of
time.

Any ideas what might be the problem and got any tips?

Thanks in advance,
Sagil.



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






Hi John,

It's probably a good idea to consider installing the Apache server on
another port, just to interface with the database persistently.

Funny that PHP doesn't have the equivalent of "ASP Application Object".


-----Original Message-----
From: Asendorf, John [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 23 May 2001 4:24 AM
To: Php-Windows (E-mail)
Subject: RE: [PHP-WIN] OK, I'm officially screwed if I can't get some
sugg estions

...


"These lines are eating up 12-14 second of the 14-16 second run time...

I get the same problem if I put the [OCI Persist Connect] code directly into
the
script itself"

...





I am running PHP 4.0.5 on Windows 2000 with SQL server databases.
If there is an error with my PHP code, my computer becomes very very slow
and  nothing works. The PHP
process is using 99 % of the CPU. So I have to restart the computer. This
happens everytime there is an error in
my PHP code. For the work I am doing, I have to use PHP with backend SQL
Server on Windows Platform.

Any suggestions will be greatly appreciated.

Thank you
PHPFAN






Well PHPFAN,

I think we're all fans, but what the heck.

I'm using the same configuration you are. Are you using PHP in CGI mode or
ISAPI mode. It doesn't like ISAPI so don't use it. I had similar problems
with ISAPI.

Also, I think the fdf module that shipped with 4.0.5 might be kind of funny
so you might want to get the latest release at php4win.de

Outside of that, I'm not sure what's going on. I have

Windows 2000 SP1
PHP 4.0.5 RC 1 (CGI Mode)
SQL Server 2000 SP1

And it's stable.

-Flint

-----Original Message-----
From: PHPFAN [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 3:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] PLEASE HELP.


I am running PHP 4.0.5 on Windows 2000 with SQL server databases.
If there is an error with my PHP code, my computer becomes very very slow
and  nothing works. The PHP
process is using 99 % of the CPU. So I have to restart the computer. This
happens everytime there is an error in
my PHP code. For the work I am doing, I have to use PHP with backend SQL
Server on Windows Platform.

Any suggestions will be greatly appreciated.

Thank you
PHPFAN



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





        I also have this configuration and have no problems, allthough I'm handling
the database calls using ODBC functions instead of the php-mssql70.dll
extension.

        Why don't you try it, it might fix the problem.

        Also IIS really hates the ISAPI module, so it's best to change to the CGI
version.

        Later.

-----Original Message-----
From: PHPFAN [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 3:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] PLEASE HELP.


I am running PHP 4.0.5 on Windows 2000 with SQL server databases.
If there is an error with my PHP code, my computer becomes very very slow
and  nothing works. The PHP
process is using 99 % of the CPU. So I have to restart the computer. This
happens everytime there is an error in
my PHP code. For the work I am doing, I have to use PHP with backend SQL
Server on Windows Platform.

Any suggestions will be greatly appreciated.

Thank you
PHPFAN





I get the following errors when loading admin.php

Warning: Undefined variable: SCRIPT_FILENAME in
c:\inetpub\wwwroot\phpnuke\html\admin.php on line 393

Warning: Undefined variable: wdir in
c:\inetpub\wwwroot\phpnuke\html\admin.php on line 397

Warning: Undefined variable: cancel in
c:\inetpub\wwwroot\phpnuke\html\admin.php on line 398

Warning: Undefined variable: upload in
c:\inetpub\wwwroot\phpnuke\html\admin.php on line 399


are these permission related? Any other ideas?
Matt Woodard
[EMAIL PROTECTED]






You have error_reporting set to E_ALL in your php.ini - which is probably a
good thing, because it's telling you that these variables have not been
defined. You could set error_reporting to a lower setting like E_ALL &
~E_NOTICE instead, but the preferably fix would be to define these variables
first.

HTH

Ignatius Teo
Project Manager, Internet Access Services
Information Technology Directorate
Southern Cross University
PO Box 157, Lismore NSW 2480
Email: iteo_at_scu_edu_au
Phone: +61 2 6620-3221
Fax  : +61 2 6620-3033
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GB/IT$ d++(-)@ s++:++@ a>? C++++ UL !P$ L+
!E W+$ N- o? !K w O---- M- V PS PE++ Y+(--)
PGP- t++@ 5-- X++@ R* tv- b+ DI++ D++@ G
e++ h---- r+++ y++++**
------END GEEK CODE BLOCK------




-----Original Message-----
From: SLundwall [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 23 May 2001 09:47
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Runtime Errors on Win2k IIS 5


I get the following errors when loading admin.php

Warning: Undefined variable: SCRIPT_FILENAME in
c:\inetpub\wwwroot\phpnuke\html\admin.php on line 393

Warning: Undefined variable: wdir in
c:\inetpub\wwwroot\phpnuke\html\admin.php on line 397

Warning: Undefined variable: cancel in
c:\inetpub\wwwroot\phpnuke\html\admin.php on line 398

Warning: Undefined variable: upload in
c:\inetpub\wwwroot\phpnuke\html\admin.php on line 399


are these permission related? Any other ideas?
Matt Woodard
[EMAIL PROTECTED]



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





Thanks alot, it is nice to get a quick response when you are new to
something. Everything is working fine it just had me a bit concerned.
"Ignatius Teo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You have error_reporting set to E_ALL in your php.ini - which is probably
a
> good thing, because it's telling you that these variables have not been
> defined. You could set error_reporting to a lower setting like E_ALL &
> ~E_NOTICE instead, but the preferably fix would be to define these
variables
> first.
>
> HTH
>
> Ignatius Teo
> Project Manager, Internet Access Services
> Information Technology Directorate
> Southern Cross University
> PO Box 157, Lismore NSW 2480
> Email: iteo_at_scu_edu_au
> Phone: +61 2 6620-3221
> Fax  : +61 2 6620-3033
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.1
> GB/IT$ d++(-)@ s++:++@ a>? C++++ UL !P$ L+
> !E W+$ N- o? !K w O---- M- V PS PE++ Y+(--)
> PGP- t++@ 5-- X++@ R* tv- b+ DI++ D++@ G
> e++ h---- r+++ y++++**
> ------END GEEK CODE BLOCK------
>
>
>
>
> -----Original Message-----
> From: SLundwall [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 23 May 2001 09:47
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Runtime Errors on Win2k IIS 5
>
>
> I get the following errors when loading admin.php
>
> Warning: Undefined variable: SCRIPT_FILENAME in
> c:\inetpub\wwwroot\phpnuke\html\admin.php on line 393
>
> Warning: Undefined variable: wdir in
> c:\inetpub\wwwroot\phpnuke\html\admin.php on line 397
>
> Warning: Undefined variable: cancel in
> c:\inetpub\wwwroot\phpnuke\html\admin.php on line 398
>
> Warning: Undefined variable: upload in
> c:\inetpub\wwwroot\phpnuke\html\admin.php on line 399
>
>
> are these permission related? Any other ideas?
> Matt Woodard
> [EMAIL PROTECTED]
>
>
>
> --
> 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]
>
>
> --
> 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]
>








Zak Greant wrote:

> Johan Lundqvist wrote:
> > This is a way of doing it:
> >
> > $s = time() + 10;
> > for ($i = time(); $i <= $s; $i++) {
> >     print $i;
> > }
> >
> > Will run for about ten seconds...
>
>     Did you leave a bit of code out?
>     In most cases, this will run for only a few milliseconds. :)
>
>     Try something like this instead:
>
>     $timeout = 1;            // Timeout in seconds
>     $start_time = time();    // Get the current time
>
>     for ($x=0; $x < 1000000000; ++$x) {
>
>         /*
>         // Check if we have gone over the time limit
>         // Only check every 1000 loops - this keeps
>         // us from chewing run time by checking the time
>         // all the time :)
>         */
>         if ( (0 === ($x % 1000)) && (time () - $start_time) > $timeout)
>             break;
>
>         echo ($x, '<br>');
>     }
>
>     --zak
>

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

Thanks guys

sorry about the delay .. I am in Australia..
checking the time each loop would only work if the loops complete correctly
.. if the process locks mid loop php wont reach the criterion break because
it deals with each command linearly. ie

for (x=0;x!="array full";x++)
 dothisfunction(x);
    if ( (0 === ($x % 1000)) && (time () - $start_time) > $timeout)
            break;
etc

if dothisfunction() locks up wont the entire script freeze?

maybe I am wrong..

what I am after is something like alert() in Perl or the 'on error resume
next' in ASP which runs externally to the loop and breaks to the next
instance if it is taking too long...
any ideas?
cheers!











In that case put the timing loop INSIDE dothisfunction() and rather than
breaking out of the loop, execute a return to the calling script.

Ignatius Teo
Project Manager, Internet Access Services
Information Technology Directorate
Southern Cross University
PO Box 157, Lismore NSW 2480
Email: iteo_at_scu_edu_au
Phone: +61 2 6620-3221
Fax  : +61 2 6620-3033
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GB/IT$ d++(-)@ s++:++@ a>? C++++ UL !P$ L+
!E W+$ N- o? !K w O---- M- V PS PE++ Y+(--)
PGP- t++@ 5-- X++@ R* tv- b+ DI++ D++@ G
e++ h---- r+++ y++++**
------END GEEK CODE BLOCK------




-----Original Message-----
From: Brendan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 23 May 2001 09:55
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] RE:escape loop on timeout




Zak Greant wrote:

> Johan Lundqvist wrote:
> > This is a way of doing it:
> >
> > $s = time() + 10;
> > for ($i = time(); $i <= $s; $i++) {
> >     print $i;
> > }
> >
> > Will run for about ten seconds...
>
>     Did you leave a bit of code out?
>     In most cases, this will run for only a few milliseconds. :)
>
>     Try something like this instead:
>
>     $timeout = 1;            // Timeout in seconds
>     $start_time = time();    // Get the current time
>
>     for ($x=0; $x < 1000000000; ++$x) {
>
>         /*
>         // Check if we have gone over the time limit
>         // Only check every 1000 loops - this keeps
>         // us from chewing run time by checking the time
>         // all the time :)
>         */
>         if ( (0 === ($x % 1000)) && (time () - $start_time) > $timeout)
>             break;
>
>         echo ($x, '<br>');
>     }
>
>     --zak
>

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

Thanks guys

sorry about the delay .. I am in Australia..
checking the time each loop would only work if the loops complete correctly
.. if the process locks mid loop php wont reach the criterion break because
it deals with each command linearly. ie

for (x=0;x!="array full";x++)
 dothisfunction(x);
    if ( (0 === ($x % 1000)) && (time () - $start_time) > $timeout)
            break;
etc

if dothisfunction() locks up wont the entire script freeze?

maybe I am wrong..

what I am after is something like alert() in Perl or the 'on error resume
next' in ASP which runs externally to the loop and breaks to the next
instance if it is taking too long...
any ideas?
cheers!








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





Brendan wrote:
> Thanks guys
>
> sorry about the delay .. I am in Australia..
> checking the time each loop would only work if the loops complete
correctly
> .. if the process locks mid loop php wont reach the criterion break
because
> it deals with each command linearly. ie
>
> for (x=0;x!="array full";x++)
>  dothisfunction(x);
>     if ( (0 === ($x % 1000)) && (time () - $start_time) > $timeout)
>             break;
> etc
>
> if dothisfunction() locks up wont the entire script freeze?
>
> maybe I am wrong..
>
> what I am after is something like alert() in Perl or the 'on error resume
> next' in ASP which runs externally to the loop and breaks to the next
> instance if it is taking too long...
> any ideas?

    AFAIK there is anything like this built into PHP.

    --zak





Try $GLOBALS["HTTP_POST_VARS"]...



-----Original Message-----
From: juanma cola [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 22 May 2001 22:40
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] problems with php_track_vars. please help


I have the following code in two files:

First file:

<center><H2>DELETE DOCUMENTS</H2>
<FORM NAME=formul METHOD=POST ACTION='deleteFunction.php'>
        <TABLE NAME = fileTable border=5 cellspacing=3 cellpadding=3>
        <TR><TD colspan=0></TD><TH></TH><TH>FILE NAME</TH></TR>
<?require ("commonftp.php");
echo "<br>";
$connId = ftpConnect();
$dir = ftp_pwd ($connId);
$list=Array();
$list=ftp_nlist($connId, "$dir");
$i=0;
$number = count($list);
for ($i = 0; $i < $number; $i++) {
        $destinationFile = getFileName ($list[$i]);
        echo "<TR><TD colspan=0></TD><TH>";?>
        <INPUT TYPE=checkbox NAME=fileList VALUE='<?$destinationFile?>'>
<?      printf ("</TH><TH>%s</TH>", $destinationFile);
/*      echo $list[$i] . "<br>"; */
        }
ftpDisconnect ($connId);
?>
        </TABLE>
        <INPUT TYPE=hidden NAME=func>
        <p></p><INPUT TYPE=button NAME='delete' VALUE='DELETE'
onClick='func.value=1; submit();'>
        <INPUT TYPE=button NAME='delete' VALUE='BACK' onClick='func.value=2;
submit();'></center>
</FORM>


Second file:
<?
"php_track_vars";

require ("commonftp.php");
switch ($func) {
        case 1:         $fileName = $HTTP_POST_VARS[$fileList];
                        echo $fileName;
                        $connId = ftpConnect();
                        ftpDisconnect($connId);
                        break;
        case 2:                 header ("Location: initSeminary.php");
                        break;
        }
?>

but in $HTTP_POST_VARS i donīt get the values of the check boxes
Here is the error.

Warning: Undefined variable: fileList in
e:\root\webapps\root\projektbueh\proyecto\deletefunction.php on line 18

Warning: Undefined index: in
e:\root\webapps\root\projektbueh\proyecto\deletefunction.php on line 18

Can someone help me, please?
gracias.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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





help...!!

ilustration:
i got trouble with include on the virtual directory...

a myfile.php -->> include file on directory includes/test.php

why it shouldn't work?. when i moved my file test.php from directoy
includes, with the same level of myfile.php directory it's work ?

examples: include "test.php";






You need to specify the full path (unless you're using the include_dir
setting in php.ini).

ie. include ("d:/inetpub/wwwroot/project/includes/test.php");
OR
    include (get_env("DOCUMENT_ROOT")."/includes/test.php");


Ignatius Teo

Project Manager, Internet Access Services
Information Technology Directorate
Southern Cross University
PO Box 157, Lismore NSW 2480
Email: iteo_at_scu_edu_au
Phone: +61 2 6620-3221
Fax  : +61 2 6620-3033
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GB/IT$ d++(-)@ s++:++@ a>? C++++ UL !P$ L+
!E W+$ N- o? !K w O---- M- V PS PE++ Y+(--)
PGP- t++@ 5-- X++@ R* tv- b+ DI++ D++@ G
e++ h---- r+++ y++++**
------END GEEK CODE BLOCK------


-----Original Message-----
From: sunker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 23 May 2001 16:37
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] include


help...!!

ilustration:
i got trouble with include on the virtual directory...

a myfile.php -->> include file on directory includes/test.php

why it shouldn't work?. when i moved my file test.php from directoy
includes, with the same level of myfile.php directory it's work ?

examples: include "test.php";



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





Try... include(getcwd().'/path/to/file/test.php');

-Mike

At 01:37 PM 5/23/01 +0700, you wrote:
>help...!!
>
>ilustration:
>i got trouble with include on the virtual directory...
>
>a myfile.php -->> include file on directory includes/test.php
>
>why it shouldn't work?. when i moved my file test.php from directoy
>includes, with the same level of myfile.php directory it's work ?
>
>examples: include "test.php";





Sorry, should have mentioned -- if you are doing it on windows, then try 
something like this:

include(getcwd().'\\path\\to\\file\\test.php');

-Mike

At 01:37 PM 5/23/01 +0700, you wrote:
>help...!!
>
>ilustration:
>i got trouble with include on the virtual directory...
>
>a myfile.php -->> include file on directory includes/test.php
>
>why it shouldn't work?. when i moved my file test.php from directoy
>includes, with the same level of myfile.php directory it's work ?
>
>examples: include "test.php";





Hello,

  I am a ASP, VB developer, and new to PHP world,  in ASP they is an object
name Application  and Session use to store variable.  i wondering in PHP is
they any object like that.  How do i store variable, that can access
multiple pages





--------------------------------------------------------------
Any suggestions would be appreciated.
Thank You

Khai Mun, Ng






Hi Michael

Just tried this
---------------------------------
<form name="form1" method="get" action="<?= $PHP_SELF; ?>">
  <select name="list[]" size="3" multiple>
    <option>1</option>
    <option>2</option>
    <option>3</option>
  </select>
  <input type="submit" name="Submit" value="Submit">
</form>
<?
reset ($list);
while (list ($key, $val) = each ($list)) {
    echo "$key => $val<br>";
}     
?>
------------------------------------
And it prints

0 => 1
1 => 2
2 => 3

OK on to the few HTML probs I've found

They are tabnle related really.
no opening table tag
closing table tag comes before closing row tag and closing select
no <td> or </td>

maybe it would be easier to break out of php into html to set up your table
and maybe use <td align="center"> instead of all the <center> tags

HTH

M@ 



Reply via email to