Search found 9 matches

by startx
Tue Jul 24, 2007 5:49 am
Forum: Installation and Configuration
Topic: compiling to get the smallest interpreter binary possible
Replies: 2
Views: 1108

hm, maybe im just totally worng if i find the compiling options and possible tweaks not very well documented in php. i dont speak of "configure --help", but of more sophisticated adjustments. it seems nobody really ever worked on building interpreters for specific purposes, environments wh...
by startx
Fri Jul 20, 2007 5:26 pm
Forum: Installation and Configuration
Topic: compiling to get the smallest interpreter binary possible
Replies: 2
Views: 1108

compiling to get the smallest interpreter binary possible

i try to optimize php for usage on embedded systems like mips (router etc ). as i know quite well what functions i need, i want to try to compile an interpreter binary which is as small as possible. after only using some really necessary extensions, the interpreter size is now down at about 2.3Mb bu...
by startx
Mon Jul 16, 2007 8:13 am
Forum: PHP - Code
Topic: infinitiv loops and memory
Replies: 13
Views: 815

If you fork a script that is executed by php-cli your create a new php-cli process as a clone.
i expected that, too. but to my suprise the memory footprint for it is much smaller in comparison
juts running an unforked instance of php-cli.
by startx
Mon Jul 16, 2007 7:36 am
Forum: PHP - Code
Topic: infinitiv loops and memory
Replies: 13
Views: 815

yeah, i understood that. my question was if there ARE any command line options which do PREVENT ph-cli stay in memory. anyway, i just tried this example of a "daemon" like loop here <? set_time_limit(0); // Remove time limit if (pcntl_fork()) { // Fork process print "Daemon running.&q...
by startx
Mon Jul 16, 2007 6:16 am
Forum: PHP - Code
Topic: infinitiv loops and memory
Replies: 13
Views: 815

ok sorry, maybe that was a bit confused from my side: you said I only called it without arguments but having a look at my example (an infinitiv running script) which is executed as a php-cli script using the #! /usr/bin/php line now when i execute this the interpreter stays in the memory (using some...
by startx
Mon Jul 16, 2007 5:54 am
Forum: PHP - Code
Topic: infinitiv loops and memory
Replies: 13
Views: 815

I only called it without arguments so php.exe stays put
right. but as far as i can see there is no option to prevent that anyway ?
correct me if im wrong.
by startx
Mon Jul 16, 2007 4:12 am
Forum: PHP - Code
Topic: infinitiv loops and memory
Replies: 13
Views: 815

If you call php.exe without any arguments it is waiting for a php script on stdin. ok, i see what you mean. but does php-cli have to be run with this behavior? is there a way to execute a script without having php.exe waiting for another input, or is this the normal way the php interpreter runs eve...
by startx
Mon Jul 16, 2007 3:43 am
Forum: PHP - Code
Topic: infinitiv loops and memory
Replies: 13
Views: 815

sure, not loading any module (or not compiling them in) reduces the footprint.

however i was wondering if there is more to optimise infinitive loops?
(or is there a good example of a mini-php-cli?)
by startx
Mon Jul 16, 2007 3:06 am
Forum: PHP - Code
Topic: infinitiv loops and memory
Replies: 13
Views: 815

infinitiv loops and memory

hello. i want to experiment with a simple socket (similar to http://devzone.zend.com/node/view/id/1086) listener script which runs in and endless loop. (php-cli on ubuntu edgy, php version is 5.1.6 ) to my suprise i noticed that even a simple empty loop like #! /usr/bin/php <?php while(1) { } ?> all...