php-general Digest 12 Dec 2007 13:59:28 -0000 Issue 5177

Topics (messages 265728 through 265749):

Re: running cmd via php
        265728 by: Chris
        265731 by: Jochem Maas
        265732 by: Chris
        265733 by: Jochem Maas
        265734 by: Stephen Johnson
        265735 by: Chris
        265741 by: Tom Rogers

Re: Pushing the limits of stream_socket_server() and stream_select()
        265729 by: René Fournier

Re: Mac OS X Server limits... was [PHP] Pushing the limits of 
stream_socket_server() and stream_select()
        265730 by: René Fournier

Re: Mysqli support - test or complain? [SOLVED]
        265736 by: Larry Garfield
        265746 by: Per Jessen

How to install ISAPI version on Vista IIS 6
        265737 by: SED
        265738 by: Andrés Robinet
        265739 by: SED
        265740 by: Andrés Robinet

Regular expressions
        265742 by: Liz Kim
        265743 by: Robert Cummings

How to look for unused methods/functions and variables/constants.
        265744 by: Mathijs van Veluw
        265747 by: T.Lensselink
        265748 by: T.Lensselink

Re: Command-line PHP script CPU usage goes sky-high, stays there--why?
        265745 by: Per Jessen

Re: Generating Random Numbers with Normal Distribution
        265749 by: tedd

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 ---
Dan wrote:
First off I must ask, why do you need to run windows commands when you don't even know how to use a PHP function.

That's a pretty extreme response - maybe the OP forgot the function name or didn't know it in the first place.

There is a lot of stuff in php and there's no way anyone will remember every part of it.

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Chris wrote:
> Dan wrote:
>> First off I must ask, why do you need to run windows commands when you
>> don't even know how to use a PHP function.
> 
> That's a pretty extreme response - 

maybe he's an extreme programmer :-P

> maybe the OP forgot the function name
> or didn't know it in the first place.
> 
> There is a lot of stuff in php and there's no way anyone will remember
> every part of it.

let's not forget the place you learned the command in the first place?!?!

manual meet the new guy, new guy meet the manual -
may you have many beautiful children together.

> 

--- End Message ---
--- Begin Message ---
Jochem Maas wrote:
Chris wrote:
Dan wrote:
First off I must ask, why do you need to run windows commands when you
don't even know how to use a PHP function.
That's a pretty extreme response -

maybe he's an extreme programmer :-P

maybe the OP forgot the function name
or didn't know it in the first place.

There is a lot of stuff in php and there's no way anyone will remember
every part of it.

let's not forget the place you learned the command in the first place?!?!

manual meet the new guy, new guy meet the manual -
may you have many beautiful children together.

Doesn't help if you don't know what to look for in the first place :)

