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 sho
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 p
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 L
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
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
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:
>
AIL PROTECTED]
> On Apr 10, 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
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.
t
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 limit
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
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]
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 (http
12 matches
Mail list logo