php-windows Digest 31 Jul 2001 10:54:02 -0000 Issue 677

Topics (messages 8582 through 8589):

Re: extracting value from array
        8582 by: Michael Kelley
        8584 by: Hugh Bothwell

Re: include()ing the remote file
        8583 by: Ignatius Teo

Re: PHP zombies on Win2K.
        8585 by: Asendorf, John
        8586 by: Frank M. Kromann

Cookies and headers
        8587 by: Leon

DB Date check !!
        8588 by: Andrew.Martin
        8589 by: elias

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]


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


Easiest (not best or fastest I'm sure) is Walk through the original 
array ...
For(i=0,j=0; i < $array.count; i++)
        {
        //Look for your xyz123 (if its not there write to new array)

        if array(i) != "xyz123"
                {
                        $array2(j) = $array(i)
                        j++
                }
                } //End For Loop

//you'll now have a "new" array with all the values EXCEPT "xyz123"
I know syntax is not correct .... but you should get the idea of the 
iteration






[EMAIL PROTECTED] wrote:

> Hi all,
> my problem is following:
> 
> let's say there is an array with 10 elements.
> $array = array('$value1', '$value2', '$value3', '$value4', '$value5', '$value6', 
>'$value7', '$value8', '$value9', '$value10');
> One of elements has value 'xyz123' - I do not know which one.
> 
> How can I extract this element from the array and have a new array with all other 
>element, except extracted one.
> 
> Any idea?
> 
> Afan Pasalic


-- 

Michael Kelley                  
[EMAIL PROTECTED] 
        
Programmer/Systems Analyst I    
New Mexico State University
Information and Communication Technologies
Work # (505)-646-1374
P.O. Box 30001
MSC: 3AT
Las Cruces, NM 88003









> <[EMAIL PROTECTED]> wrote in message
> 011401c11958$26d38f60$[EMAIL PROTECTED]">news:011401c11958$26d38f60$[EMAIL PROTECTED]...

> let's say there is an array with 10 elements.
> One of elements has value 'xyz123' - I do not know which one.
> How can I extract this element from the array and
> have a new array with all other element, except extracted one.

// original array
$arr = array("a", "b", "c", "d", "xyz123", "f", "g");
// list of values to remove
$remove = array("xyz123");

// do it
$result = array_diff($arr, $remove);

// show results
foreach($result as $val)
    echo "<br>$val";







>From the manual
Note: You can't use remote files in include() and require() statements on
Windows.

HTH


Ignatius


----- Original Message -----
From: "Vasu Gokaraju" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 31, 2001 12:58 AM
Subject: [PHP-WIN] include()ing the remote file


Hi,

I have PHP 4.0.5 installed on Windows 2000 server.  I used include()
function and relative paths to include files located under the same web
site.  When I tried to include() files located on different web site on the
same machine with explicit paths, I get the following warning:

Warning: Failed opening 'http://myserver/admin/Includes/Test.php' for
inclusion (include_path='') in
D:\MyFolder\Admin\MasterGroup\MasterGroupIndex.php on line 18

The Test.php file has one echo function in it.

I noticed that allow_url_fopen entry is missing from my php.ini file but I
did not see any difference even after I added it (allow_url_fopen = On).

Thanks for your time and any suggestions to solve this problem will be
appreciated.

Vasu






I have had this problem intermittantly also.  I was talking about it with
people at the PHP Conference out in San Diego and it seems that those
processes clean themselves up after a certain amount of time once IIS
releases them.  From what I've been told it mainly occurs when someone
clicks a link and then backs out using the "back" button.  This leaves the
server without an idea as to where to send it.  On Apache, I guess the
timeout is set for 24 hours by default but is changeable.  I haven't looked
in to it on IIS yet.

John

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Aliquando et insanire iucundum est


> -----Original Message-----
> From: Ivan Milanez Castellanos [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 26, 2001 7:06 PM
> To: 'Php-Windows'
> Subject: [PHP-WIN] PHP zombies on Win2K.
> 
> 
> 
> Does anyone know how to kill the php.exe processes that get 
> left behind
> for one reason or another???
> 
> One of the programmers here created a PHP script with some bugs that
> leave the php process hanging, and this consumes my processor a lot.
> 
> Please help.
> 
> Iván
> 




The default connection timeout in IIS is 900 seconds. It can be changed in "Internet 
Service Manager" by right clicking on the web site and select Properties.

- Frank

> I have had this problem intermittantly also.  I was talking about it with
> people at the PHP Conference out in San Diego and it seems that those
> processes clean themselves up after a certain amount of time once IIS
> releases them.  From what I've been told it mainly occurs when someone
> clicks a link and then backs out using the "back" button.  This leaves the
> server without an idea as to where to send it.  On Apache, I guess the
> timeout is set for 24 hours by default but is changeable.  I haven't looked
> in to it on IIS yet.
> 
> John
> 
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Aliquando et insanire iucundum est
> 
> 
> > -----Original Message-----
> > From: Ivan Milanez Castellanos [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, July 26, 2001 7:06 PM
> > To: 'Php-Windows'
> > Subject: [PHP-WIN] PHP zombies on Win2K.
> > 
> > 
> > 
> > Does anyone know how to kill the php.exe processes that get 
> > left behind
> > for one reason or another???
> > 
> > One of the programmers here created a PHP script with some bugs that
> > leave the php process hanging, and this consumes my processor a lot.
> > 
> > Please help.
> > 
> > Iván
> > 
> 
> --
> 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]
> 
> 
> 







Lo all

Headers and cookies are really becoming a bugger!
What I'd like to know is:

1. Do headers and setcookie() functions have to be in direct succession?
2. Is there a time limit for the setcookie() to be executed from the time the header 
is sent? ie 30sec

P.S.:
WILL PPL PLEASE STOP USING THE CRYPT(), WIN32 DOES NOT SUPPORT IT!!!!

Cheers
Leon






Hi,

I want to check the date of numerous records in many DB tables, I have tried
using the 
date (Ymd); function but it doesn't appear to work, not sure whats going
wrong.

I set a variable based on this function and use this variable within the
select statement!
Anyone know whats happening or if there is a descent solution available?

thanks,

Andrew




SELECT * FROM table1
WHERE YEAR(datefield1) = 1999

check datetime functions @ http://www.mysql.com/documentation

"Andrew.Martin" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I want to check the date of numerous records in many DB tables, I have
tried
> using the
> date (Ymd); function but it doesn't appear to work, not sure whats going
> wrong.
>
> I set a variable based on this function and use this variable within the
> select statement!
> Anyone know whats happening or if there is a descent solution available?
>
> thanks,
>
> Andrew
>




Reply via email to