I'm all for rtfm type responses but if you're not sure what category to start looking in how does it help? Don't tell me you'd scan the 189 categories for lack of a better term (taken from http://www.php.net/manual/en/funcref.php) to look for a particular fn that you don't know the name of let alone which area it belongs in.

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Chris wrote:
> Jochem Maas wrote:
>> Chris wrote:
>>> Dan wrote:
>>>> First off I must ask, why do you need to run windows commands when you
>>>> don't even know how to use a PHP function.
>>> That's a pretty extreme response - 
>>
>> maybe he's an extreme programmer :-P
>>
>>> maybe the OP forgot the function name
>>> or didn't know it in the first place.
>>>
>>> There is a lot of stuff in php and there's no way anyone will remember
>>> every part of it.
>>
>> let's not forget the place you learned the command in the first place?!?!
>>
>> manual meet the new guy, new guy meet the manual -
>> may you have many beautiful children together.
> 
> Doesn't help if you don't know what to look for in the first place :)
> 
> I'm all for rtfm type responses but if you're not sure what category to
> start looking in how does it help? Don't tell me you'd scan the 189
> categories for lack of a better term (taken from
> http://www.php.net/manual/en/funcref.php) to look for a particular fn
> that you don't know the name of let alone which area it belongs in.\

it's all moot - the OP got his answer way back when - but ...
a manual is a book. we all know how to read a book, if you have no idea how
to do anything with php shouldn't be your responsibility to read the man
front to back ... at least perusing each major section to get a feel of it.
jmho
> 

--- End Message ---
--- Begin Message ---

On 12/11/07 6:02 PM, "Chris" <[EMAIL PROTECTED]> wrote:

> Jochem Maas wrote:
>> Chris wrote:
>>> Dan wrote:
>>>> First off I must ask, why do you need to run windows commands when you
>>>> don't even know how to use a PHP function.
>>> That's a pretty extreme response -
>> 
>> maybe he's an extreme programmer :-P
>> 
>>> maybe the OP forgot the function name
>>> or didn't know it in the first place.
>>> 
>>> There is a lot of stuff in php and there's no way anyone will remember
>>> every part of it.
>> 
>> let's not forget the place you learned the command in the first place?!?!
>> 
>> manual meet the new guy, new guy meet the manual -
>> may you have many beautiful children together.
> 
> Doesn't help if you don't know what to look for in the first place :)
> 
> I'm all for rtfm type responses but if you're not sure what category to
> start looking in how does it help? Don't tell me you'd scan the 189
> categories for lack of a better term (taken from
> http://www.php.net/manual/en/funcref.php) to look for a particular fn
> that you don't know the name of let alone which area it belongs in.

OK then how about a STFW answer...

Google : php exexcute windows commands

You can even hit the "I'm feeling lucky button." ;)

-- 
Stephen Johnson
The Lone Coder

http://www.ouradoptionblog.com
*Join us on our adoption journey*

[EMAIL PROTECTED]
http://www.thelonecoder.com

*Continuing the struggle against bad code*
--

--- End Message ---
--- Begin Message ---

OK then how about a STFW answer...

Google : php exexcute windows commands

I'm not sure what that particular phrase would produce ;) (surprisingly - a few answers :P).

--
Postgresql & php tutorials
http://www.designmagick.com/

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

Thursday, November 29, 2007, 2:17:15 AM, you wrote:
a> Hello!
a> I'm trying a lot to find how I can run the cmd (command line of windows) and
a> send to the cmd commands?
a> Thanks. 


Here is one way to do it, its from a function to check php syntax.
it opens up php then sends it the text to check and reads the answer
back.

function checkPhpSyntax($text){
    $r = false;
    $cwd = getcwd();
    chdir("C:\\php5");
    $descriptorspec = array(
      0 => array("pipe", "r"), // stdin is a pipe that the child will read from
      1 => array("pipe", "w"),
      2 => array("file", "C:\\php5\\error.txt", "a"));
    $process = proc_open("C:\\php5\\php -c C:\\php5 -l", $descriptorspec, 
$pipes);
    fwrite($pipes[0], $text);
    fclose($pipes[0]);
    $out = '';
    while(!feof($pipes[1])) {
        $out .= fgets($pipes[1], 1024);
    }
    fclose($pipes[1]);
    proc_close($process);
    chdir($cwd);
    if(!empty($out)){
      $res = split("\n",$out);
      if(preg_match('/No syntax errors/',$res[0])){
        $r =true;
      }else{
        $error = $res[1];
        if(preg_match('/Parse error:/',$error)){
          $match = preg_split('/line/',$error);
          $line = intval(trim($match[1]));
          //show error here
        }
      }
    }
    return $r;
}

-- 
regards,
Tom

--- End Message ---
--- Begin Message ---
On 11-Dec-07, at 4:32 PM, René Fournier wrote:

Just curious what people found the limits to be with stream_socket_server(), in terms of maximum concurrent connections, packet sizes, etc. I'm am presently stress-testing a multi-client socket server and am finding I can sometimes break it with as few as 100 concurrent connections, and always break it with [precisely] 252 connections--with a variety of errors getting thrown:

        Client-side (>100 connections, sometimes):
