[PHP] How TO monitor upload speed?

2005-03-13 Thread zini10
is it possible to watch upload speed (HTTP Post upload) using php alone? i know this is possible using a combination of php and cgi(cgi for upload and php for monitoring the upload) but it's complicated and thus unreliable... do u have any other ideas? thanks. -- PHP General Mailing List

[PHP] Re: Session IDs - How are they generated?

2005-03-20 Thread zini10
Im Pretty sure it's using Uniqid , its the simplest solution possible , about the second question, php doesnot mind if he is being run from apahce,iis or command line. Dont count on my answers coz im not really sure. Yannick Warnier [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi

[PHP] Re: Ensure only one instance of a script is running

2005-03-20 Thread zini10
a more reliable solution: Write a lock file and update timestamp each minute or so ,(at varous places around the script) then in order to check if the script is already runninh, check the timestamp. Jeremiah Fisher [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Test for a lock file

[PHP] Limiting Cpu usage

2005-04-10 Thread zini10
hello, how can i limit cpu usage for shared hosting enviroment? i mean , im hosting serveal sites and wish for all php scripts to have (for example) no more than 5% of cpu usage so no one can bomb my server. im currently using php as a module , i know i can do it if ill use php as a cgi and

[PHP] Re: Limiting Cpu usage

2005-04-10 Thread zini10
Thought about that, but its a free host that will host many many users.ill prefer them to have low cpu usage limit also if the system is free of tasks as that will never happen. any user can come, prepare a script which will do a infinite loop and will make the server slow for all other users.

Re: [PHP] Limiting Cpu usage

2005-04-11 Thread zini10
, 2005 9:27 AM, zini10 [EMAIL PROTECTED] wrote: hello, how can i limit cpu usage for shared hosting enviroment? i mean , im hosting serveal sites and wish for all php scripts to have (for example) no more than 5% of cpu usage so no one can bomb my server. im currently using php as a module , i

Re: [PHP] Limiting Cpu usage

2005-04-11 Thread zini10
another thing i just noticed is that it is designed for nanoweb server , not for apache but thanks anyway for your help. Greg Donald [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Apr 10, 2005 9:27 AM, zini10 [EMAIL PROTECTED] wrote: hello, how can i limit cpu usage

[PHP] Re: Limiting Cpu usage

2005-04-11 Thread zini10
but i must give them php support or else they coulnot do anything on the server... im limiting them by functions , safe mode and more.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Limiting Cpu usage

2005-04-11 Thread zini10
Yeah . i thought about removing those entire functions by DISABLE_FUNCTIONS directive , it not that common either. is there a way to enforce declare(ticks=); automatically? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Limiting Cpu usage

2005-04-11 Thread zini10
in a brief rethinking, that is excatly what i need to do - change the php itself... now, i found the execute function but can someone please explain how can i put a usleep or sleep or somethink which doesnt take up cpu cycles (like the sleep command in linux?) thanks/ -- PHP General Mailing

[PHP] Re: Limiting Cpu usage

2005-04-12 Thread zini10
Yeahh! i have made it i can slow down a php script , as i edited the zend engine source to usleep every 1000 low-level instructions now, is there a way to determine to check my cpu load and adjust it by that so if nothing (or very low cpu usage) is running on the system he'll get extra

[PHP] Re: Determining array type

2005-04-16 Thread zini10
i dont think there is a pre-made function but u can use : (! --untested at all --! ) function determine_array($a) { $numric=0; $assoc=0; foreach($a as $index=$value) { if(is_numeric($index)){ $numric=1; } else{ $assoc=1; } } return $numric+$assoc*2; } then results