PHP Warning: stream_socket_client(): unable to connect to tcp:// 192.168.0.41:2222 (Operation timed out) in /Tuning/client.php on line 3 PHP Notice: fwrite(): send of 68 bytes failed with errno=32 Broken pipe in /Tuning/client.php on line 14

        Server-side error ( 252+ connections, every time):
PHP Warning: stream_select(): supplied argument is not a valid stream resource in /Tuning/server.php on line 15

Interestingly, this 251 connection limit does not appear to be obviously system-related (I am running Mac OS X 10.4.11). I can run two instances of server.php and have each client.php spawn 175 connections (350 total concurrent to the machine), with no problem.

Interestingly, the above server-side error only occurs when 252 clients are connected. At 251, it's okay. At 252, it generates the above PHP Warning. (Which really is strange. Anyone have any ideas?)

If anyone is interested, I will post the sample code I'm using, in case--perish the thought--the problem is self-inflicted. :-)

...Rene


--- End Message ---
--- Begin Message --- OK, having done more digging, this bizarre 251-255 connections per socket limit seems to be an OS X thing. (Linux people, any comments?) At least that's I've read: http://www.macgeekery.com/tips/ configuration/mac_os_x_network_tuning_guide_revisited#comment-1433

So... Do any Mac OS X gurus out there know how to increase OS X Server's (10.4.11) maximum connections per socket value? There seems to no such setting in sysctl or ulimit. Any ideas? Anyone? Anyone?

...Rene

On 11-Dec-07, at 4:55 PM, René Fournier wrote:

On 11-Dec-07, at 4:32 PM, René Fournier wrote:

Just curious what people found the limits to be with stream_socket_server(), in terms of maximum concurrent connections, packet sizes, etc. I'm am presently stress-testing a multi-client socket server and am finding I can sometimes break it with as few as 100 concurrent connections, and always break it with [precisely] 252 connections--with a variety of errors getting thrown:

        Client-side (>100 connections, sometimes):
PHP Warning: stream_socket_client(): unable to connect to tcp:// 192.168.0.41:2222 (Operation timed out) in /Tuning/client.php on line 3 PHP Notice: fwrite(): send of 68 bytes failed with errno=32 Broken pipe in /Tuning/client.php on line 14

        Server-side error ( 252+ connections, every time):
PHP Warning: stream_select(): supplied argument is not a valid stream resource in /Tuning/server.php on line 15

Interestingly, this 251 connection limit does not appear to be obviously system-related (I am running Mac OS X 10.4.11). I can run two instances of server.php and have each client.php spawn 175 connections (350 total concurrent to the machine), with no problem.

Interestingly, the above server-side error only occurs when 252 clients are connected. At 251, it's okay. At 252, it generates the above PHP Warning. (Which really is strange. Anyone have any ideas?)

If anyone is interested, I will post the sample code I'm using, in case--perish the thought--the problem is self-inflicted. :-)

...Rene


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


--- End Message ---
--- Begin Message ---
On Tuesday 11 December 2007, Per Jessen wrote:
> Stut wrote:
> > I couldn't care less what your domain name is, you're still advocating
> > a poor choice IMHO.
>
> I have been trying hard not to join this thread, but ... apart from the
> principle, what's _really_ so poor about it?  Having to write
> application code that needs to work with two different APIs is poor
> enough, using a session variable for keeping a status won't make it
> much worse.  So what if the status is server-scope, yet kept in
> user-scope.  In particular if the app already uses session storage.

Are you saying there's something wrong with doing something non-stupid "on 
principle"?  Any employer that wants me to cut even small corners like that 
to do something sloppy to save the 10 seconds it would take to do it right 
can find a new programmer, thank you.  (The market is good enough that you 
can say that, if you're good enough.)  You could also make every property of 
an object public, or always use an input/output parameter to a function 
instead of a return.  They would all work.  That doesn't mean any of those 
aren't dumb.

For all those suggesting that adding an if() check is better than caching it 
to the session, you're right.  It's also still less than optimal.

You have a database config file somewhere that stores your database 
credentials.  Put which DB driver to use in there.  It's not like it's going 
to change, and you have to edit that file anyway to install the app.  It's 
part of the database configuration.  Most of the open source systems I've 
seen do that in some form or another.  And if you don't know what driver you 
have on your system, it's not like it's hard to try one, watch it die, and 
then use the other. :-)

How did this get so complicated?

-- 
Larry Garfield                  AIM: LOLG42
[EMAIL PROTECTED]               ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

--- End Message ---
--- Begin Message ---
Robert Cummings wrote:

>> I can't remember what sort of environment the OP was in, but if any
>> sort of organised testing is done, the use of two different APIs will
>> just about double the test-effort.  Which is why I still think the
>> best option is to mandate _one_ of the APIs and choose your hoster
>> accordingly.
> 
> Well if you write unit tests, having the unit tests applied to one or
> the other is the same amount of work since it just requires a switch
> to change between mysql and mysqli.

Regardless of how you do it, it's twice the amount of work to run a test
twice.  



/Per Jessen, Zürich

--- End Message ---
--- Begin Message ---
Hello,

 

I'm running Vista Ultimate on my computer with IIS 6.0.

 

I'm trying to manually install PHP 5 (ISAPI) on IIS but in the "Handler
mappings" I get this message:

 

"One or more of the modules specified for this handler does not exist in the
modules list. If you are trying to add a script map the IsapiModule or the
CgiModule is not prensent in the modules list."

 

I have Googled this but did not find any answers. Even on php.net there is
no mention on Vista.

 

Can you point me to guidance for installing PHP 5 on Vista running IIS 6.0?

 

Regards,

SED

 

 

 

 


--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: SED [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 12, 2007 12:25 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] How to install ISAPI version on Vista IIS 6
> 
> Hello,
> 
> 
> 
> I'm running Vista Ultimate on my computer with IIS 6.0.
> 
> 
> 
> I'm trying to manually install PHP 5 (ISAPI) on IIS but in the "Handler
> mappings" I get this message:
> 
> 
> 
> "One or more of the modules specified for this handler does not exist
> in the
> modules list. If you are trying to add a script map the IsapiModule or
> the
> CgiModule is not prensent in the modules list."
> 
> 
> 
> I have Googled this but did not find any answers. Even on php.net there
> is
> no mention on Vista.
> 
> 
> 
> Can you point me to guidance for installing PHP 5 on Vista running IIS
> 6.0?
> 
> 
> 
> Regards,
> 
> SED
> 

Hope you don't get offended but... check http://www.apple.com/getamac/ads/
(the last one "choose a vista" is very instructive).
I've never had a Mac, but I've laughed a lot... and I'm every day thinking
more and more certain of not upgrading my XP. Hope you smile at least for 30
seconds. :)

Rob


Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308
| TEL 954-607-4207 | FAX 954-337-2695
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE:
bestplace |  Web: http://www.bestplace.biz | Web: http://www.seo-diy.com

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

I'm not offended, I'm pistoff with Microsoft. Paying so much for VISTA and
so many troubles and so litle support...  I have other computers running
various others systems but I need to solve this case.

Your comment, only makes me smile, over how stupid I was to pay for Vista.

Regards,
SED

-----Original Message-----
From: Andrés Robinet [mailto:[EMAIL PROTECTED] 
Sent: 12. desember 2007 04:08
To: [EMAIL PROTECTED]
Subject: RE: [PHP] How to install ISAPI version on Vista IIS 6

> -----Original Message-----
> From: SED [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 12, 2007 12:25 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] How to install ISAPI version on Vista IIS 6
> 
> Hello,
> 
> 
> 
> I'm running Vista Ultimate on my computer with IIS 6.0.
> 
> 
> 
> I'm trying to manually install PHP 5 (ISAPI) on IIS but in the "Handler
> mappings" I get this message:
> 
> 
> 
> "One or more of the modules specified for this handler does not exist
> in the
> modules list. If you are trying to add a script map the IsapiModule or
> the
> CgiModule is not prensent in the modules list."
> 
> 
> 
> I have Googled this but did not find any answers. Even on php.net there
> is
> no mention on Vista.
> 
> 
> 
> Can you point me to guidance for installing PHP 5 on Vista running IIS
> 6.0?
> 
> 
> 
> Regards,
> 
> SED
> 

Hope you don't get offended but... check http://www.apple.com/getamac/ads/
(the last one "choose a vista" is very instructive).
I've never had a Mac, but I've laughed a lot... and I'm every day thinking
more and more certain of not upgrading my XP. Hope you smile at least for 30
seconds. :)

Rob


Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308
| TEL 954-607-4207 | FAX 954-337-2695
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE:
bestplace |  Web: http://www.bestplace.biz | Web: http://www.seo-diy.com

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

--- End Message ---
--- Begin Message ---
I think I found a solution for you... or at least a step closer. One
correction though, you are likely running IIS 7.0 and not IIS 6.0, right?

Check this out
http://www.phpbuilder.com/board/showthread.php?t=10344435&highlight=php+5.2.
3 It seems that the default installation of windows IIS 7.0 for Vista does
not include the CGI and ISAPI modules. You need to include at least the one
you'll be using for PHP, I guess ISAPI but I've read about some problems
with extensions, so... give it a try, it's a pity I don't have a Vista box
to try it and tell you.

Anyway... hope you manage to get it installed, and when you do... POST IT
BACK, there will surely be other people willing to know about it in this
list.

Rob


Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308
| TEL 954-607-4207 | FAX 954-337-2695
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE:
bestplace |  Web: http://www.bestplace.biz | Web: http://www.seo-diy.com

> -----Original Message-----
> From: SED [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 12, 2007 1:44 AM
> To: 'Andrés Robinet'
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] How to install ISAPI version on Vista IIS 6
> 
> Hi Rob,
> 
> I'm not offended, I'm pistoff with Microsoft. Paying so much for VISTA
> and
> so many troubles and so litle support...  I have other computers
> running
> various others systems but I need to solve this case.
> 
> Your comment, only makes me smile, over how stupid I was to pay for
> Vista.
> 
> Regards,
> SED
> 
> -----Original Message-----
> From: Andrés Robinet [mailto:[EMAIL PROTECTED]
> Sent: 12. desember 2007 04:08
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] How to install ISAPI version on Vista IIS 6
> 
> > -----Original Message-----
> > From: SED [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 12, 2007 12:25 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] How to install ISAPI version on Vista IIS 6
> >
> > Hello,
> >
> >
> >
> > I'm running Vista Ultimate on my computer with IIS 6.0.
> >
> >
> >
> > I'm trying to manually install PHP 5 (ISAPI) on IIS but in the
> "Handler
> > mappings" I get this message:
> >
> >
> >
> > "One or more of the modules specified for this handler does not exist
> > in the
> > modules list. If you are trying to add a script map the IsapiModule
> or
> > the
> > CgiModule is not prensent in the modules list."
> >
> >
> >
> > I have Googled this but did not find any answers. Even on php.net
> there
> > is
> > no mention on Vista.
> >
> >
> >
> > Can you point me to guidance for installing PHP 5 on Vista running
> IIS
> > 6.0?
> >
> >
> >
> > Regards,
> >
> > SED
> >
> 
> Hope you don't get offended but... check
> http://www.apple.com/getamac/ads/
> (the last one "choose a vista" is very instructive).
> I've never had a Mac, but I've laughed a lot... and I'm every day
> thinking
> more and more certain of not upgrading my XP. Hope you smile at least
> for 30
> seconds. :)
> 
> Rob
> 
> 
> Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
> 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL
> 33308
> | TEL 954-607-4207 | FAX 954-337-2695
> Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE:
> bestplace |  Web: http://www.bestplace.biz | Web: http://www.seo-
> diy.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
I am trying to do a password match with php..

It needs to be at least 6 characters, contains 2 alphabets and at least 1
number or a special character...

if
(!preg_match("/^.*(?=.{6,})((?=.*\d)|(?=.*[,[EMAIL 
PROTECTED]"\/'+\*\?\.\[\]\^$\(\){}\|\\&:;'<>~`#%_-]))([a-zA-Z]{2,}).*$/",
$pw1)) {error message}

is failing to pass "e1w2qw" as a good password although it follows the
instructions...

I cannot figure out why..

Please help!

Thank you,

--- End Message ---
--- Begin Message ---
On Tue, 2007-12-11 at 22:33 -0800, Liz Kim wrote:
> I am trying to do a password match with php..
> 
> It needs to be at least 6 characters, contains 2 alphabets and at least 1
> number or a special character...
> 
> if
> (!preg_match("/^.*(?=.{6,})((?=.*\d)|(?=.*[,[EMAIL 
> PROTECTED]"\/'+\*\?\.\[\]\^$\(\){}\|\\&:;'<>~`#%_-]))([a-zA-Z]{2,}).*$/",
> $pw1)) {error message}
> 
> is failing to pass "e1w2qw" as a good password although it follows the
> instructions...
> 
> I cannot figure out why..

Any reason you took such a complex route?

<?php

if( strlen( $pw1 ) < 6
    ||
    !ereg( '[[:digit:]]', $pw1 )
    ||
    strlen( ereg_replace( '[^[:alpha:]]', '', $pw1 ) ) < 2
    ||
    strlen( ereg_replace( '[[:alnum:][:space:]]', '', $pw1 ) ) < 1 )
{
    // error message
}

?>

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
Hello there,

We have a large project with lots of classes.
Now i am wondering if there is a way to let something check all those files and tell me which methods/functions variables/constants etc.. arn't used anymore.

Or even which files arn't used anymore.

Is there already something like this?

Thx in advance.

Mathijs

--- End Message ---
--- Begin Message ---
On Wed, 12 Dec 2007 10:21:58 +0100, Mathijs van Veluw
<[EMAIL PROTECTED]> wrote:
> Hello there,
> 
> We have a large project with lots of classes.
> Now i am wondering if there is a way to let something check all those
> files and tell me which methods/functions variables/constants etc..
> arn't used anymore.
> 
> Or even which files arn't used anymore.
> 
> Is there already something like this?
> 
> Thx in advance.
> 
> Mathijs
> 

You could use Xdebug's Code_Coverage. Or the "Analyze code" feature 
in Zend Studio if you're using that :)

--- End Message ---
--- Begin Message ---
On Wed, 12 Dec 2007 10:21:58 +0100, Mathijs van Veluw
<[EMAIL PROTECTED]> wrote:
> Hello there,
> 
> We have a large project with lots of classes.
> Now i am wondering if there is a way to let something check all those
> files and tell me which methods/functions variables/constants etc..
> arn't used anymore.
> 
> Or even which files arn't used anymore.
> 
> Is there already something like this?
> 
> Thx in advance.
> 
> Mathijs
> 

Somehow my subject got stripped. I hope this reply doesn't break the
thread.

You can use Xdebug's Code_Coverage. 
Or the "Analyze code" feature in Zend Studio if you're using that.

--- End Message ---
--- Begin Message ---
Jochem Maas wrote:

>> Have you tried stracing it to see what's really happening when the
>> load goes that high?
> 
> am I correct that that would be done like so?:
> 
> strace -p <process id of php deamon>

Yep, that's it.  You'll probably want to record the output for analysis,
but sometimes it's very obvious what's happening.  Which doesn't mean
it's also easy to fix, but it could give you a clue. 


/Per Jessen, Zürich

--- End Message ---
--- Begin Message ---
At 5:15 PM -0500 12/10/07, Daniel Brown wrote:
   Just for fun, I decided to write out an algorithm to randomize
with a never-known seed that would update constantly, with no human or
external script intervention required to initiate or maintain it.


My guess is that if there was a time that this <whatever> did not exist, but now does exist, then it cannot be random. It may be random for a billion years, or more, but it would eventually repeat.

However, it something started at the instant of the big-bang, then its repeat cycle would be at least equal-to, or greater-than, known time and thus random.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---

Reply via email to